Skip to main content
Glama

get_diagnostics

Identify code problems like syntax errors and type mismatches by retrieving diagnostic messages for files from the language server.

Instructions

Get diagnostic messages (errors, warnings) for files. Use this tool to identify problems in code files such as syntax errors, type mismatches, or other issues detected by the language server. When used without a file_path, returns diagnostics for all open files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNo
Behavior2/5

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

With no annotations provided, the description carries full burden. It describes the tool's behavior (returns diagnostics for all open files when file_path is omitted) but lacks critical details like whether this requires an active language server, what format the diagnostics are returned in, or any rate limits. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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?

The description is efficiently structured in three sentences: purpose, usage context, and parameter behavior. Every sentence adds value with no redundancy or wasted words, making it easy to parse quickly.

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 diagnostic tool with no annotations and no output schema, the description provides adequate basics but lacks completeness. It explains what the tool does and parameter behavior, but doesn't cover return format, error conditions, or dependencies on language server state, which would be important for an agent to use it effectively.

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

Parameters4/5

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

The description adds valuable semantic context for the single parameter: it explains that when file_path is omitted, diagnostics for all open files are returned. This compensates well for the 0% schema description coverage, though it doesn't specify the expected format or constraints for the file_path parameter.

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 clearly states the tool's purpose: 'Get diagnostic messages (errors, warnings) for files' and specifies it identifies problems like syntax errors and type mismatches. It distinguishes from siblings by focusing on diagnostics rather than other LSP operations, though it doesn't explicitly name alternatives.

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?

The description provides clear context for when to use it ('to identify problems in code files') and explains the behavior with and without the file_path parameter. However, it doesn't explicitly state when NOT to use it or name specific alternative tools for related tasks.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/blackwell-systems/agent-lsp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server