Skip to main content
Glama

diagnostics

Retrieve errors and warnings for a single file from its language server, including cross-file checks for CSS custom properties and selectors.

Instructions

Get the relevant language server's diagnostics (errors/warnings) for a single file.

For .css/.html files, this also includes index-derived warnings the single-file language server can't see: var(--x) used with no matching declaration anywhere in the same indexed root, and CSS selectors (#id/.class) with no HTML/JS reference in that root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior3/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 does disclose one genuinely non-obvious trait — that CSS/HTML results include index-derived warnings the single-file language server cannot see — but says nothing about read-only nature, latency/freshness, whether the file must be open, or the shape of results.

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 short paragraphs, front-loaded with the core purpose, and the second paragraph is dense with information that is not available anywhere else in the definition. No filler sentences.

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 one-parameter, low-complexity query tool this is nearly sufficient, and the tricky CSS/HTML case is covered. Since no output schema exists, the description could have said more about the returned diagnostics, and the absence of annotations leaves the read-only/safety profile unstated.

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 0% for the single required parameter, so the description has to compensate. 'For a single file' usefully implies file_path takes one path (no globs or multi-file input), but path format (absolute vs relative vs URI) is left unstated.

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 ('Get the relevant language server's diagnostics (errors/warnings)') plus an explicit scope ('for a single file'), which is enough to separate it from the workspace-level sibling without opening either schema. The CSS/HTML addendum further pins down what 'diagnostics' means for those file types.

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?

The 'single file' scoping implies the contrast with the `workspace` sibling, and the CSS/HTML clause frames when the extra index-derived warnings appear, but usage is only implied. There is no explicit statement of when to prefer this over `workspace`, nor any exclusion or precondition (e.g., file must be open/indexed).

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