Accept an MCP tool's new definition
POST /v1/mcp-servers/{mcp_server_id}/tools/{tool_name}/accept
| Property | Value |
|---|---|
| Operation | accept_mcp_tool_pin |
| Group | MCP servers |
| Scope | mcp:write |
| Route class | control |
| Idempotency | Idempotency-Key accepted: a retry with the same key replays the first answer |
| Audit | Audited mcp.tool.accept (mutation) |
| Released in | 1.60.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Pins the latest listed definition of an allowed tool at the revision If-Match names and answers the registration (1.60.0; mcp-client.md section 3). Agent versions keep the pin they froze: after a contract change the tool stays refused with schema_drift until a new Agent version is published with the accepted pin. A tool the latest listing lacks is not_found, from 1.61.0 with one detail mcp_tool_not_listed at /tool_name that tells it from an unknown registration (a 422 would change the status 1.60.0 answers, ADR 0029 rule 3); one that is not allowed is validation_failed with mcp_tool_not_allowed. Writes an Audit event naming the tool and both digests.
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the mcp:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl -X POST "$VOCAL_API/v1/mcp-servers/mcps_.../tools/<tool_name>/accept" \
-H "Authorization: Bearer $VOCAL_API_KEY" \
-H 'If-Match: "1"' \
-H "Idempotency-Key: $(uuidgen)"const response = await fetch(`${process.env.VOCAL_API}/v1/mcp-servers/mcps_.../tools/<tool_name>/accept`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
'If-Match': '"1"',
'Idempotency-Key': crypto.randomUUID(),
},
});
console.log(response.status, await response.text());import os
import uuid
import requests
response = requests.post(
f"{os.environ['VOCAL_API']}/v1/mcp-servers/mcps_.../tools/<tool_name>/accept",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
"If-Match": '"1"',
"Idempotency-Key": str(uuid.uuid4()),
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mcp_server_id | path | McpServerId | yes | The id of an MCP server registration: mcps_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
tool_name | path | UpstreamToolName | yes | A tool's name as its Connector or MCP server lists it (1.60.0): 1 to 128 letters, digits, _, . and -, the characters an MCP tool name may hold. |
if-match | header | string | yes | The revision the change was made against, quoted as the ETag returns it, or * to overwrite. |
idempotency-key | header | string | no | A client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | McpServer | |
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 | idempotency_in_progress, idempotency_key_reused |
412 | application/json | ErrorEnvelope | revision_mismatch |
422 | application/json | ErrorEnvelope | validation_failed |
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 McpServer.
| Field | Type | Required | Description |
|---|---|---|---|
allowed_tools | array of UpstreamToolName | yes | The tools a Member with mcp:write approved; a tool not listed is never offered to any Agent. |
auth | McpServerAuth | yes | |
authorization_server | string or null | yes | The issuer the client discovered for oauth (RFC 9728, RFC 8414); null before discovery or for other auth. |
connection_id | ConnectionId | yes | The Connection the registration created for its credential. |
created_at | Timestamp | yes | |
default_timeout_ms | integer | yes | |
drift_count | integer | no | How many pinned tools the latest listing found changed or removed (1.61.0): above 0 exactly while status is drift_pending; absent from an api before 1.61.0. |
endpoint | McpEndpoint | yes | |
id | McpServerId | yes | |
last_listed_at | Timestamp or null | yes | |
name | McpServerName | yes | |
object | "mcp_server" | yes | |
organization_id | OrganizationId | yes | |
pins | array of McpToolPin | yes | |
protocol_version | string or null | yes | The negotiated MCP revision; null before the first listing. |
revision | integer | yes | |
status | McpServerStatus | yes | |
updated_at | Timestamp | yes |