Skip to main content
Glama

get_diagnostics

Read-onlyIdempotent

Run type checkers (tsc, mypy, pyright) and map reported errors to enclosing AST symbols for code analysis.

Instructions

Execute type-checker (tsc, mypy, pyright) and map errors to enclosing AST symbols. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
checkerNoChecker (tsc, mypy, pyright)
file_pathNoFilter by file path
max_filesNoMax files reported
timeout_msNoTimeout in ms
max_per_fileNoMax errors per file

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.25.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior. The description goes beyond annotations by revealing that the tool invokes external type-checker processes and that its output is a mapping from errors to enclosing AST symbols. It does not mention prerequisites like checker availability or possible slowness, but the core behavioral profile is transparent.

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?

One tight sentence with the action verb front-loaded. Every phrase earns its place: the checker set, the mapping behavior, and the read-only property. No filler or redundant restatement of the tool name.

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 carries the burden of explaining results; 'map errors to enclosing AST symbols' conveys the core return shape. Combined with 100% schema coverage and strong annotations, this is mostly complete, though a hint about failure modes when invoking external checkers would round it out.

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 the schema documents all 5 parameters. The description's mention of the three checkers mirrors the enum and adds no deeper meaning; the filtering and limit parameters are already well-described in the schema. This is the baseline case where 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 uses a specific verb ('Execute') with a concrete resource ('type-checker (tsc, mypy, pyright)') and a distinctive outcome ('map errors to enclosing AST symbols'). This clearly differentiates it from siblings like get_index_health or get_coverage_report, which target different concerns.

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?

No guidance is given about when to choose this tool over the many related get_* siblings (get_index_health, get_coverage_report, get_optimization_report, etc.). The 'Read-only' tag states a property, not a selection criterion; there is no exclusions or alternatives mentioned.

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