Skip to main content
Glama

explain_validation

Get actionable explanations for validation issues returned by validate_code. Call with each ruleId, read the cited docs, apply the fix, and re-run validation.

Instructions

WHEN: validate_code returned issues. HOW: call once per unique ruleId from the result, read the cited rule/docs, apply the fix, then re-run validate_code. Part of the fix loop — do not guess fixes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleIdYesruleId from validate_code issues. Call for each unique id in the fix loop.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A4/5.0
Behavior4/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 clearly frames the tool as an explanatory step in a loop, indicates that it surfaces cited rules/docs, and warns against guessing fixes, implying it is read-oriented rather than a mutating fixer. It does not describe the exact return format or side-effect profile, but for a one-parameter explainer that is a minor gap.

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 compact, front-loaded with WHEN/HOW, and every sentence contributes actionable guidance. It avoids redundancy and clearly sequences the call within the broader fix loop.

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 simple one-parameter tool in a clear workflow, the description covers when to call it, how often, what to do with the output, and what to do next. It does not describe the output schema or edge cases, but the absence of an output schema and the low complexity make this acceptable.

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 coverage is 100%, so the schema already documents ruleId well. The description reinforces the key semantics—'once per unique ruleId from the result'—but adds little beyond what the schema description already says. This meets the baseline but does not exceed it.

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 identifies the context (validate_code returned issues) and the resource (unique ruleId), and the name 'explain_validation' makes the core function clear. It does not explicitly state 'returns an explanation of the rule/docs for a validation issue,' but the workflow makes that inferable. It distinguishes itself from validate_code and generic search tools by tying it to the fix loop.

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?

The description gives an explicit WHEN ('validate_code returned issues') and HOW (call once per unique ruleId, read cited rule/docs, apply fix, re-run validate_code). It also says not to guess fixes, which is an implicit exclusion. It does not explicitly compare against sibling tools like read_rule or explain_topic, so it stops short of a perfect 5.

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