Skip to main content
Glama

get_diagnostics

Read-onlyIdempotent

Get type-checker errors grouped by file and mapped to enclosing symbols, using the project's declared checker. Use after edits instead of a build; output is bounded and states what it truncated.

Instructions

Type-checker errors for this project, grouped by file, each mapped to its enclosing symbol. Runs the checker the project already declares (tsc / mypy / pyright) - no new dependency. Use after an edit instead of shelling out to a build: the output is bounded and says exactly what it truncated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
checkerNoForce a checker instead of detecting it.
projectNoProject name/path (default: active).
timeoutNoSeconds before giving up (default 180).
file_pathNoRestrict to one file (suffix match).
max_filesNoFiles reported (default 15).
max_per_fileNoDiagnostics kept per file (default 10).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.24.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The description adds genuinely new behavioral context: it reuses the project's declared checker (no new dependency) and that output is bounded with explicit truncation reporting.

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?

Three sentences, purpose front-loaded, each carrying distinct information (what it returns, how it runs, when to use it). No filler or restated phrasing.

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 usefully covers the return shape (grouped by file, mapped to symbol) and truncation behavior. It could say how to raise the bounds when output is truncated, but for a read-only diagnostic that is a minor gap.

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 100%, so all six parameters are already documented, giving a baseline of 3. The description adds only marginal meaning ('runs the checker the project already declares'), which lightly contextualizes auto-detection but adds no format or syntax detail.

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?

States a specific verb and resource (type-checker errors) plus the output shape (grouped by file, mapped to enclosing symbol). This clearly distinguishes it from near-neighbors like get_git_status or run_impacted_tests, which report different things.

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?

Explicitly says to use it 'after an edit instead of shelling out to a build', which supplies both a trigger and an alternative. It does not state any when-not-to-use condition, so it falls just short of the full 5.

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