Skip to main content
Glama

ReSharper Cleanup Code

resharper_cleanup
DestructiveIdempotent

Apply ReSharper code cleanup to reformat and normalize files in place, processing the entire solution per call to batch all modified files.

Instructions

Run ReSharper code cleanup to reformat and normalize files in place. Each call analyses the whole solution whatever the file count, so make one call per task with every modified file in it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesFile paths to clean up. Each is relative to the solution root, or absolute. jb matches them against the files that belong to a project in the solution, so one that is on disk but in no project matches nothing, which nothing here can detect. Wildcards are allowed and expanded by jb; a non-wildcard path that does not exist fails the whole call before anything is rewritten. An element joining several paths with ; or , is split into separate paths.
profileNoReSharper cleanup profile name. Defaults to the profile the solution declares, else full cleanup.
solutionPathNoPath to the .sln/.slnx to run against. Overrides JB_SOLUTION_PATH and working-directory discovery.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.0
    • changedInput schema / properties / files / description
      Previous value: -"File paths to clean up. Each is relative to the solution root, or absolute. jb matches them against the files that belong to a project in the solution, so one that is on disk but in no project matches nothing. Wildcards are allowed and expanded by jb; a non-wildcard path that does not exist fails the whole call before anything is rewritten. An element joining several paths with ; or , is split into separate paths."New value: +"File paths to clean up. Each is relative to the solution root, or absolute. jb matches them against the files that belong to a project in the solution, so one that is on disk but in no project matches nothing, which nothing here can detect. Wildcards are allowed and expanded by jb; a non-wildcard path that does not exist fails the whole call before anything is rewritten. An element joining several paths with ; or , is split into separate paths."
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond annotations (readOnlyHint=false, destructiveHint=true, idempotentHint=true), the description discloses that files are modified 'in place' and that every call analyzes the whole solution regardless of file count — a meaningful scope/performance trait. The parameter schema additionally reveals atomic failure behavior (a non-existent non-wildcard path fails the entire call before anything is rewritten).

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?

Two sentences, front-loaded with the purpose verb in the first sentence and a single high-value operational rule in the second. No filler; every sentence earns its place.

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?

With no output schema and a destructive in-place action, the description plus fully-detailed parameter schema covers purpose, side effects, batching behavior, defaults, and failure modes. The only minor gap is the absence of an explicit statement of what a successful call returns or how to verify results.

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?

Schema coverage is 100% with rich descriptions (relative/absolute paths, wildcard expansion, ';'/',' separators, failure modes, profile defaults, solutionPath overriding JB_SOLUTION_PATH). The main description adds the batching strategy that clarifies how to use the files parameter, lifting it above the high-coverage baseline of 3.

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 opens with a specific verb and resource — 'Run ReSharper code cleanup to reformat and normalize files in place' — which precisely states what the tool does. It clearly distinguishes itself from siblings resharper_reset_cache (cache reset) and resharper_inspect (analysis).

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 second sentence gives explicit operational guidance — 'Each call analyses the whole solution whatever the file count, so make one call per task with every modified file in it' — telling the agent exactly how to batch calls. It does not explicitly contrast with sibling tools, but the purpose statement makes selection clear enough.

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