createActionSchema
Used to create a client-side action schema from a JSON schema.
Arguments
Takes one arguments passed an object with the following properties:
name
string
requiredThe name of the tool or action.
description
string
requiredThe description of the tool or action. keep your description clear as it guides the agent when to use the tool.
parameters
JSONSchema
requiredThe parameters schema of the action’s function. recommended to be a JSONSchema
as object
in the parent property. this schema is used to validate the arguments passed from the agent to your action to ensure stability.
Return Value
tool_schema
ToolSchema
Returns a tool schema that can be then used to inject the too into agents (using addClientAction) and boxes.
Was this page helpful?