Skip to main content
Glama

get_diagnostics

Retrieve errors, warnings, and code hints for a file or workspace to check syntax and type issues after edits or during refactoring.

Instructions

Retrieve errors, warnings, and code hints for a file or the whole workspace. Use to check syntax/type errors after edits, before and after refactoring.

Input Schema

NameRequiredDescriptionDefault
limitNo
line_endNo
severityNo
file_pathNo
line_startNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden; it does disclose the returned content (errors, warnings, code hints) and that scope can widen to the whole workspace. It says nothing about whether the call is read-only, whether it blocks on LSP startup, latency over large workspaces, or how truncation/limit behaves.

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 tight sentences with the resource first and the usage trigger second — nothing redundant and the key information is front-loaded.

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?

The output schema means return values need no explanation, and the file-vs-workspace scope default is at least implied. But with five undocumented parameters and no annotations, the description leaves filtering, paging, and line-range behavior unaddressed — too thin for a 5-param tool with zero structured coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 5 optional parameters, and the description compensates only partially: 'for a file or the whole workspace' hints at file_path being optional, but limit, line_start, line_end, and severity are entirely undocumented in both places. An agent cannot tell that severity accepts specific values or that line ranges narrow the scan.

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?

States a specific verb ('retrieve') and resource ('errors, warnings, and code hints') plus the two scopes it supports (a file or the whole workspace). It is clearly distinguishable from siblings like hover or lsp_status, though it never names or contrasts them explicitly.

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?

'Use to check syntax/type errors after edits, before and after refactoring' gives a concrete trigger context, so an agent knows when to reach for it. It stops short of exclusions or naming an alternative (e.g. hover for single-symbol types, lsp_status for server health).

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