Skip to main content
Glama

diagnostics

Retrieve current errors and warnings for a file, or for all open files with issues. Waits for fresh results after recent edits.

Instructions

Get current diagnostics (errors, warnings) for a file. If no file is specified, returns diagnostics for all currently open files with issues. Waits for fresh results after recent edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoRelative file path (optional — omit for all currently open files with diagnostics)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses the freshness guarantee ('Waits for fresh results after recent edits') and the scoping behavior. It does not explicitly state that the operation is read-only, but 'Get' strongly implies it.

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?

Two tightly written sentences with no filler, and the most important behavior is front-loaded in the first sentence. Every clause earns its place.

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 single-optional-parameter read-only tool, the description covers scope, return content, and the freshness behavior. There is no output schema, so a more detailed return structure would be a nice addition, but it is not required to invoke the tool correctly.

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 baseline is 3. The description largely repeats the schema's optional file path semantics and adds only the 'errors, warnings' context, which is already in the description.

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 ('Get') and resource ('current diagnostics (errors, warnings) for a file'), and clarifies the optional all-open-files variant. It is unambiguous and distinct from the sibling navigation and editing tools.

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?

It states the parameter-dependent behavior: a file argument targets one file, while omitting it returns diagnostics for all open files with issues. There are no diagnostic-gathering siblings, so no alternatives are needed, but it doesn't explicitly state when not to use it.

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