@sagentic-ai/sagentic-af / Tool
Tool ​
Properties ​
describe ​
ts
describe: () => ChatCompletionTool;
Convert a tool to OpenAI compatible tool schema.
Returns ​
ChatCompletionTool
OpenAI compatible JSON schema as JS object
Source ​
description ​
ts
description: string;
Description of the tool
Source ​
invoke ​
ts
invoke: (agent, args) => Promise<any>;
Invoke the tool.
Parameters ​
• agent: Agent
• args: any
Arguments for the tool
Returns ​
Promise
<any
>
Return value of the tool
Throws ​
Error if the arguments are invalid or not supported
Source ​
name ​
ts
name: string;
Name of the tool