Fourteen tools
The navigation, editing, and diagnostics/fix tools take an optional project (name, directory, .csproj, or .sln path) — omit it and RoselineMCP auto-discovers the solution/project from its working directory. A symbol is a simple or fully-qualified name — add a parameter list to pick an overload. Wire names are snake_case. Full request/response shapes live in docs/API.md.
Which checkout answered? Auto-discovery is anchored to the server's working directory — the one your MCP client launched RoselineMCP in — not yours. They differ whenever you work in a git worktree (e.g. .claude/worktrees/<name>), which sits below the discovery walk's reach, so an omitted project resolves the main checkout instead. Two checkouts of one repo are otherwise indistinguishable in a response, so every tool with an optional project returns resolvedPath — the absolute .sln/.csproj that actually answered: the .sln when the solution was loaded and contains the project, otherwise the .csproj that was opened directly (e.g. a project not listed in its nearest ancestor .sln). Pass an absolute path as project to target a specific checkout. (analyze_solution is the exception — its pathOrGit is required, so it auto-discovers nothing.)
Read-only by default. The seven navigation tools and the diagnostics/patch tools never touch disk. The three write-capable tools (edit_member, rename_symbol, apply_fixes) default to previewOnly: true — they return a diff and write nothing unless you pass previewOnly: false, and even then they ask your client to confirm via MCP elicitation before writing (declining downgrades the call to a preview). So does leaving the prompt unanswered: the round-trip is bounded by RoselineMCP:ConfirmDestructiveWritesTimeout (default 5 minutes), after which the call returns a preview rather than writing or hanging. That confirmation can be switched off for unattended hosts with RoselineMCP:ConfirmDestructiveWrites=false, leaving previewOnly: false as the only guard.
Degraded coverage is named, never silent. Roslyn reports an analyzer reference it cannot load — one built against a newer Microsoft.CodeAnalysis than the server's, the .NET SDK's own analyzers being the universal case — by contributing zero analyzers, not by failing. The three tools that report analyzerLoad (analyze_solution, list_diagnostics, apply_fixes) therefore return that block naming every reference that contributed nothing and why (load-failure with Roslyn's errorCode and message, no C# analyzers, unresolved— the analyzer assembly is not on disk, so it is removed from the loaded solution before Roslyn chokes on it — or exception). It is omitted when every reference contributed, so a present block always says something — including analyzersRan: false when analyzers are switched off. Code fixers are looked up in the Roslyn built-ins, the bundled Roslynator catalog, and the project's own analyzer references, in that order.
Response envelope
v1.4.0Every tool returns a typed ToolResult<T>. The returns shown on each card below is the shape of data — the payload — not the whole envelope.
{ "ok": true, "data": { … } }{ "ok": false, "error": { "type", "message", "correlationId", "resolvedPath"? } }Tools set UseStructuredContent, so data is also delivered as MCP structuredContent alongside an advertised outputSchema. Long-running tools emit progress notifications; failures carry a correlationId to the client’s log stream, plus resolvedPath — the checkout that answered — whenever the call failed after resolving a project. It is omitted entirely when nothing was resolved.
Code navigation
Return precise structure instead of source — the token-saving surface.Find symbols by wildcard/substring name pattern, or outline a single file.
- params
- project?, query?, file?, kinds?, max?
- returns
- resolvedPath, symbols[] (name, fullName, kind, signature, file, line — relative paths; outline mode gives name, kind, signature, line, containingType), totalFound, truncated?
A symbol’s kind, modifiers, signature, base types, interfaces, docs, and definition — the compact go-to-definition.
- params
- project?, symbol, includeSource?
- returns
- resolvedPath, name, fullName, kind, signature, then (omitted when empty/absent) modifiers[], baseTypes[], interfaces[], documentation, definitionFile/Line, source
Every reference (use site) of a symbol across the solution, as location + one-line snippet.
- params
- project?, symbol, includeDefinition?, max?
- returns
- resolvedPath, references[] (file — relative, line, snippet), totalReferences, truncated?
Implementations of an interface/member, overrides, or derived types of a class.
- params
- project?, symbol, max?
- returns
- resolvedPath, implementations[] (symbol summaries), totalFound, truncated?
A depth-bounded caller and/or callee graph for a method, with cycle detection.
- params
- project?, method, direction?, depth?, max?
- returns
- resolvedPath, callers?/callees? trees (fullName with simple param-type names, file — relative, line, truncated?, children)
A type’s base-class chain, implemented interfaces, and/or derived types.
- params
- project?, type, direction?, max?
- returns
- resolvedPath, baseTypes?, interfaces?, derivedTypes? (summaries), derivedTypesTruncated?
The symbol at a file:line(:column) — turn a diagnostic, stack trace, or grep hit into a symbol name.
- params
- project?, file, line, column?
- returns
- resolvedPath, name, fullName, kind, signature, isDeclaration, then (omitted when empty/absent) containingType, documentation, definitionFile/Line
Code editing
Emit a member-level diff, never a whole-file rewrite. Preview by default.Replace, add, or delete a single type member; returns a unified diff. Preview by default, and refused if it would not compile.
- params
- project?, symbol, operation, newSource?, previewOnly?, allowIntroducedErrors?, max?
- returns
- project, resolvedPath, operation, target, changedFiles[], patch, previewOnly, applied, verification?, notes[]
Rename a symbol and update every reference across the solution (Roslyn rename). Preview by default, and refused if it would break a downstream project.
- params
- project?, symbol, newName, previewOnly?, allowIntroducedErrors?, max?
- returns
- project, resolvedPath, symbol, newName, changedFiles[], patch, previewOnly, applied, verification?, notes[]
Diagnostics & fixes
The original surface: analyze a solution and apply automated fixes.Analyze an entire C# solution for diagnostics, with filtering. Also accepts an http(s) Git URL (the one open-world tool).
- params
- pathOrGit, branch?, include?, exclude?, severity?, maxDiagnostics?
- returns
- solution, projects, diagnosticSummary, topDiagnostics[], analyzerLoad? (every analyzer reference that contributed nothing, and why — merged across projects; omitted when all contributed)
Detailed diagnostics for a project, with statistics and suggested fixable IDs — fixers from Roslyn, the bundled catalog and the project’s own analyzer references.
- params
- project?, ids?, files?, max?
- returns
- project, resolvedPath, totalDiagnostics, diagnostics[], stats, suggestedFixableIds[], analyzerLoad? (analyzersRan, referencesConsulted, referencesContributing, analyzersLoaded, notes[] — omitted when every reference contributed)
Apply automated code fixes for diagnostic IDs to one project — a .sln target fixes its primary project and names the ones it skipped. Preview by default, and refused if the fixes would not compile.
- params
- ids, project?, previewOnly?, allowIntroducedErrors?, max?
- returns
- project, resolvedPath, fixedCount, fixersApplied[], changedFiles[] (relative to the resolvedPath directory), patch, notes[] (scope: fixed/skipped projects, linked files; per-ID status), previewOnly, applied, verification?, analyzerLoad? (omitted when every analyzer reference contributed)
Does this compile right now, and what broke? Compiler errors only, in under a second on a warm workspace — the replacement for `dotnet build` in an edit loop.
- params
- project?, max?
- returns
- resolvedPath, compiles, errors[], omitted?, scope[], scopeComplete, notes[]
Generate a unified diff between two text versions. Pure text, no filesystem.
- params
- before, after, fileName?, ignoreWhitespace?, ignoreCase?
- returns
- patch, hasChanges, linesAdded, linesRemoved, fileName, summary
How much do they save?
The read tools exist to spend fewer tokens than reading source. See the measured, honest benchmark →