Update a Tool binding
PATCH /v1/tool-bindings/{tool_binding_id}
| Property | Value |
|---|---|
| Operation | update_tool_binding |
| Group | Tool bindings |
| Scope | integrations:write |
| Route class | control |
| Idempotency | No Idempotency-Key |
| Audit | Audited integrations.tool_binding.update (mutation) |
| Released in | 1.60.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Replaces the bound tools at the revision If-Match names, checked as a create is (1.60.0). A tool still bound keeps its tool_id. Published Agent versions keep the copy they froze; the change reaches Calls through the next publish.
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the integrations:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl -X PATCH "$VOCAL_API/v1/tool-bindings/tbd_..." \
-H "Authorization: Bearer $VOCAL_API_KEY" \
-H 'If-Match: "1"' \
-H "Content-Type: application/json" \
-d '{
"tools": [
{
"tool": "<tool>"
}
]
}'const response = await fetch(`${process.env.VOCAL_API}/v1/tool-bindings/tbd_...`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
'If-Match': '"1"',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"tools": [
{
"tool": "<tool>"
}
]
}),
});
console.log(response.status, await response.text());import os
import requests
response = requests.patch(
f"{os.environ['VOCAL_API']}/v1/tool-bindings/tbd_...",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
"If-Match": '"1"',
},
json={
"tools": [
{
"tool": "<tool>",
},
],
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tool_binding_id | path | ToolBindingId | yes | The id of a Tool binding: tbd_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
if-match | header | string | yes | The revision the change was made against, quoted as the ETag returns it, or * to overwrite. |
Request body
Content type application/json, required: ToolBindingUpdateRequest.
| Field | Type | Required | Description |
|---|---|---|---|
tools | array of ToolBindingToolInput | yes |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | ToolBinding | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden, org_suspended |
404 | application/json | ErrorEnvelope | not_found |
409 | application/json | ErrorEnvelope | connection_revoked |
412 | application/json | ErrorEnvelope | revision_mismatch |
422 | application/json | ErrorEnvelope | validation_failed, capability_not_available |
428 | application/json | ErrorEnvelope | precondition_required |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is ToolBinding.
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | AgentId | yes | |
binding_sha256 | Sha256Hex | yes | The digest of the canonical binding (toolBindingSha256Source), which a frozen copy and a grant name. |
connection_id | ConnectionId | yes | |
connector_id | ConnectorId or null | yes | |
connector_version | string or null | yes | The manifest version the tools were pinned from; null for an MCP server. |
created_at | Timestamp | yes | |
id | ToolBindingId | yes | |
mcp_server_id | McpServerId or null | yes | |
object | "tool_binding" | yes | |
organization_id | OrganizationId | yes | |
origin | ConnectionOrigin | yes | |
revision | integer | yes | |
tools | array of ToolBindingTool | yes | |
updated_at | Timestamp | yes |