Skip to main content
Glama

explainDiagnostic

Read-only

Inspect diagnostic details with surrounding code context, jump to definition, and see up to 5 callers at a specific file position. Resolve errors faster by understanding the code relationships.

Instructions

Bundle diagnostic details + code context (±10 lines) + go-to-definition + callers (up to 5) for a file/line/character position.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesWorkspace or absolute file path
lineYesLine number (1-based)
characterYesCharacter/column (1-based)
Behavior4/5

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

The description adds valuable behavioral context beyond the readOnlyHint annotation, specifying that it includes ±10 lines of code context, go-to-definition, and up to 5 callers. This clarifies the extent of information returned without contradicting the annotation.

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 a single, front-loaded sentence that conveys all essential information without wasted words. Every element (bundle, code context, go-to-definition, callers) is clearly stated and earns its place.

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?

Without an output schema, the description adequately explains the return value (diagnostic details, code context, go-to-definition, callers). It covers the essential aspects for a moderately complex tool, though it could benefit from mentioning whether the diagnostics are from all sources or only linting/errors.

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% with clear descriptions for all three parameters. The description mentions 'file/line/character position' but does not significantly enhance the schema's meaning. The addition of 'code context' and other bundled items is more about output than parameters.

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 clearly states that the tool bundles diagnostic details, code context, go-to-definition, and callers for a specific file/line/character position. It uses a specific verb 'Bundle' and resource 'diagnostic details + code context + go-to-definition + callers', distinguishing it from similar siblings like 'explainSymbol' or 'getHover'.

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?

The description implies usage for file/line/character positions but does not explicitly state when to use this tool versus alternatives. No exclusions or sibling comparisons are provided, leaving the AI agent to infer the context from the description and sibling list.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Oolab-labs/patchwork-os'

If you have feedback or need assistance with the MCP directory API, please join our Discord server