Skip to main content
Glama

roslyn:format_document_batch

Format multiple documents in a project with consistent indentation, spacing, and line breaks using Roslyn's NormalizeWhitespace. Preview changes by default; set preview=false to apply.

Instructions

Format multiple documents in a project using Roslyn's NormalizeWhitespace. Ensures consistent indentation, spacing, and line breaks. PREVIEW mode by default - set preview=false to apply changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameNoOptional: Project name to format. If omitted, formats all projects in solution.
includeTestsNoInclude test projects (default: true). Set to false to skip projects with 'Test' in the name.
previewNoPreview mode (default: true). Set to false to apply changes to disk. ALWAYS preview first!
Behavior2/5

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

With no annotations provided, the description must disclose behavioral traits fully. It mentions preview mode and that it applies changes when preview=false, but omits critical details such as side effects on files, required permissions, error handling, or what happens when preview mode returns (e.g., no mention of diff output). This leaves agents underinformed about a mutation operation.

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 extremely concise with two sentences and a clear notice about preview mode. Every sentence adds value, with no unnecessary words. It is well-structured and front-loads the core purpose.

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?

Given no output schema and the tool's batch mutation nature, the description should clarify return behavior (e.g., what preview mode returns) and scope (e.g., works on whole solution vs open documents). It mentions project filtering via parameter but not error conditions or performance implications. Adequate but incomplete for an agent to fully trust the tool.

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?

All three parameters have schema descriptions, so baseline is 3. The description does not add any additional meaning beyond the schema; it merely restates the preview constraint already in the parameter description. Schema coverage is 100%, so no extra value from description.

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 formats multiple documents using Roslyn's NormalizeWhitespace, focusing on indentation, spacing, and line breaks. However, it does not explicitly differentiate from sibling tools like organize_usings_batch which also modify whitespace, though the specific mention of NormalizeWhitespace helps narrow the purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for whitespace formatting but provides no guidance on when to choose this tool over alternatives like organize_usings_batch or validate_code. The preview mode warning offers some usage context, but lacks explicit when-to-use/when-not-to-use criteria.

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