create_access_policy
Create a workspace access policy to allow or deny users, groups, and agents access to MCP tools or provider models.
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.
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 |