I searched the discussions but didn't find anything about tools in the Prompt API.
I'm wondering if it actually works. I've been trying this but it never recognizes or even seems aware of the tools:
tools: [
{
name: "getAllEventsSummaryList",
description: "Get the list of user Events",
async execute() {
console.log("AI tool call : getAllEventsSummaryList");
return JSON.stringify(await getAllEventsSummaryList("649f175093dc00006ce4a48b"));
},
},
{
name: "getEventAttendees",
description: "Get the list of Event attendees",
inputSchema: {
type: "object",
properties: {
event_id: {
type: "string",
description: "The id of the specific event we want to get the attendees for",
},
},
required: ["event_id"],
},
async execute({ event_id }) {
console.log("AI tool call : getEventAttendees : "+ event_id);
return JSON.stringify(await getEventAttendees(event_id));
},
}
]