Skip to main content
Glama

Read the index diagnostics

codetopo_diagnostics
Read-only

Retrieve recorded index diagnostics—dependency cycles, multi-definitions, unresolved calls, and more—as structured data matching CLI output. Provide a database path to query build-time issues.

Instructions

The diagnostics recorded when the index was built - dependency cycles, multi-definitions, unresolved calls, and the rest - as data, exactly as the CLI prints them.

Input Schema

NameRequiredDescriptionDefault
db_pathYesPath to the index database.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds a genuinely non-obvious behavioral fact: these are diagnostics *recorded when the index was built*, i.e. a point-in-time snapshot rather than a live recomputation, and they are returned raw as data mirroring CLI output. It stops short of saying what happens on an index with no diagnostics or how findings are ordered.

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?

One sentence, front-loaded with the key noun and its provenance. The trailing 'and the rest' is slightly vague filler, but the enumeration before it earns its place.

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

Completeness3/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 bears the burden of describing the return value; 'as data, exactly as the CLI prints them' hints at shape and formatting but doesn't say whether results are a list, grouped by severity, or empty when clean. Adequate for an agent to decide to call it, thin for one that must interpret the output.

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?

The single parameter db_path has 100% schema description coverage, so the schema carries the semantics and baseline 3 applies. The description contributes nothing about the path value, though with one self-explanatory required parameter there is little to add.

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 names the resource precisely: diagnostics recorded at index build time, with concrete examples of what they contain (dependency cycles, multi-definitions, unresolved calls). The scope is clear enough to separate it from data-returning siblings like codetopo_stats, though it never explicitly contrasts itself with codetopo_verify, which also sounds diagnostic.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no statement of when an agent should call this rather than codetopo_verify, codetopo_stats, or codetopo_diff, and no preconditions such as requiring an already-built index. The agent must infer usage from the name and the word 'diagnostics' alone.

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