Skip to main content
Glama
naoanao

Safe AI Agent — Guard Checks

by naoanao

Explain Guard Pattern

explain_guard_pattern

Explains a production guard pattern's purpose and basic structure to help you identify and implement the right safeguard against a specific failure.

Instructions

Explain one production guard pattern: what failure it prevents and its minimal shape.

Known patterns: idempotency_key, approval_gate, outbox, key_inventory, circuit_breaker, signed_approval_link.

Input Schema

NameRequiredDescriptionDefault
patternYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses that the tool explains what failure the pattern prevents and its minimal shape, which is useful behavioral context. However, it does not mention error behavior for unknown patterns, case sensitivity, or other operational details.

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?

The description is two sentences, front-loaded with the core purpose and followed by the valid pattern list. Every sentence earns its place with no waste.

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?

Given an output schema exists, the description need not explain return values. It adequately covers the tool's scope and valid inputs. Minor gaps remain around unknown-pattern behavior, but the definition is complete enough for correct invocation.

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?

Schema description coverage is 0%, so the description must compensate. It lists all known pattern values, giving strong semantic meaning to the required 'pattern' parameter. It does not specify exact string format or case sensitivity, but the enumeration is a significant addition beyond the bare schema.

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: 'Explain one production guard pattern'. It also names the known patterns, making the tool's scope concrete. It does not explicitly differentiate itself from sibling tools like check_idempotency_pattern, but the verb 'Explain' implies conceptual explanation rather than validation or auditing.

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

Usage Guidelines3/5

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

Usage is implied by the phrase 'Explain one production guard pattern' and the list of known patterns. However, there is no explicit guidance on when to use this tool versus alternatives such as check_idempotency_pattern or audit_api_keys, nor any exclusions or prerequisites.

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