How it Works
When you add a custom tool to your API request, Zylon follows these steps:- Analyzes user intent: Zylon determines if your custom tool is appropriate for answering the user’s query.
- Awaits implementation: Returns the tool call for you to process and implement the actual functionality.
Important Notes
- Custom tools require you to define the
name
,description
, andinput_schema
. - The
input_schema
follows JSON Schema specification. - No
tool_context
is required for custom tools.
Example Usage
In this practical example, we create a simple calculator tool that performs basic arithmetic operations.1
Define Custom Tool
Create your custom tool by defining its name, description, and input schema. Then call the API with your custom tool definition.
2
Response
The system responds with the structured tool call that matches your input schema. You then need to implement the actual functionality: