}
// promptTools returns the function tools of every call of the agent: the tools
-// of promptSubagentTools, then spawn and tell. A compaction sends them too and never
-// calls them, because a change of the tools ends the shared prompt cache.
+// of promptSubagentTools, then spawn, tell, and the WhatsApp tools. A compaction sends them too and
+// never calls them, because a change of the tools ends the shared prompt cache.
func promptTools() []ModelTool {
return append(promptSubagentTools(), ModelTool{
Type: "function",
"message": promptStringSchema("The message."),
}),
Strict: true,
+ }, ModelTool{
+ Type: "function",
+ Name: "whatsapp_find",
+ Description: "Find the WhatsApp contacts and groups of the user whose name contains the text, with no regard to case and accents. Gives up to 20 matches, each as ID | name | contact or group.",
+ Parameters: promptObjectSchema(map[string]any{
+ "name": promptStringSchema("A part of the name of the contact or the group."),
+ }),
+ Strict: true,
})
}