Skip to main content
Glama

explain_finding

Read-onlyIdempotent

Render a finding as a markdown teaching card with location, marked code, explanation, reproduction, fix trade-offs, lesson, and evidence; choose junior or senior detail.

Instructions

Render the teaching card for a finding as markdown: where (file:line, function, introducing commit), the code with the bad line marked >>, what, why, repro, fix options with trade-offs, lesson and evidence. level: "junior" (adds key concepts) or "senior" (terse). If why / fix_options / lesson are missing, the card ends with a "TODO for Claude" section: fill those via update_finding, then call this again. Show the card to the user as-is.

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": {
      "repo": "<repo>",
      "finding_id": "<finding_id>"
    },
    "name": "explain_finding"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYes
levelNojunior
finding_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds genuinely useful behavior: the exact card sections, the '>>' bad-line marking, and the 'TODO for Claude' fallback when fields are missing, which tells the agent what to expect on incomplete data.

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?

The output structure and level behavior are front-loaded, and every clause conveys real information. The long enumeration of card sections is dense but earns its place since no output schema exists.

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 no output schema, the description responsibly documents the return shape and edge-case behavior (missing fields, level variants). It is nearly complete; only the repo and finding_id parameters lack any contextual explanation.

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 0%, so the description must carry parameter meaning. It does explain level well ('junior' adds key concepts, 'senior' terse) and supplies valid values the schema lacks, but repo and finding_id are left entirely to the schema with no added semantics.

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 opens with a specific verb and resource: 'Render the teaching card for a finding as markdown'. It clearly distinguishes this from get_finding and update_finding by naming the markdown teaching-card output and describing its exact structure.

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?

It gives strong workflow guidance: fill missing why/fix_options/lesson via update_finding and then call this again, and show the card as-is. It doesn't explicitly exclude or contrast with get_finding or list_findings, which keeps it just short of a 5.

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