Custom tools

Updated

Let your agent in Agent Studio call your own HTTP endpoints during a conversation.

Preview documentation

You're reading the Conversational AI Platform (Preview) docs. Switch to Main.

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:

  1. In the agent editor, go to the Integrations section.

  2. Select Add, then select Tool.

  3. 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: POST or GET.
    • 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: value per line. The API key field isn't available yet.
    • Timeout: The request timeout, from 1,000 to 100,000 ms.
  4. 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:

IssueSolution
The tool doesn't saveCheck the JSON Schema and the tool name format.
Your API rejects the requestCheck the headers, the request body, and the parameters.
The agent never calls the toolMake the tool's intent clear in its description and in the system prompt.

Next steps