Archive a Tool
DELETE /v1/tools/{tool_id}
| Property | Value |
|---|---|
| Operation | archive_tool |
| Group | Tools |
| Scope | tools:write |
| Route class | control |
| Idempotency | No Idempotency-Key |
| Audit | Audited tool.archive (mutation) |
| Released in | 1.49.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Archives the Tool at the revision If-Match names and answers it with archived_at set. Nothing is deleted: the Agent versions that froze it keep running their copy, and it can still be read. An archived Tool cannot be attached, updated or tested (tool_archived), and its name is free again.
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the tools:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl -X DELETE "$VOCAL_API/v1/tools/tool_..." \
-H "Authorization: Bearer $VOCAL_API_KEY" \
-H 'If-Match: "1"'const response = await fetch(`${process.env.VOCAL_API}/v1/tools/tool_...`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
'If-Match': '"1"',
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.delete(
f"{os.environ['VOCAL_API']}/v1/tools/tool_...",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
"If-Match": '"1"',
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tool_id | path | ToolId | yes | The id of a Tool: tool_ 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. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | Tool | |
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 | tool_archived |
412 | application/json | ErrorEnvelope | revision_mismatch |
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 Tool.
| Field | Type | Required | Description |
|---|---|---|---|
annotations | ToolAnnotations | yes | |
archived_at | Timestamp or null | yes | When DELETE archived the Tool, or null. An archived Tool takes no write and no test (409 tool_archived) and cannot be attached; the Agent versions that froze it keep running it. |
created_at | Timestamp | yes | |
definition_sha256 | string | yes | The SHA-256 of the canonical definition without the auth secret, in lowercase hex; equal to a PinnedTool's when the Agent version froze this revision's definition. |
description | string | yes | Model-facing: what the Tool does and when to use it. |
filler | ToolFiller or null | yes | |
http | HttpToolConfig or null | yes | The request of an http Tool; null otherwise. |
id | ToolId | yes | |
idempotent | boolean | yes | |
name | ToolName | yes | |
object | "tool" | yes | |
organization_id | OrganizationId | yes | |
parameters | ToolParameters | yes | |
response_schema | ToolResponseSchema or null | yes | |
revision | integer | yes | Counts writes to the Tool; returned as the ETag and required in If-Match. |
timeout_ms | integer | yes | The deadline of one invocation, in milliseconds. |
type | ToolType | yes | |
updated_at | Timestamp | yes |