Skip to main content
Glama

lesson_guard_manage

Destructive

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

NameRequiredDescriptionDefault
slugYes
eventNobefore_tool
actionYes
adapterNomcp
triggerNo
deny_payloadNo
allow_payloadNo
owner_confirmNo
expected_revisionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.29.0

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the destructiveHint/readOnlyHint annotations, the description discloses the owner-review gate, the explicit owner_confirm requirement, the 60-second one-shot escape window, that rollback restores a prior proposed contract, and that payload samples are not retained. It also scopes coverage honestly: only adapter=mcp with event=before_tool is supported, and native CLI hooks and shell tools outside this server are not covered — exactly the kind of limitation an agent cannot infer from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence, then each action gets a single dense line with its requirements. Nothing is repeated from the schema or annotations, and the scope caveats are compressed into one closing line. It is telegraphic, but every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter destructive multi-mode tool, the definition covers the action lifecycle, prerequisites, side-effect window, and coverage limits, and an output schema exists so return values need not be described. The remaining shortfall is that slug semantics and the meaning of expected_revision relative to the verified revision are left for the agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage across 9 parameters, the description carries the burden and largely does: it defines the trigger shape {tool,field,operator,value}, names the three operators and their meanings (literal shell-token prefix, relative pattern), explains allow_payload/deny_payload must be complete for verify, and constrains adapter/event. Gaps remain — slug and expected_revision are only indirectly characterized ('the verified revision'), and the action parameter's enum values are never listed as a set.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('manage an owner-reviewed guard for a repeatedly violated lesson') and then enumerates the action modes (propose, verify, activate, escape, retire/rollback), so an agent knows the domain and the operations available. It does not explicitly route read-only inspection to the sibling lesson_guard_status, so sibling differentiation is only implicit through the mutating action list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Each action carries its own prerequisite: verify requires complete allow_payload and deny_payload, activate requires the verified revision plus explicit owner_confirm, escape is a single 60-second one-shot, retire/rollback need owner confirmation. What is missing is a top-level statement of when to reach for this tool at all versus checking lesson_violation or lesson_guard_status first.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools