Add the tool
- Open the agent.
- Choose Add custom tool.
- Set Tool name. Use letters, numbers, underscores, and hyphens.
- Set Description. This is what tells the agent when to call the tool.
- Write the function in Code editor. It is an async function, the same shape as a workflow node.
- Set Schema (JSON object). List the fields the agent must fill. Keep
{}when the tool needs no input. - Save the agent and run it with a sentence that needs this tool.
You should see the tool name in the run timeline. The schema is a JSON object with type, properties, and required.
{
"type": "object",
"properties": {
"query": { "type": "string" }
},
"required": ["query"]
}If this fails: the tool does not save
Custom tool 1: name is required.Fill Tool name.Custom tool 1: code is required.The code editor is empty.Custom tool 1: schema JSON is invalid.The schema is not a JSON object.Predefined tool schema JSON is invalid.is the same problem on a built-in tool you edited.invalid toolafter save means the function does not compile. The agent stays unavailable until you fix that function.