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
required

The name of the tool or action.

description
string
required

The description of the tool or action. keep your description clear as it guides the agent when to use the tool.

parameters
JSONSchema
required

The 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.

Reference to JSONSchema

Return Value

tool_schema
ToolSchema

Returns a tool schema that can be then used to inject the too into agents (using addClientAction) and boxes.

Reference to ToolSchema

Was this page helpful?