Skip to main content
Glama

roslyn:format_document_batch

Format multiple C# documents simultaneously to ensure consistent code style, indentation, and spacing across your project using Roslyn's NormalizeWhitespace.

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!
Behavior4/5

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

With no annotations provided, the description carries the full burden. It effectively discloses key behavioral traits: it's a batch operation, uses Roslyn's NormalizeWhitespace for consistent formatting, defaults to preview mode (non-destructive), and requires explicit action to apply changes. It doesn't cover error handling, performance, or output format, but provides essential safety and scope details.

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 front-loaded with the core purpose, followed by key behavioral details. Every sentence earns its place: the first defines the action and method, the second adds critical usage guidance. No wasted words, appropriately sized for the tool's complexity.

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 (batch formatting with safety controls), no annotations, and no output schema, the description does well by covering purpose, method, and key behavioral traits (preview mode). It lacks details on output format, error cases, or dependencies (e.g., requires loaded solution), but is largely complete for safe usage.

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 parameters thoroughly. The description adds marginal value by emphasizing the preview mode default and the need to set preview=false to apply changes, but doesn't provide additional semantics beyond what's in the schema descriptions (e.g., project selection logic or test inclusion details).

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 specific action ('Format multiple documents'), the resource ('in a project'), and the method ('using Roslyn's NormalizeWhitespace'). It distinguishes from siblings by focusing on formatting (vs. analysis, refactoring, or other operations in the sibling list).

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 by mentioning 'PREVIEW mode by default' and advising to 'set preview=false to apply changes.' However, it doesn't explicitly state when to use this tool versus alternatives (e.g., other formatting or batch tools like 'organize_usings_batch'), nor does it mention prerequisites like needing a loaded solution.

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