Skip to main content
Glama

vscode_get_diagnostics

Read compiler, linter, and language-server errors and warnings from the VS Code Problems panel, optionally filtered by file path or severity, to identify and fix code issues.

Instructions

Read compiler, linter, and language-server errors/warnings (e.g. Clangd, C/C++, Pylance, ESLint) from VS Code Problems panel.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "vscode_get_diagnostics"
  }
}

Input Schema

NameRequiredDescriptionDefault
PathNoOptional file path to filter diagnostics; omit to fetch all workspace diagnostics.
SeverityNoOptional severity filter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden. It does useful work by revealing the diagnostic sources (compiler, linter, language server) and that results come from the Problems panel, implying only already-processed diagnostics are returned and that a language server must be active. However, it is silent on freshness/staleness, whether it waits for or triggers re-analysis, workspace prerequisites, and the shape of what comes back.

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?

A single front-loaded sentence that identifies the action, the artifact types, and the source panel with zero filler. The parenthetical examples of language servers earn their place by clarifying which toolchains are covered.

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, zero-required-parameter read tool this is close to adequate, and the schema already explains filtering. But with no annotations and no output schema, the description should say something about return contents (file, range, severity, message) and freshness of results, which it omits entirely.

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%, and both parameters (Path, Severity) are documented inline, including the omit-to-get-all behavior and the severity enum. The description adds no parameter meaning beyond that, so the baseline 3 is the correct ceiling here.

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 names a specific verb ('Read') and a precisely scoped resource: compiler, linter and language-server errors/warnings drawn from the VS Code Problems panel. The enumeration of producers (Clangd, C/C++, Pylance, ESLint) makes it unambiguous that this surfaces pre-computed diagnostics rather than raw text, which separates it in spirit from grep_search or read_file. It stops short of naming any sibling or stating what it does differently from vscode_get_editor_state, so it lands at 4 rather than 5.

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 guidance on when to reach for this tool versus alternatives such as grep_search, read_file, or vscode_execute_command, and no prerequisites or exclusions are stated. The only conditional behavior mentioned ('omit to fetch all workspace diagnostics') lives in the schema, not the description. An agent must infer usage entirely from the purpose statement.

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