Create a tool

View as Markdown
Create a reusable tool in the org Tools library. Two types are supported: `api_call` and `client_tool` (system tools like transfer/end-call are configured per-agent, not here). Reference it from an agent by adding its returned `toolId` to `toolRefs` on the agent config. Referencing a tool makes it available; it does not force use. The agent only calls a tool when its prompt tells it to, so describe the tool's purpose and when to trigger it in the agent's prompt.

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Request

This endpoint expects an object.
definitionobjectRequired

The tool body — the same shape used inside an agent’s tools[] (discriminated on type). api_call is the most common; client_tool and the built-in types are also valid.

Response

Tool created.
statusbooleanOptional
dataobjectOptional

A tool in the org-level Tools library. Referenced from agents by toolId (see toolRefs on the agent config). Editing a library tool propagates to every agent that references it.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error