VocalDocscontracts 1.65.0

Update a Tool

PATCH /v1/tools/{tool_id}

PropertyValue
Operationupdate_tool
GroupTools
Scopetools:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited tool.update (mutation)
Released in1.49.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Replaces the named fields at the revision If-Match names and checks the Tool again as a create does. Published Agent versions keep the copy they froze; the change reaches Calls through the next Agent version publish (FR-agents-7). An archived Tool is refused with tool_archived.

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 PATCH "$VOCAL_API/v1/tools/tool_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"' \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
tool_idpathToolIdyesThe id of a Tool: tool_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
if-matchheaderstringyesThe revision the change was made against, quoted as the ETag returns it, or * to overwrite.

Request body

Content type application/json, required: ToolUpdateRequest.

FieldTypeRequiredDescription
annotationsToolAnnotationsInputno
descriptionstringnoModel-facing: what the Tool does and when to use it.
fillerToolFillerInput or nullno
httpHttpToolConfigInputnoReplaces the request of an http Tool, its auth as HttpToolConfigInput says; refused for a Tool of another type.
idempotentbooleanno
nameToolNameno
parametersToolParametersno
response_schemaToolResponseSchema or nullno
timeout_msintegerno

Responses

StatusContent typeShapeError codes
200application/jsonTool
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopetool_archived
412application/jsonErrorEnveloperevision_mismatch
422application/jsonErrorEnvelopevalidation_failed
428application/jsonErrorEnvelopeprecondition_required
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is Tool.

FieldTypeRequiredDescription
annotationsToolAnnotationsyes
archived_atTimestamp or nullyesWhen 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_atTimestampyes
definition_sha256stringyesThe 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.
descriptionstringyesModel-facing: what the Tool does and when to use it.
fillerToolFiller or nullyes
httpHttpToolConfig or nullyesThe request of an http Tool; null otherwise.
idToolIdyes
idempotentbooleanyes
nameToolNameyes
object"tool"yes
organization_idOrganizationIdyes
parametersToolParametersyes
response_schemaToolResponseSchema or nullyes
revisionintegeryesCounts writes to the Tool; returned as the ETag and required in If-Match.
timeout_msintegeryesThe deadline of one invocation, in milliseconds.
typeToolTypeyes
updated_atTimestampyes