Skip to main content
Glama

roslyn:get_diagnostics

Retrieve compiler diagnostics like errors and warnings for C# files or projects to identify issues before committing code changes.

Instructions

Get compiler errors, warnings, and info messages for a file or entire project. Returns: list of diagnostics with id, message, severity, and location. Use before committing to catch issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathNoOptional: path to specific file, omit for all files
projectPathNoOptional: path to specific project
severityNoOptional: filter by severity (Error, Warning, Info)
includeHiddenNoInclude hidden diagnostics (default: false)
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the return format ('list of diagnostics with id, message, severity, and location') and practical use case, but doesn't mention behavioral aspects like whether this is a read-only operation, performance characteristics, or any limitations. The description adds some value but lacks comprehensive behavioral context.

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 perfectly concise with two sentences that each serve distinct purposes: the first defines the tool's function and return value, the second provides usage guidance. No wasted words or redundant information.

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?

Given the tool's moderate complexity (4 optional parameters, no output schema, no annotations), the description provides good coverage of purpose and usage. However, without annotations or output schema, it could benefit from more behavioral details about what 'Get' entails operationally. The practical use case guidance helps compensate for structural gaps.

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%, so the schema already documents all 4 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema descriptions, so it meets the baseline of 3 where the schema does the heavy lifting.

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?

The description clearly states the verb ('Get') and resource ('compiler errors, warnings, and info messages for a file or entire project'), specifying both scope options. It distinguishes from sibling tools by focusing on diagnostics rather than code analysis, refactoring, or other operations listed in the sibling tools.

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 usage ('Use before committing to catch issues'), which gives practical guidance. However, it doesn't explicitly state when NOT to use this tool or name specific alternatives among the many sibling tools, which prevents a perfect score.

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/pzalutski-pixel/sharplens-mcp'

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