Skip to main content

create_custom_tool

Create a new custom tool by its caller-relative name. A standalone personal credential uses a bare name. In organization scope, use me/name for the represented member's private space or <team>/name for a bound team. An unprefixed organization-scoped name denotes the shared organization catalogue, which is currently read-only over MCP. To change an existing tool, use update_custom_tool.

You define the connector and its authentication type, but not the secret. A tool that needs authentication is created disabled; a person adds its credential and enables it in the dashboard (see secrets stay in the dashboard).

Parameters​

ParameterTypeRequiredDescription
namestringYesCaller-relative address: bare with a standalone personal credential, me/name in private organization space, or <team>/name for a bound team.
descriptionstringNoWhat the tool does — shown to the agent that uses it.
connectorobjectYesThe HTTP connector definition (see below). No secret — set that in the dashboard.

The connector object:

FieldTypeRequiredDescription
http_methodstringYesGET, POST, PUT, PATCH, or DELETE.
url_templatestringYesURL template. {name} placeholders are filled from the tool's arguments (one path segment each).
input_schemaobjectYesJSON Schema (an object) describing the tool's arguments.
headersobjectNoHeader name → value template. Defaults to none.
body_templatestringNoRequest-body template.
authobjectNoAuthentication scheme (type only). Defaults to { "type": "none" }.

The auth object is one of: { "type": "none" }, { "type": "bearer" }, { "type": "basic" }, or { "type": "header", "header_name": "X-Api-Key" }. The secret itself is added in the dashboard.

Response​

FieldTypeDescription
namestringCanonical caller-relative address of the created tool.
idstringThe new tool's identifier.
enabledbooleanWhether the tool is active. false when it needs a secret you haven't set yet.

Example​

{
"name": "weather",
"description": "Fetch the current weather for a city",
"connector": {
"http_method": "GET",
"url_template": "https://api.example.com/weather/{city}",
"input_schema": {
"type": "object",
"properties": { "city": { "type": "string" } },
"required": ["city"]
},
"auth": { "type": "bearer" }
}
}

Result (created disabled — it uses bearer auth and has no secret yet):

{
"name": "weather",
"id": "018f...c2a1",
"enabled": false
}

Errors​

Each failure carries a precise code in the response. A domain rejection — a name clash, a limit, or a permission denial — is returned as a tool result with isError: true, so the agent can read the code and self-correct; malformed arguments and server faults are JSON-RPC protocol errors.

CodeCauseDelivered as
custom_tool_name_takenA custom tool with this name already exists in the target space.tool error (isError)
invalid_custom_tool_nameThe name is invalid.tool error (isError)
name_too_longThe name exceeds its maximum length.tool error (isError)
description_too_longThe description exceeds its maximum length.tool error (isError)
invalid_connectorThe connector is invalid (bad method, URL template, header, or input schema).tool error (isError)
custom_tool_limit_reachedYour plan's custom-tool limit has been reached.tool error (isError)
team_not_foundNo team with that name is bound to this credential.tool error (isError)
forbiddenThe credential lacks create authority, uses me/ outside organization scope, or targets the read-only organization catalogue.tool error (isError)
empty_nameThe name is empty after removing the team prefix.tool error (isError)
personal_cannot_address_teamYou used a team/ prefix (or team field) with a personal credential.tool error (isError)
no_personal_spaceA userless organization credential used me/name.tool error (isError)
invalid_argumentsThe arguments are missing or don't match the input schema.protocol error (invalid_params)
internal_errorAn unexpected error occurred.protocol error (internal_error)

Notes​

  • A tool using auth: { "type": "none" } needs no dashboard secret; its initial enabled state follows the owner's default setting. Any other auth type creates the tool disabled; a person must add its secret and enable it in the dashboard. A credential can call either kind only when the access model makes it reachable.
  • Creating a custom tool counts as one tool call against your plan's tool-invocation allowance.