Skip to main content
Glama

get_diagnostics

Read-onlyIdempotent

Run type-checkers (tsc, mypy, pyright) to identify errors and map each diagnostic to its enclosing AST symbol for precise 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
reduce_outputNoShrink long output to a receipt

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.31.0
    • addedInput schema / properties / reduce_output
      Added value: +{
      +  "description": "Shrink long output to a receipt",
      +  "type": "boolean"
      +}
  2. 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 adds value by disclosing that external type-checkers are executed and that results are mapped to enclosing AST symbols. It also explicitly repeats the read-only trait, consistent with annotations.

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 sentence with no filler. Every clause carries meaning: the action, the specific checkers, the result transformation, and the safety characteristic.

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?

For a tool with no output schema, the description gives a useful sense of what happens and what the result is about (errors mapped to AST symbols). Parameter details are fully covered by the schema. It stops short of describing the exact return shape or the effect of reduce_output, but it is adequate for selection and invocation.

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. The description adds minimal parameter meaning beyond listing the same type-checker names found in the enum, so the baseline of 3 is appropriate.

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 uses a specific verb and resource: execute type-checkers (tsc, mypy, pyright) and map errors to enclosing AST symbols. It clearly identifies what the tool does, even though it does not explicitly contrast itself with sibling tools.

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?

Usage context is implied: an agent can infer to use this tool when type-checking diagnostics are needed. However, there is no explicit guidance about when to choose this over alternatives like get_index_health, get_coverage_report, or get_optimization_report, and no exclusions are stated.

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