create_access_policy
Defines workspace access policies that allow or deny users, groups, and agents access to MCP tools or provider models, returning the policy UUID.
Instructions
Create a workspace access policy for users, groups, and agents targeting MCP tools or provider models. Changes who may access those targets. An omitted effect becomes deny only when both user ANY and agent ANY are present; otherwise allow, which requires a specific subject. Returns the policy UUID; use get_access_policy before later updates.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"subjects": "<subjects>",
"targets": "<targets>"
},
"name": "create_access_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Policy name, unique within the workspace (1-64 characters) | |
| effect | No | Allow or deny access; omitted create effect is inferred, while omitted update effect keeps its stored value | |
| enabled | No | Whether the policy is enabled; creates default to true, updates preserve the stored value when omitted | |
| targets | Yes | Complete target list; updates replace the existing targets | |
| subjects | Yes | Complete subject list; updates replace the existing subjects. A side without entries matches requests without that principal | |
| description | No | Policy description; null clears it | |
| workspace_id | No | Workspace UUID or slug; required with an organisation-level API key |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |