Create a Policy
create_policyCreate a new policy with target kind, optional target scopes (targetAll/targetLinks/targetQuery), and principal bindings (addPermissions plus at least one principal list; one without the other is an error). Target scopes may be combined; targetAll wins because target="all" applies the policy to every resource. Changing an existing policy: update_policy.
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>",
"targetKind": "<targetKind>"
},
"name": "create_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | No | Organization slug. | |
| name | Yes | Resource name. Immutable: renaming is delete and recreate. | |
| tags | No | Optional tags for the policy (behave like Kubernetes labels for selectors and compliance). | |
| addUsers | No | User links to add (e.g., ["//user/alice"]) | |
| addGroups | No | Group links to add | |
| targetAll | No | Set to true to target all resources of the kind. Pick the target scope that matches intent (combining scopes is legal; target=all wins). | |
| targetKind | Yes | Target resource kind (e.g., "secret", "workload", "identity"). Only the kinds listed by get_permissions (needs `?toolsets=full`) have meaningful permission schemas — confirm permission names there before binding. | |
| description | No | Policy description | |
| targetLinks | No | Target resource links (e.g., ["//secret/my-secret"]). GVC-scoped kinds (workload/identity/volumeset/dbcluster) need the gvc segment: //gvc/GVC/workload/NAME. Pick the target scope that matches intent (combining scopes is legal; target=all wins). | |
| targetQuery | No | Dynamically target resources matching a query (e.g. all secrets tagged env=prod). Pick the target scope that matches intent (combining scopes is legal; target=all wins). | |
| addIdentities | No | Identity links to add (e.g., ["//gvc/my-gvc/identity/my-identity"]). Identities are GVC-scoped — the gvc segment is required. | |
| addPermissions | No | Permissions to grant (e.g., ["reveal", "use"]). For the full list run get_permissions (needs `?toolsets=full`). Secret values need `reveal`, not `read`. | |
| addServiceAccounts | No | Service account links to add (e.g., ["//serviceaccount/sa-1"]) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | The full result. Read this, not only the summary. | |
| details | No | ||
| summary | Yes | ||
| nextSteps | No |