Set control policy
stack_set_control_policyCreate or revise a policy, for one agent or, without agent_id, the account's default. definition holds connections (which connections a call may use, with allow, review or deny rules), actions (a stance per action kind), recipients (allowed email addresses, texts and calls: each a list, or "per_mission"), spend (a ceiling per action, counters per day, month or Mission, and concurrency), review (hold above an amount) and surfaces (models, browser, card, wallet, workspace and tools). A section left out places no limit. A policy only narrows what a connection grant already allows: it refuses, holds an action for a person, or limits it, and never opens anything. Controls must be on, else CONTROLS_NOT_ENABLED. A rule that allows a send without naming who receives it fails with UNBOUNDED_SEND_RULE: bind the recipient fields in the rule, or set the rule's recipients to "per_mission" so each Mission names them. Recipients set per job: a connection rule with effect allow set to "per_mission" allows a send only in a Mission that names the recipients exactly (recipients, recipient_pins or reply_to_message when the Mission opens), and only to them. A Mission that does not name them is refused with recipients_not_pinned; a send to someone it did not name is refused with recipient_not_allowed. A delegated Passport carries the same Mission, so these rules apply to it too. The account's own recipients.email, recipients.sms and recipients.call may also be "per_mission": a send, text or call then names the stored message it answers (reply_to_message) and goes only to whoever wrote that message (a reply with reply_all also reaches the original's own To and Cc). One that names no message is refused with recipients_not_pinned, a recipient other than the sender with recipient_not_allowed, and an id that is not one of the account's received messages with NOT_FOUND. Changing a list to "per_mission", or back, is a loosening; setting "per_mission" where there was no rule is a tightening. Operator only. Tightening applies at once. Loosening a policy, and deleting one, needs the person to approve it in their browser, never in the chat: the call fails with GOVERNANCE_APPROVAL_REQUIRED, approval_id and approval_url, the page where they approve that one change, and the same call sent with governance_approval_id after approval applies it. The tool never waits or loops for the approval. An approval is single-use, bound to the exact request, and expires after 24 hours. Returns change (create, tighten, loosen or unchanged) and the 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": {
"definition": "<definition>"
},
"name": "stack_set_control_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | No | The agent (agt_*) whose own policy this is. Omit for the default policy, which applies to every agent account without a policy of its own. | |
| definition | Yes | ||
| expected_revision | No | The revision you read. Required to revise a policy; leave out to create one. A stale revision fails with a conflict. | |
| governance_approval_id | No | Approval id (gvr_*) from a GOVERNANCE_APPROVAL_REQUIRED response, once the person approved it in their browser |