Skip to main content
Glama

getDiagnostics

Read-only

Retrieve real-time errors and warnings from TypeScript, ESLint, Pyright, Ruff, Cargo, Go vet, Biome, or LSP. Filter by file, severity, or result count to diagnose build and code issues.

Instructions

Errors/warnings from TS, ESLint, Pyright, Ruff, Cargo, Go vet, Biome. Real-time LSP when ext connected.

Input Schema

NameRequiredDescriptionDefault
uriNoFilter by file: absolute path, workspace-relative, or file:// URI.
topNNoKeep only top-N diagnostics by severity. Sets truncated:true if reduced.
severityNoMin severity to return. Order: error > warning > information > hint. Use 'error' for build-breaking only.
maxResultsNoMax diagnostics to return (default: 100, max: 500)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.3
    • changedInput schema / properties / maxResults / description
      Previous value: -"Max diagnostics to return (default: 100, max: 2000)"New value: +"Max diagnostics to return (default: 100, max: 500)"
  2. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds a useful behavioral hint that results come from a real-time LSP when the extension is connected, implying a different/more limited path otherwise, but it says nothing about caching, refresh, or what happens when no extension is connected.

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?

Two short, front-loaded fragments that establish the resource and sources immediately with no filler. It is efficient, though the second fragment is terse to the point of being cryptic.

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?

For a simple read-only tool with all parameters documented, the essentials are present, but there is no output schema and the description does not describe the shape of returned diagnostics or ordering, leaving the return contract implicit.

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 four parameters (uri, topN, severity, maxResults) are already fully documented in the schema, including the severity ordering and truncation behavior. The description adds no parameter meaning beyond that, making the baseline 3 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?

Names the resource (diagnostics = errors/warnings) and enumerates the source tooling (TS, ESLint, Pyright, Ruff, Cargo, Go vet, Biome), so an agent knows what it fetches. The verb is only implied ('get' from the name) and it doesn't explicitly distinguish itself from siblings like watchDiagnostics or explainDiagnostic, but the purpose is clear.

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 when-to-use guidance and no mention of alternatives such as watchDiagnostics (streaming) or explainDiagnostic (interpretation). The 'Real-time LSP when ext connected' note is a data-source remark, not a usage condition, so the agent must infer when this is the right call over its many siblings.

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

Deploy Server

Other Tools