Skip to content

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-policies

Auth: Bearer token


Policy values ​

ValueBehavior
allowTool runs without any confirmation prompt, even for tools that normally require approval
askTool always requires explicit user approval before running
blockTool 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 typeKey formatExample
Native Chainabit tool{domain}.{action}bits.delete
Connector toolconnector.{connectorKey}.{toolKey}connector.github.create_issue

Endpoints ​

GET /workspaces/:workspaceId/tool-policies ​

List all tool policies set for the workspace.

Request ​

Path ParameterDescription
workspaceIdWorkspace UUID

Response ​

json
[
  { "workspaceId": "ws-uuid", "toolKey": "bits.delete", "policy": "block" },
  { "workspaceId": "ws-uuid", "toolKey": "connector.github.create_issue", "policy": "ask" }
]

PUT /workspaces/:workspaceId/tool-policies/:toolKey ​

Set or update a tool policy. Creates the row if it does not exist.

Request ​

Path ParameterDescription
workspaceIdWorkspace UUID
toolKeyThe tool key being configured (see Tool key format above)

Request body:

FieldTypeRequiredDescription
policy"allow" | "ask" | "block"YesThe policy to apply

Response ​

200 OK with the updated policy row.

Code Example ​

bash
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 ParameterDescription
workspaceIdWorkspace UUID
toolKeyThe tool key whose policy should be removed

Response ​

204 No Content


Examples ​

bash
# 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

Built with purpose.