Update tool approval preferences
PUT/v1/tool-approval-preferences
Updates the tool approval preferences for the authenticated user. You can set per-tool approval modes and specify which tools to disable.
These preferences act as the persisted default for all future invocations. They can be overridden on a per-invocation basis using the toolApprovalOverrides field in the invoke endpoint.
To learn more about tool approval, see tool selection.
Request
Request body schema (JSON)
{
"title": "Body",
"body": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"toolOverrides": {
"description": "A map of tool names to their approval mode. Each key is a tool name and each value is one of `approval` or `automatic`.",
"type": "object",
"additionalProperties": {
"type": "string",
"enum": [
"approval",
"automatic"
]
}
},
"disabledTools": {
"description": "A list of tool names to disable. Disabled tools will not be available to the AI during invocations.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}Responses
- 200
- 500
Default Response
Default Response
Responses (JSON)
{
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"preferences": {
"type": "object",
"properties": {
"toolOverrides": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": [
"approval",
"automatic"
]
},
"description": "A map of tool names to their approval mode. Each key is a tool name and each value is one of `approval` or `automatic`."
},
"disabledTools": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of tool names that are disabled and will not be available to the AI."
},
"updatedAt": {
"description": "The last time the preferences were updated.",
"type": "string",
"format": "date-time"
}
},
"required": [
"toolOverrides",
"disabledTools"
],
"additionalProperties": false
}
},
"required": [
"ok",
"preferences"
],
"additionalProperties": false
}
}
}
},
"500": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"details": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
}
}
}