lesson_guard_manage
Create, verify, activate, and retire owner-approved guards that deny repeat policy-violating MCP tool calls, with rollback and a 60-second escape option.
Instructions
Manage an owner-reviewed guard for a repeatedly violated lesson.
propose: trigger={tool,field,operator,value}; operators are equals, command_prefix (literal shell-token prefix), path_glob (relative pattern). verify: provide complete allow_payload and deny_payload for the target tool. activate: requires the verified revision and explicit owner_confirm. escape: owner-confirm one exact deny_payload once, for 60 seconds. retire/rollback: owner-confirm; rollback restores a proposed prior contract. Only adapter=mcp,event=before_tool is supported. Native CLI hooks and shell tools outside this server are not covered. Payload samples are not retained.
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": {
"action": "<action>",
"slug": "<slug>"
},
"name": "lesson_guard_manage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | ||
| event | No | before_tool | |
| action | Yes | ||
| adapter | No | mcp | |
| trigger | No | ||
| deny_payload | No | ||
| allow_payload | No | ||
| owner_confirm | No | ||
| expected_revision | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |