writ_policy_env
Read or set an environment's sparse policy override (dev, staging, or prod) to change which verbs are allowed, denied, require a grant, or need step-up. Returns effective policy and provenance.
Instructions
Read or set one environment's sparse policy override (dev, staging, or prod).
With policy empty: GET the override. Returns the gate payload verbatim - the sparse override in policy (only the verbs it explicitly sets; empty with version 0 when never configured), effectivePolicy (the tenant default with the override applied on top, which is what checks naming this environment evaluate against), and policyProvenance naming the winning layer (tenant or environment) per verb.
With policy given: PUT the override. Pass a JSON object string of verb to mode, e.g. '{"refund": "allow"}'. Modes: allow, deny, require_grant, step_up. The override is sparse: only the verbs you send are stored; every other verb keeps inheriting the tenant default. Every successful update bumps the override's version by one; the tenant default's version is untouched. To relax a verb in one environment, set it to "allow".
Args: environment: dev, staging, or prod. Validated client-side; anything else returns an error JSON without calling the gate. policy: JSON object string of verbs to modes, e.g. '{"refund": "allow"}'. Empty string (default) reads instead. Bad JSON, unknown verbs, or unknown modes return an error JSON without calling the gate.
Returns the gate payload verbatim on success; on failure an error JSON with error, status, and detail.
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": {
"environment": "<environment>"
},
"name": "writ_policy_env"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | No | ||
| environment | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |