Workspace Tool Policies
Control which AI tools are permitted, require approval, or are blocked within a workspace. Policies apply to both Chao sessions and the Chainabit MCP server.
Base path
/api/v1/workspaces/:workspaceId/tool-policiesAuth: Bearer token (workspace member)
Policy values
| Value | Behavior |
|---|---|
allow | Tool runs without any confirmation prompt, even for tools that normally require approval |
ask | Tool always requires explicit user approval before running |
block | Tool is disabled — any attempt to run it returns an error |
| (no row) | Default behavior — follows the tool's built-in requiresApproval flag |
Tool key format
| Tool type | Key format | Example |
|---|---|---|
| Native Chainabit tool | {domain}.{action} | bits.delete |
| Connector tool | connector.{connectorKey}.{toolKey} | connector.github.create_issue |
Endpoints
GET /workspaces/:workspaceId/tool-policies
List all tool policies set for the workspace.
Request
| Path Parameter | Description |
|---|---|
workspaceId | Workspace UUID |
Response
[
{ "workspaceId": "ws-uuid", "toolKey": "bits.delete", "policy": "block" },
{ "workspaceId": "ws-uuid", "toolKey": "connector.github.create_issue", "policy": "ask" }
]GET /workspaces/:workspaceId/tool-policies/effective
Inspect what is in force for every tool Chao can use in this workspace: the rules that apply, the strongest result, the tool's category and the safety floors that no rule waives. Clients use it to show a permissions list; it changes nothing.
Request
| Parameter | Description |
|---|---|
workspaceId (path) | Workspace UUID |
sessionId (query, optional) | A session UUID you own. Includes that session's rules and lists session among the editable scopes. A value that is not a UUID returns 400. |
Response
200 OK (this response is the object itself, with no data envelope):
{
"workspaceId": "ws-uuid",
"sessionId": null,
"precedence": ["block", "ask", "allow"],
"exactKeysOnly": true,
"editableScopes": ["workspace"],
"unsupportedScopes": ["global", "account"],
"rows": [
{
"toolKey": "bits.delete",
"title": "Delete Tasks",
"sensitivity": "destructive",
"effectivePolicy": "ask",
"rules": [
{ "scope": "workspace", "policy": "ask", "inherited": true }
],
"category": "work",
"floors": {
"mutates": true,
"irreversible": true,
"externalMutation": false,
"externalMutationWaivableByAllow": false,
"estimatedCostCredits": 0,
"highCost": false
},
"safetyFloors": [
"Plan mode blocks writes",
"Ask mode confirms writes",
"Destructive or irreversible actions require confirmation",
"Actions with a high estimated credit cost require confirmation",
"Rules never waive authorization, entitlements, budgets, or host safety"
]
}
],
"recentDenials": [],
"recentDenialsSupported": true,
"policyMeaning": "Effective rule is not execution approval. Action-specific safety and run mode are evaluated at dispatch."
}| Field | Description |
|---|---|
precedence | How rules combine, strongest first: a block beats an ask, which beats an allow. |
exactKeysOnly | Rules match an exact tool key; there are no wildcards. |
editableScopes | The scopes you may write now: workspace for workspace owners and admins, plus session when you pass sessionId. |
unsupportedScopes | Scopes that do not exist: global and account. |
highCostCreditFloor | Credits at or above which one call always asks for confirmation. Read the current value from the response. |
recentDenials | Your recent denied tool calls (toolKey, reason, occurredAt). |
Each row describes one tool:
| Row field | Description |
|---|---|
toolKey | The tool key; see Tool key format. |
title | A display name. |
sensitivity | read, write or destructive. |
effectivePolicy | The strongest policy of the rules, or null when no rule applies and the tool's own behavior decides. |
rules | The rules behind it. scope is tool_default, workspace or session; inherited is true for rules you did not set on this session. |
category | What the tool is for, one value from a closed list: work, content, personalization, web, agents_extensions, connectors, workspace, conversation, local_machine or other. other appears only for a stored rule whose tool is not registered right now. |
floors | The facts behind the safety floors, as booleans: mutates (Plan blocks it, Ask confirms it), irreversible (always confirms, whatever a rule says), externalMutation (changes something outside the platform and confirms unless an exact allow waives it, externalMutationWaivableByAllow), estimatedCostCredits and highCost (the estimate reaches highCostCreditFloor). |
safetyFloors | The same floors in words, for clients that show prose. |
Tools that run on a person's own machine are not listed: their client governs them. An effective rule is not an approval: each action is checked again when it runs, and no rule waives authorization, entitlements, budgets or host safety.
Code Example
curl https://api.chainabit.com/api/v1/workspaces/YOUR_WS_ID/tool-policies/effective \
-H "Authorization: Bearer $TOKEN"PUT /workspaces/:workspaceId/tool-policies/:toolKey
Set or update a tool policy. Creates the row if it does not exist.
Request
| Path Parameter | Description |
|---|---|
workspaceId | Workspace UUID |
toolKey | The tool key being configured (see Tool key format above) |
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
policy | "allow" | "ask" | "block" | Yes | The policy to apply |
Response
200 OK with the updated policy row.
Code Example
curl -X PUT https://api.chainabit.com/api/v1/workspaces/YOUR_WS_ID/tool-policies/bits.delete \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"policy": "block"}'DELETE /workspaces/:workspaceId/tool-policies/:toolKey
Remove a tool policy. The tool reverts to its default behavior.
Request
| Path Parameter | Description |
|---|---|
workspaceId | Workspace UUID |
toolKey | The tool key whose policy should be removed |
Response
204 No Content
Examples
# Block a destructive tool workspace-wide
PUT /workspaces/{id}/tool-policies/bits.delete
{ "policy": "block" }
# Require approval before creating GitHub issues
PUT /workspaces/{id}/tool-policies/connector.github.create_issue
{ "policy": "ask" }
# Explicitly allow a tool that has requiresApproval by default
PUT /workspaces/{id}/tool-policies/calendar.create_event
{ "policy": "allow" }
# Remove the policy (back to default behavior)
DELETE /workspaces/{id}/tool-policies/bits.delete