Create a control rule
create_ruleCreates a rule with a client-generated UUID. Setting enabled applies it immediately. Read rules again to inspect effective policy. Requires the controls:write scope. Supply idempotency_key and reuse it with identical arguments on retries.
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": {
"config": "<config>",
"id": "<id>",
"kind": "<kind>",
"scope": "<scope>"
},
"name": "create_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Client-generated UUID for this new rule. | |
| kind | Yes | ||
| name | No | Display name; null clears it. | |
| scope | Yes | Use org for organization-wide scope; projects requires project_uuids. IDs must belong to the caller's organization. roles (role_names) and members (member_uuids) are only for comply budget rules: a monthly cap on each member's personal-key spend, where a member's own cap wins over their role's. | |
| config | Yes | Config for the rule kind. Replaces the full config on update. Read existing rules and get_rule_vocabulary before changing it; organization constraints remain in force. Use schema_version=4 for model lists: models and exclude_models name model keys, endpoints and exclude_endpoints name endpoint ids; use 5 only when exclude_models/exclude_endpoints hold "*" wildcards or the rule has except_models/except_endpoints; schema_version=2 remains supported for provider company allowlists. Opper retention_days and upstream handling.max_retention_days are separate controls. Each anyOf branch is one rule type's exact schema without field descriptions, titled by its id; get_rule_vocabulary rule_schemas has each id with descriptions and a validated example. Read the one you need before writing config. | |
| enabled | No | Whether the rule is enforced. Omitted on create means false. | |
| schema_version | No | Config schema version. Omit on create for version 1. Version 2 comply allowlists identify providers by company slug. Use 4 for model lists (models and exclude_models name model keys, endpoints and exclude_endpoints name endpoint ids), and 5 only when exclude_models or exclude_endpoints hold "*" wildcards or the rule has except_models or except_endpoints. | |
| idempotency_key | No | Generate a unique operation ID (for example UUID) before creation. Reuse it and the exact original arguments after a timeout or uncertain result; never generate a new ID merely to retry. A changed payload or deleted original resource returns 409. Key replays return metadata without the raw secret. | |
| confirm_file_deletion | No | Deprecated and ignored: no rule deletes stored files. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | No | Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`. |