Skip to content
Set a World override

Set a World override

Set one tool's policy for every user in a World.

PUT/api/v1/worlds/:worldId/tool-policies/:integration/:toolName

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/worlds/01995e56-e2d4-7f19-b691-7bf9af6abdc8/tool-policies/acme/get_order", {
  method: "PUT",
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
  body: JSON.stringify({
  "policy": "ask"
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();

Use your server-side apiKey. Replace the example IDs.

Path parameters#

worldIdUUIDrequired

The World ID shown in the dashboard.

integrationstringrequired

An integration key from GET /integrations, such as github or notion.

toolNamestringrequired

The integration's own tool name, as toolName in GET /tool-policies and in tool calls. URL-encode it.

Request body#

policystringrequired

allow runs the tool without asking, ask waits for an approval, and deny hides the tool from agents. To remove the override, use DELETE.

Responses#

Returns integration, toolName, policy (the setting at this level: allow, ask, deny, or inherit when there is no override), effectivePolicy (allow, ask, or deny), and source: integration_default, world_override, group_override, user_override, workspace_hidden, group_hidden, or disabled.

200 response
{
  "integration": "acme",
  "toolName": "get_order",
  "policy": "ask",
  "effectivePolicy": "ask",
  "source": "world_override"
}
More about this endpoint

The override applies to the next tool call. deny hides the tool in this World, also for users with their own override.

A tool the workspace hides stays hidden: the override is saved, and the response shows effectivePolicy deny with source workspace_hidden.

A call already waiting for approval keeps waiting. If the tool is now hidden, approving it returns approval_policy_denied.