Create a tool
Saves an HTTP API tool, an MCP server or a Google Sheets tool that agents can use by id. A secret you put in the tool’s auth is moved into a stored credential and never returned. Send an Idempotency-Key; the ETag is the tool’s version.
Scopes: tool:write
Authorizations
An API key from Settings → API keys, sent as Authorization: Bearer kb_live_…. A workspace key starts kb_; a personal key starts kbp_ and acts as its owner.
Headers
A unique key (a UUID works) for this request. Retrying with the same key returns the first answer instead of running twice.
255The API version to answer as, a date (YYYY-MM-DD). Leave it out for the current version (2026-11-07). An unknown version is refused with 400 unsupported_api_version.
2026-11-07 "2026-11-07"
Body
api, mcp_server, google_sheets 1 - 801 - 500The body of an kind='api' tool (see services.tool_execution for templating).
- ApiToolSchema
- McpToolSchema
- GoogleSheetsToolSchema
Response
Successful Response
The tool's id. Attach it to an agent as tools[].tool_id.
api (an HTTP endpoint), mcp_server or google_sheets.
api, mcp_server, google_sheets The function name the agent calls.
When the agent should use it, in plain words.
A grouping label.
The tool's definition (the schema it was saved with). Secrets are redacted.
Free-form labels.
False when switched off; agents skip it.
Bumped on every change. Send it back as If-Match on a write.
When it was last tested (ISO 8601).
The last test's result: ok, or an error code.
When it was created (ISO 8601).
When it last changed (ISO 8601).
The saved secret it signs in with, if any.
For an MCP server: connected, needs_auth, error or unknown.
The last connection error code, if any.
For an MCP server: {tools, discovered_at, hash, …} from the last discovery.