Custom tools
Updated
Let your agent in Agent Studio call your own HTTP endpoints during a conversation.
Preview documentation
Custom tools let your agent call your own HTTP endpoints during a conversation. Use them when you already have an HTTP API and want your agent to call it directly. If you already expose tools through MCP, use an MCP server instead.
Add a tool to an agent
To add a tool:
-
In the agent editor, go to the Integrations section.
-
Select Add, then select Tool.
-
Fill in the following fields:
- Name: The tool name shown to the model. It starts with a letter and contains only letters and digits, up to 64 characters.
- Description: What the tool does, up to 1,024 characters. The model uses it to decide when to call the tool.
- Method:
POSTorGET. - URL: The HTTPS URL of your endpoint, up to 2,048 characters.
- Parameters: A JSON Schema that describes the tool's arguments. See Define the parameters.
- Body: Additional fields to include in the request body, as JSON.
- Headers: The HTTP headers to send, up to 32. Enter one
Name: valueper line. The API key field isn't available yet. - Timeout: The request timeout, from 1,000 to 100,000 ms.
-
Select Save.
After you add the tool, the LLM can call it during test sessions and production conversations.
Define the parameters
The Parameters field tells the LLM which arguments to pass when it calls the tool. For example, the following parameters define a tool that looks up an order:
{
"type": "object",
"properties": {
"order_id": { "type": "string" },
"include_history": { "type": "boolean" }
},
"required": ["order_id"]
}Prompting tips
Put usage guidance in your system prompt. For example:
Use lookup_order when the user asks about order status. Always confirm the order ID before calling the tool.Troubleshooting
The following table lists common issues with custom tools:
| Issue | Solution |
|---|---|
| The tool doesn't save | Check the JSON Schema and the tool name format. |
| Your API rejects the request | Check the headers, the request body, and the parameters. |
| The agent never calls the tool | Make the tool's intent clear in its description and in the system prompt. |
Next steps
- MCP servers: Let your agent call tools from an MCP server.
- Customize your agent: Configure your agent in the editor.
- Test your agent: Verify tool calling end to end.
