Skip to main content
Glama

Explain a rule

explain_rule
Read-onlyIdempotent

Retrieve a CES rule's pattern, rationale, replacement strategy, exceptions, before/after example, and checker tokens by providing its rule ID.

Instructions

Show the full text of one CES rule: the pattern, why it is a tell, the replacement strategy, exceptions, a before/after example, and the tokens the checker uses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleIdYesA rule ID such as CES-C-008.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
nameYes
ratingYes
tokensYes
exampleNo
categoryYes
detectorNo
severityYes
exceptionNo
suggestionYes
descriptionYes
enabledByDefaultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and a closed world, so the safety profile is covered. The description goes beyond that by disclosing the content shape of the result (pattern, rationale, strategy, exceptions, example, tokens), which tells an agent what this call is useful for. It stops short of saying what happens on an unknown rule ID.

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?

One sentence, front-loaded with the action and scope, followed by a compact enumeration of payload contents. No filler, no restatement of the name or title.

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?

With one required parameter, read-only annotations, and an output schema that carries the return structure, the description is nearly sufficient as written. The only omission is how an agent obtains a valid rule ID (presumably via list_rules) and behavior for an invalid ID, which is a minor gap for a simple lookup tool.

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

Parameters3/5

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

Schema description coverage is 100% with a single required ruleId whose format is already documented ("A rule ID such as CES-C-008."). The description adds only the implication that the ID resolves to exactly one rule; no additional format, casing, or lookup guidance is supplied. Baseline 3 applies.

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

Purpose5/5

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

States a specific verb ("Show") and a precisely scoped resource ("the full text of one CES rule"), then enumerates exactly what that text contains: pattern, rationale, replacement strategy, exceptions, example, and checker tokens. The word "one" implicitly contrasts with the sibling list_rules, so an agent can distinguish the two without opening either schema.

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 only implied: fetching a single rule's detail versus list_rules for enumeration. There is no explicit when-to-use statement, no statement of prerequisites (e.g., needing a rule ID from list_rules), and no condition that selects this over fix_text or check_text. Adequate but leaves routing to inference.

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