Skip to main content
Glama

Explain a rule

yof_explain
Read-onlyIdempotent

Explain one yof rule in plain words: what it means, why it matters, how urgent it is, the safe fix and its CWE and OWASP references. Use it to understand a finding from yof_findings; use yof_fix_prompt instead for step-by-step instructions for one finding. Reads yof's rule list only, no account data; an unknown rule id is an error. Returns rule, title, why, severity, safe_fix and standards.

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": {
      "rule_id": "<rule_id>"
    },
    "name": "yof_explain"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoLanguage of the rule titles and plain-word text, as a two-letter code. Default en.
rule_idYesThe rule id exactly as a finding shows it.

Output Schema

NameRequiredDescriptionDefault
whyNoWhy it matters.
ruleNoRule id.
errorNoOnly on a failed call (isError true): what went wrong.
titleNoReadable rule name.
safe_fixNoThe safe way to fix it.
severityNofix_now, fix_week, nice or info.
standardsNoCWE, OWASP and CVSS references, when the rule has them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / lang / description
      Previous value: -"The language of the plain words (default en)."New value: +"Language of the rule titles and plain-word text, as a two-letter code. Default en."
    • changedInput schema / properties / rule_id / description
      Previous value: -"The rule id of a finding."New value: +"The rule id exactly as a finding shows it."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "error": {
      +      "description": "Only on a failed call (isError true): what went wrong.",
      +      "type": "string"
      +    },
      +    "rule": {
      +      "description": "Rule id.",
      +      "type": "string"
      +    },
      +    "safe_fix": {
      +      "description": "The safe way to fix it.",
      +      "type": "string"
      +    },
      +    "severity": {
      +      "description": "fix_now, fix_week, nice or info.",
      +      "type": "string"
      +    },
      +    "standards": {
      +      "description": "CWE, OWASP and CVSS references, when the rule has them.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "title": {
      +      "description": "Readable rule name.",
      +      "type": "string"
      +    },
      +    "why": {
      +      "description": "Why it matters.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With readOnlyHint, idempotentHint and openWorldHint already declared, the description still adds genuinely new behavior: it operates only on yof's static rule list and touches no account data, and an unknown rule id is an error rather than an empty result. That error-mode disclosure is exactly the kind of context annotations cannot express; only the lack of any note about the localized text fallback keeps it from a 5.

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

Conciseness4/5

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

Three tightly packed sentences, correctly front-loaded with the purpose before the routing rule and the data-scope caveat. The trailing enumeration of return fields (rule, title, why, severity, safe_fix, standards) is mildly redundant against the existing output schema but is short enough to be defensible.

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

Completeness5/5

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

For a simple two-parameter read tool with an output schema and full annotation coverage, the description covers everything an agent needs: what it returns, what data it touches, what an invalid input does, and which sibling to use for the adjacent task. Nothing material is missing.

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% and the schema already explains that rule_id is "the rule id exactly as a finding shows it" and that lang is a two-letter code defaulting to en, so the description adds little parameter meaning beyond it. Baseline 3 applies when the schema does the heavy lifting.

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?

The description states a specific verb and resource ("Explain one yof rule in plain words") and enumerates what the explanation contains: meaning, why it matters, urgency, safe fix, and CWE/OWASP references. It explicitly distinguishes itself from yof_fix_prompt, so an agent can route correctly without reading 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 Guidelines5/5

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

It gives an explicit when-to-use ("Use it to understand a finding from yof_findings") and an explicit alternative with its condition ("use yof_fix_prompt instead for step-by-step instructions for one finding"). The exclusion is stated rather than inferred.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.