lsp_diagnostics
Retrieve language server diagnostics for a file to detect errors and warnings. Read-only, requires a file path.
Instructions
Language server diagnostics for a file. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Retrieve language server diagnostics for a file to detect errors and warnings. Read-only, requires a file path.
Language server diagnostics for a file. Read-only.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Changes observed during successful MCP inspections.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses that the operation is read-only, which is useful, but says nothing about the required LSP server state, permissions, rate limits, error behavior, or what diagnostics are returned.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with the purpose front-loaded and no wasted words. It is efficient, though extremely terse given the incomplete specification elsewhere.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter read tool with no output schema and no annotations, the description is still too thin. It does not explain what diagnostics are returned, how to interpret them, or whether an LSP session must already be running.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It says the diagnostics are for a file, implying the path is a file path, but gives no format, relative/absolute expectations, or URI guidance, leaving the single parameter largely undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear resource (a file) and purpose (language server diagnostics), making it distinct from siblings such as lsp_symbols and lsp_navigate. However, it does not explicitly name or differentiate against alternatives, so it falls short of the top score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives, no prerequisites, and no exclusions. The agent must infer usage from the name and description alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.