Skip to content
verify mcp Beta VerifyMCP is currently in beta. If you notice any issues, get in touch and we’ll put it right.

SharpLens

NUGET · SHARPLENSMCP · 2 COMPONENTS

67 semantic C#/.NET analysis tools via Roslyn: navigation, refactoring, codegen, audit.

0 this week 82 Trust /100

Last scanned (22 hours ago)

Scores higher than 73% of NuGet servers

Category Developer Tools

Trust breakdown (7 categories)

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →

Supply Chain Security100
  • No malware found by supply-chain analysis.Pass
  • No known CVEs affecting this package version or its production dependencies.Pass
  • No install/post-install scripts declared.Pass
  • No production dependencies, so there is no dependency health to assess. View diagnostics → Pass
Provenance & Transparency45
  • Source repository is publicly reachable at the declared URL. View diagnostics → Pass
  • Build provenance not yet verified. View diagnostics → Unverified
  • Clear OSI-approved license (MIT).Pass
  • Actively maintained (last published 17 days ago).Pass
  • Disclosure check failed: no security disclosure policy was found in the source repository. See how to fix → Fail
Schema Quality & AI Usability78
  • AI-judged instruction clarity (excellent).Pass
  • Context-footprint check failed: tool/resource definitions use about 9359 tokens (~139/item across 67 items; 67 tools + 0 resources), over budget; trim descriptions and params. See how to fix → Fail
  • Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management100
  • No destabilizing schema changes in the last 30 days.Pass
Tool Coverage100
  • 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
  • 100% of tool parameters carry a description.Pass
Tool Safety100
  • No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
  • We read all 67 captured tool definition(s), and no name or description among them implies an irreversible operation.Pass
  • An AI judge read all 67 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities20
  • Spec-recency check failed: implements MCP spec 2024-11-05; the latest is 2026-07-28. See how to fix → Fail
Changelog

Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.

  • 4 Nov 26 +1
    • Stability: 0.97 → pass security
  • 3 Nov 26 −1
    • Stability: pass → 0.97 functional
  • 28 Oct 26 +1
    • Stability: 0.97 → pass security
  • 27 Oct 26 −1
    • Stability: pass → 0.97 functional
  • 21 Oct 26 +1
    • Stability: 0.97 → pass security
  • 20 Oct 26 −1
    • Stability: pass → 0.97 functional
  • 17 Oct 26 +3
    • Stability: 0.83 → pass security
  • 15 Oct 26 −3
    • Stability: pass → 0.80 functional
Diagnostics

Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.

Captured 4 Nov 2026 · Analysed nuget/SharpLensMcp@1.5.3

Provenance Inconclusive

We could not complete the check, so nothing is claimed either way. This is a gap on our side, not a finding about the package.

Result Inconclusive
Ecosystem nuget
Reason Signature present, unverified

Signer

Signed as Repository signature, names nuget.org
Subject CN=NuGet.org Repository by Microsoft,O=NuGet.org Repository by Microsoft,L=Redmond,ST=Washington,C=US
Issuer CN=DigiCert Trusted G4 Code Signing RSA4096 SHA384 2021 CA1,O=DigiCert\, Inc.,C=US
Valid from 23 Feb 2024
Valid until 18 May 2027
Service index https://api.nuget.org/v3/index.json
Owners pzalutski

Background: How many MCP packages publish verified provenance →

Dependencies 0 packages
Packages resolved 0
Tree resolution Complete

Background: SBOMs and build attestations, explained →

Registry declarations For information only

What the registry and the package's own manifest say about this version. The publisher or the registry writes these, nothing here is verified, and none of it affects the score.

Repository https://github.com/pzalutski-pixel/sharplens-mcp
Repository type git
Commit b41e7a9520726ac5f75f116581bd5469270368c3
Project URL https://github.com/pzalutski-pixel/sharplens-mcp
MCP tools · 67 exposed · ~9,359 tokens

The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →

Tool Tokens
roslyn:add_null_checks ~113

Add ArgumentNullException.ThrowIfNull guard clauses for nullable parameters. USAGE: Position cursor on a method with reference type parameters. OUTPUT: Generated guard clauses inserted at method start. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number on the method
previewboolean–Preview mode (default: true)

No output schema declared.

No examples provided.

roslyn:analyze_change_impact ~176

Analyze what would break if you change a symbol. Identifies breaking changes before you make them. USAGE: analyze_change_impact(filePath, line, column, changeType="rename|changeType|addParameter|removeParameter") OUTPUT: List of impacted locations, whether change is safe, and specific issues at each location. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
changeTypestringyesType of change: rename, changeType, addParameter, removeParameter, changeAccessibility, delete
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number of the symbol
newValuestring–Optional: new value for rename/changeType

No output schema declared.

No examples provided.

roslyn:analyze_control_flow ~101

Analyze branching and reachability in a code region. Returns: entryPoints, exitPoints, returnStatements, endPointIsReachable. USAGE: analyze_control_flow("path/to/file.cs", startLine=10, endLine=25)

NameTypeReqDescription
endLineintegeryesEnd line (0-based)
filePathstringyesAbsolute path to source file
startLineintegeryesStart line (0-based)

No output schema declared.

No examples provided.

roslyn:analyze_data_flow ~110

Analyze variable assignments and usage in a code region. Returns: variablesDeclared, alwaysAssigned, dataFlowsIn/Out, readInside/Outside, writtenInside/Outside, captured. USAGE: analyze_data_flow("path/to/file.cs", startLine=10, endLine=25)

NameTypeReqDescription
endLineintegeryesEnd line (0-based)
filePathstringyesAbsolute path to source file
startLineintegeryesStart line (0-based)

No output schema declared.

No examples provided.

roslyn:analyze_method ~157

Get comprehensive method analysis in ONE CALL: signature + callers + outgoing calls + location. USAGE: analyze_method("MyService", "ProcessData") or analyze_method("MyClass", "Calculate", includeCallers=true, includeOutgoingCalls=true)

NameTypeReqDescription
includeCallersboolean–Include caller analysis (default: true)
includeOutgoingCallsboolean–Include methods/properties this method calls (default: false)
maxCallersinteger–Max callers to return (default: 20)
maxOutgoingCallsinteger–Max outgoing calls to return (default: 50)
methodNamestringyesMethod name
typeNamestringyesContaining type name

No output schema declared.

No examples provided.

roslyn:apply_code_action_by_title ~196

Apply a code action by its title. Supports exact and partial matching. USAGE: apply_code_action_by_title(filePath, line, column, title) OUTPUT: Changed files with preview or applied changes WORKFLOW: (1) Call get_code_actions_at_position first, (2) Apply with preview=true, (3) Apply with preview=false IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
endColumninteger–Optional: end column for selection
endLineinteger–Optional: end line for selection
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number
previewboolean–Preview mode (default: true). Set to false to apply.
titlestringyesAction title (exact or partial match)

No output schema declared.

No examples provided.

roslyn:apply_code_fix ~196

Apply automated code fix for a diagnostic. WORKFLOW: (1) Call with no fixIndex to list available fixes, (2) Call with fixIndex and preview=true to preview changes, (3) Call with preview=false to apply. IMPORTANT: Uses ZERO-BASED coordinates.

NameTypeReqDescription
columnintegeryesZero-based column number (editor column - 1)
diagnosticIdstringyesDiagnostic ID (e.g., CS0168, CS1998, CS4012)
filePathstringyesAbsolute path to source file
fixIndexinteger–Index of fix to apply (omit to list available fixes). Call without this parameter first to see available fixes.
lineintegeryesZero-based line number (editor line - 1)
previewboolean–Preview mode (default: true). Set to false to apply changes to disk. ALWAYS preview first!

No output schema declared.

No examples provided.

roslyn:change_signature ~176

Change a method signature and preview impact on all call sites. ACTIONS: add (new param), remove, rename, reorder parameters. WORKFLOW: (1) Call with preview=true (default) to see affected call sites, (2) Review changes, (3) Call with preview=false to apply. OUTPUT: oldSignature, newSignature, list of call sites needing updates. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
changesarrayyesArray of changes to apply
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file containing the method
lineintegeryesZero-based line number on the method
previewboolean–Preview mode (default: true). Set to false to apply changes.

No output schema declared.

No examples provided.

roslyn:check_type_compatibility ~115

Check if one type can be assigned to another. Use before generating assignments or casts. USAGE: check_type_compatibility(sourceType="MyDerivedClass", targetType="MyBaseClass") OUTPUT: compatible (bool), requiresCast (bool), conversionKind, and explanation of why/why not.

NameTypeReqDescription
sourceTypestringyesThe source type name (e.g., 'MyDerivedClass')
targetTypestringyesThe target type name (e.g., 'MyBaseClass')

No output schema declared.

No examples provided.

roslyn:dependency_graph ~95

Visualize project dependencies as a graph. Shows which projects reference which, detects circular dependencies. OUTPUT: format="json" returns structured data with nodes/edges. format="mermaid" returns diagram syntax. USE CASE: Understand solution architecture, find circular dependencies, plan refactoring.

NameTypeReqDescription
formatstring–Output format: 'json' (default) returns structured data, 'mermaid' returns Mermaid diagram syntax

No output schema declared.

No examples provided.

roslyn:encapsulate_field ~108

Convert a field to a property with getter/setter. USAGE: Position cursor on a field declaration. OUTPUT: Generated property wrapping the field. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number on the field
previewboolean–Preview mode (default: true)

No output schema declared.

No examples provided.

roslyn:extract_interface ~175

Generate an interface from a class or struct. Extracts all public instance members (methods, properties, events). USAGE: Position on class declaration, provide interfaceName="IMyService". OUTPUT: Generated interface code ready to insert. Useful for dependency injection and testability. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number (editor column - 1)
filePathstringyesAbsolute path to source file containing the class
includeMemberNamesarray–Optional: specific member names to include (omit to include all public members)
interfaceNamestringyesName for the new interface (e.g., 'IMyService')
lineintegeryesZero-based line number (editor line - 1)

No output schema declared.

No examples provided.

roslyn:extract_method ~194

Extract selected statements into a new method. Uses data flow analysis to determine parameters and return type. USAGE: Specify startLine/endLine range containing complete statements inside a method. OUTPUT: extractedCode (the new method), replacementCode (the call to insert), detected parameters and return type. WORKFLOW: (1) Preview with preview=true, (2) Apply with preview=false. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
accessibilitystring–Accessibility: private, public, internal (default: private)
endLineintegeryesZero-based end line of selection
filePathstringyesAbsolute path to source file
methodNamestringyesName for the new method
previewboolean–Preview mode (default: true). Set to false to apply.
startLineintegeryesZero-based start line of selection

No output schema declared.

No examples provided.

roslyn:extract_variable ~131

Extract an expression to a local variable. USAGE: Position cursor on or select an expression. OUTPUT: Expression extracted to a new local variable. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
endColumninteger–Optional: end column for selection
endLineinteger–Optional: end line for selection
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number
previewboolean–Preview mode (default: true)

No output schema declared.

No examples provided.

roslyn:find_attribute_usages ~144

Find all types and members decorated with a specific attribute. USAGE: find_attribute_usages(attributeName: "Authorize") USAGE: find_attribute_usages(attributeName: "HttpGet", projectName: "MyApi") OUTPUT: List of symbols with the attribute, their kind, arguments, and source location. Use for: finding all API endpoints, authorization points, serialization config, test fixtures.

NameTypeReqDescription
attributeNamestringyesAttribute name (e.g. 'Authorize', 'HttpGet', 'Obsolete')
maxResultsinteger–Maximum results (default: 100)
projectNamestring–Filter to specific project

No output schema declared.

No examples provided.

roslyn:find_callers ~136

Find all methods/properties that call or reference a specific symbol (inverse of find_references). Essential for impact analysis: 'If I change this method, what code will be affected?' IMPORTANT: Uses ZERO-BASED coordinates.

NameTypeReqDescription
columnintegeryesZero-based column number (editor column - 1)
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number (editor line - 1)
maxResultsinteger–Maximum number of call sites to return (default: 100). Results are truncated with a hint if limit is exceeded.

No output schema declared.

No examples provided.

roslyn:find_circular_dependencies ~89

Detect cycles in project or namespace dependency graphs. USAGE: find_circular_dependencies() — project-level cycles USAGE: find_circular_dependencies(level: "namespace") — namespace-level cycles OUTPUT: Dependency graph with any detected cycles listed. Use for: architecture analysis, identifying tightly coupled components.

NameTypeReqDescription
levelstring–'project' (default) or 'namespace'

No output schema declared.

No examples provided.

roslyn:find_god_objects ~188

Detect over-coupled types ('god objects'). For each type computes efferent coupling (distinct types it depends on), afferent coupling (distinct types that depend on it), and member count; reports types meeting both threshold filters, scored as efferent*0.4 + members*0.4 + afferent*0.2. AUDIT-TIME tool — O(types*references); don't call in tight agent loops.

NameTypeReqDescription
maxResultsinteger–Cap on candidates returned (default: 20). totalCount reflects unbounded match count.
minEfferentCouplinginteger–Minimum outbound type dependencies to qualify (default: 20)
minMembersinteger–Minimum member count to qualify (default: 20)
projectNamestring–Limit scan to one project (default: scan all projects)

No output schema declared.

No examples provided.

roslyn:find_implementations ~110

Find all implementations of an interface or abstract class. Returns implementing types with their locations. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number
maxResultsinteger–Maximum number of implementations to return (default: 50). Results are truncated with a hint if limit is exceeded.

No output schema declared.

No examples provided.

roslyn:find_references ~229

Find all references to a symbol across the entire solution. Returns file paths, line numbers, code context, and a `kind` for each reference: write (assignment LHS, ++/--, ref/out arg), invocation (call target), cast (cast target type), typeof, nameof, attribute, or read. IMPORTANT: Uses ZERO-BASED coordinates (editor line 10 = pass line 9).

NameTypeReqDescription
columnintegeryesZero-based column number (editor column - 1)
filePathstringyesAbsolute path to source file containing the symbol
kindstring–Optional kind filter (case-insensitive). One of: write, invocation, cast, typeof, nameof, attribute, read. When set, the response includes totalReferences (unfiltered) and totalReferencesAfterFilter…
lineintegeryesZero-based line number (editor line - 1)
maxResultsinteger–Maximum number of references to return (default: 100). Results are truncated with a hint if limit is exceeded.

No output schema declared.

No examples provided.

roslyn:find_reflection_usage ~119

Detect dynamic/reflection-based type and method usage that is invisible to static reference searches. USAGE: find_reflection_usage() USAGE: find_reflection_usage(projectName: "MyApp", maxResults: 50) OUTPUT: List of reflection API calls with the API used, context, and location. Use for: finding hidden dependencies before refactoring, security audits, understanding dynamic behavior.

NameTypeReqDescription
maxResultsinteger–Maximum results (default: 100)
projectNamestring–Filter to specific project

No output schema declared.

No examples provided.

roslyn:find_untested_code ~154

Find public/internal surface in a project that no test method (xUnit [Fact]/[Theory], NUnit [Test]/[TestCase], MSTest [TestMethod]) transitively reaches. Sorted by cyclomatic complexity so the riskiest untested code is reported first. Audit-time tool; runs solution-wide BFS.

NameTypeReqDescription
includeInternalboolean–Include internal members (default: false; only public)
includePropertiesboolean–Include properties (default: true)
maxResultsinteger–Cap on reported items (default: 50). totalCount reflects the true unbounded count.
projectNamestring–Project to audit (default: first project in solution)

No output schema declared.

No examples provided.

roslyn:find_unused_code ~188

Find unused types, methods, properties, and fields in a project or entire solution. Returns symbols with zero references (excluding their declaration). USAGE: find_unused_code() for entire solution, or find_unused_code(projectName="MyProject") for specific project. OUTPUT: List of unused symbols with location, kind, and accessibility. Default limit: 50 results.

NameTypeReqDescription
includeInternalboolean–Include internal members (default: false - usually want to keep internal APIs)
includePrivateboolean–Include private members (default: true)
maxResultsinteger–Maximum results to return (default: 50, helps manage large outputs)
projectNamestring–Optional: analyze specific project by name, omit to analyze entire solution
symbolKindFilterstring–Optional: filter by symbol kind (Class, Method, Property, Field)

No output schema declared.

No examples provided.

roslyn:format_document_batch ~166

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.

NameTypeReqDescription
filePatternstring–Optional: Glob pattern to filter files (e.g., '*.cs', 'Services/*.cs', '*Repository.cs'). Matches against file names, not full paths.
includeTestsboolean–Include test projects (default: true). Set to false to skip projects with 'Test' in the name.
previewboolean–Preview mode (default: true). Set to false to apply changes to disk. ALWAYS preview first!
projectNamestring–Optional: Project name to format. If omitted, formats all projects in solution.

No output schema declared.

No examples provided.

roslyn:generate_constructor ~149

Generate a constructor from fields and/or properties of a type. USAGE: Position on class/struct declaration. Use includeProperties=true for auto-properties. OUTPUT: constructorCode string ready to paste, parameter list, and field assignments. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file containing the type
includePropertiesboolean–Include properties with setters (default: false)
initializeToDefaultboolean–Use ?? default for nullable types (default: false)
lineintegeryesZero-based line number on the type declaration

No output schema declared.

No examples provided.

roslyn:generate_equality_members ~136

Generate Equals, GetHashCode, and == / != operators for a type. USAGE: Position cursor on a class or struct declaration. OUTPUT: Generated equality members comparing all instance fields and properties. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
includeOperatorsboolean–Include == and != operators (default: true)
lineintegeryesZero-based line number on the type
previewboolean–Preview mode (default: true)

No output schema declared.

No examples provided.

roslyn:get_attributes ~138

Find all symbols with specific attributes. USAGE: - Find obsolete: get_attributes("Obsolete") - Find serializable: get_attributes("Serializable") - Scope to project: get_attributes("Obsolete", scope="project:MyProject") - Scope to file: get_attributes("Obsolete", scope="file:MyClass.cs")

NameTypeReqDescription
attributeNamestringyesAttribute name (e.g., 'Obsolete', 'Serializable', 'JsonProperty')
maxResultsinteger–Maximum results (default: 100)
scopestring–'solution' (default), 'project:Name', or 'file:path'

No output schema declared.

No examples provided.

roslyn:get_base_types ~50

Get full inheritance chain BY NAME. USAGE: get_base_types("MyService") returns: MyService → BaseService → ... → Object

NameTypeReqDescription
typeNamestringyesType name

No output schema declared.

No examples provided.

roslyn:get_call_graph ~203

Multi-hop transitive call graph (callers, callees, or both) from a method. Replaces N round-trips of find_callers/get_outgoing_calls when tracing impact or understanding a subsystem. Returns nodes + edges (not a nested tree, to handle diamond shapes), with cycle detection and a mandatory maxDepth bound. IMPORTANT: Uses ZERO-BASED coordinates.

NameTypeReqDescription
columnintegeryesZero-based column
directionstring–'callees' (default), 'callers', or 'both'
filePathstringyesFile containing the root method
lineintegeryesZero-based line of the method declaration or invocation
maxDepthinteger–Max BFS depth, 1-10 (default: 3). Required bound; depths above 10 explode on connected graphs.
maxNodesinteger–Max total nodes (default: 100). Sets truncatedByNodes when hit.

No output schema declared.

No examples provided.

roslyn:get_code_actions_at_position ~230

Get ALL available code actions (fixes + refactorings) at a position. This is the master tool that exposes 100+ Roslyn refactorings. USAGE: get_code_actions_at_position(filePath, line, column) or with selection: add endLine, endColumn OUTPUT: List of actions with title, kind (fix/refactoring), equivalenceKey WORKFLOW: (1) Call this to see available actions, (2) Use apply_code_action_by_title to apply one IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
endColumninteger–Optional: end column for selection
endLineinteger–Optional: end line for selection
filePathstringyesAbsolute path to source file
includeCodeFixesboolean–Include fixes for diagnostics (default: true)
includeRefactoringsboolean–Include refactorings (default: true)
lineintegeryesZero-based line number

No output schema declared.

No examples provided.

roslyn:get_code_fixes ~114

Get available code fixes for a specific diagnostic. Returns list of fix titles and descriptions. WORKFLOW: (1) get_diagnostics to find issues, (2) get_code_fixes to see options, (3) apply_code_fix to fix.

NameTypeReqDescription
columnintegeryesZero-based column number
diagnosticIdstringyesDiagnostic ID (e.g., CS0246)
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number

No output schema declared.

No examples provided.

roslyn:get_complexity_metrics ~160

Get complexity metrics for a method or entire file. METRICS: cyclomatic (decision points), nesting (max depth), loc (lines), parameters (count), cognitive (Sonar-style) USAGE: get_complexity_metrics(filePath) for file, or add line/column for specific method OUTPUT: Per-method breakdown with all requested metrics IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columninteger–Optional: zero-based column
filePathstringyesAbsolute path to source file
lineinteger–Optional: zero-based line for specific method
metricsarray–Optional: specific metrics [cyclomatic, nesting, loc, parameters, cognitive]

No output schema declared.

No examples provided.

roslyn:get_containing_member ~91

Get information about the containing method/property/class at a position. Returns the enclosing symbol's name, kind, and signature. Useful for understanding context. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number

No output schema declared.

No examples provided.

roslyn:get_derived_types ~101

Find all types inheriting from a base type BY NAME. USAGE: - Find all subclasses: get_derived_types("BaseService") - Direct children only: get_derived_types("BaseClass", includeTransitive=false)

NameTypeReqDescription
baseTypeNamestringyesBase type name
includeTransitiveboolean–Include indirect descendants (default: true)
maxResultsinteger–Maximum results (default: 100)

No output schema declared.

No examples provided.

roslyn:get_di_registrations ~100

Scan for dependency injection service registrations (AddScoped, AddTransient, AddSingleton, etc.). USAGE: get_di_registrations() USAGE: get_di_registrations(projectName: "MyApi") OUTPUT: List of DI registrations with lifetime, service type, implementation type, and location. Use for: understanding service wiring, finding missing registrations, auditing lifetimes.

NameTypeReqDescription
projectNamestring–Filter to specific project

No output schema declared.

No examples provided.

roslyn:get_diagnostics ~192

Get compiler errors, warnings, info messages, AND configured analyzer findings (StyleCop, Roslynator, NetAnalyzers, custom analyzers; editorconfig-resolved severities) for a file or project. Use before committing - this matches what CI will fail on. Response includes analyzersRan and analyzerCount so callers know whether analyzers contributed.

NameTypeReqDescription
filePathstring–Optional: path to specific file, omit for all files
includeHiddenboolean–Include hidden diagnostics (default: false)
projectPathstring–Optional: path to specific project
runAnalyzersboolean–Run configured DiagnosticAnalyzers in addition to the compiler (default: true). Set false for a fast compiler-only pass when speed matters; otherwise leave true so output matches CI build behavior.
severitystring–Optional: filter by severity (Error, Warning, Info)

No output schema declared.

No examples provided.

roslyn:get_external_type_info ~182

Inspect types from external assemblies (NuGet packages, BCL, closed-source) the solution references. Returns members, signatures, and XML docs for types whose source isn't in the solution. Eliminates the need for agents to guess at dependency APIs.

NameTypeReqDescription
assemblyNamestring–Optional: restrict resolution to a specific assembly when the type name is ambiguous.
includeInheritedboolean–Include members from base types (default: true). Stops before System.Object.
includeXmlDocsboolean–Include XML doc summaries when available (default: true).
maxMembersinteger–Cap on member entries (default: 200). totalCount reflects the unbounded member count.
typeNamestringyesFully-qualified type name. Use backtick-arity for generics, e.g. 'System.Collections.Generic.List`1'.

No output schema declared.

No examples provided.

roslyn:get_file_overview ~58

Get comprehensive file overview in ONE CALL: diagnostics summary + type declarations + namespace + line count. USAGE: get_file_overview("path/to/MyClass.cs")

NameTypeReqDescription
filePathstringyesAbsolute path to source file

No output schema declared.

No examples provided.

roslyn:get_generated_code ~93

View the source code produced by a source generator. USAGE: get_generated_code(projectName: "MyApp", generatedFileName: "MyType.g.cs") OUTPUT: Full source code of the generated file. Use get_source_generators first to discover available generated files.

NameTypeReqDescription
generatedFileNamestringyesName of the generated file
projectNamestringyesProject containing the generated file

No output schema declared.

No examples provided.

roslyn:get_instantiation_options ~87

Get all ways to create an instance of a type: constructors, factory methods, and builder patterns. USAGE: get_instantiation_options(typeName="HttpClient") OUTPUT: List of constructors with signatures, static factory methods, and hints (e.g., "implements IDisposable").

NameTypeReqDescription
typeNamestringyesThe type name to check (e.g., 'HttpClient')

No output schema declared.

No examples provided.

roslyn:get_method_overloads ~88

Get all overloads of a method. Returns list of signatures with parameter details. Use when you need to choose between overloads. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number

No output schema declared.

No examples provided.

roslyn:get_method_signature ~104

Get detailed method signature BY NAME including parameters, return type, nullability, and modifiers. USAGE: get_method_signature("MyClass", "ProcessData") or with overload selection: get_method_signature("MyClass", "ProcessData", overloadIndex=1)

NameTypeReqDescription
methodNamestringyesMethod name
overloadIndexinteger–Which overload (0-based, default: 0)
typeNamestringyesContaining type name

No output schema declared.

No examples provided.

roslyn:get_method_source ~132

Get the actual source code of a method by type and method name. Eliminates need for file Read. USAGE: get_method_source(typeName="MyService", methodName="ProcessData") OUTPUT: Full method source including signature, body, location (file + line numbers), and line count.

NameTypeReqDescription
methodNamestringyesThe method name (e.g., 'ProcessData')
overloadIndexinteger–Which overload to get (0-based, default: 0)
typeNamestringyesThe containing type name (e.g., 'MyService', 'MyController')

No output schema declared.

No examples provided.

roslyn:get_method_source_batch ~129

Get source code for multiple methods in a single call (batch optimization). USAGE: get_method_source_batch(methods: [{typeName: 'ServiceA', methodName: 'Process'}, {typeName: 'ServiceB', methodName: 'Handle'}]) OUTPUT: Results array with source for each method, plus errors array for any that failed. BENEFIT: One call instead of multiple - reduces round trips when tracing code flows.

NameTypeReqDescription
maxMethodsinteger–Maximum methods to process (default: 20)
methodsarrayyesArray of method requests

No output schema declared.

No examples provided.

roslyn:get_missing_members ~112

Get all interface and abstract members that must be implemented for a type. USAGE: Position on a class that implements interfaces or extends abstract classes. OUTPUT: List of missing members with exact signatures ready to copy. Use before implementing interfaces. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number on the type declaration

No output schema declared.

No examples provided.

roslyn:get_nuget_dependencies ~89

List NuGet package references per project with versions. USAGE: get_nuget_dependencies() USAGE: get_nuget_dependencies(projectName: "MyApp") OUTPUT: List of projects with their NuGet packages, versions, and asset settings. Use for: dependency audits, version checks, understanding external dependencies.

NameTypeReqDescription
projectNamestring–Filter to specific project

No output schema declared.

No examples provided.

roslyn:get_outgoing_calls ~113

Get all methods and properties that a method calls. Helps understand method dependencies and behavior. Returns list of called symbols with locations. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number inside the method
maxDepthinteger–How deep to trace calls (1 = direct only, default: 1)

No output schema declared.

No examples provided.

roslyn:get_project_health ~115

Composite audit dashboard for one project: aggregates diagnostics (with analyzers), unused code, god-object candidates, and untested public surface. Returns counts + top-N hotspots per dimension. One call replaces 4+ separate tool calls for a project audit overview.

NameTypeReqDescription
includeAnalyzersboolean–Run configured DiagnosticAnalyzers in addition to compiler diagnostics (default: true).
projectNamestringyesProject to audit. Required.
topNinteger–Hotspots per dimension (default: 5).

No output schema declared.

No examples provided.

roslyn:get_project_structure ~174

Get solution/project structure. IMPORTANT: For large solutions (100+ projects), use summaryOnly=true or projectNamePattern to avoid token limit errors. Maximum output is limited to 25,000 tokens.

NameTypeReqDescription
includeDocumentsboolean–Include document lists (default: false, limited to 500 per project)
includeReferencesboolean–Include package references (default: true, limited to 100 per project)
maxProjectsinteger–Maximum number of projects to return (e.g., 10 for large solutions)
projectNamePatternstring–Filter projects by name pattern (supports * and ? wildcards, e.g., '*.Application' or 'MyApp.*')
summaryOnlyboolean–Return only project names and counts (default: false, recommended for large solutions)

No output schema declared.

No examples provided.

roslyn:get_source_generators ~81

List active source generators and their generated output per project. USAGE: get_source_generators() USAGE: get_source_generators(projectName: "MyApp") OUTPUT: List of generators with their assembly info and generated files. Use for: understanding generated code, debugging generator issues.

NameTypeReqDescription
projectNamestring–Filter to specific project

No output schema declared.

No examples provided.

Install

How do I install the SharpLens MCP server?

SharpLens runs locally as a NuGet package, launched with dnx SharpLensMcp@1.5.3 --yes. Ready-made configuration for Claude, Cursor, VS Code, Codex and 3 more is on this page, copied from each client's own documentation.

nuget · SharpLensMcp

# add to Claude Code
claude mcp add pzalutski-pixel-sharplens -- dnx SharpLensMcp@1.5.3 --yes
Common questions

What is the SharpLens MCP server?

SharpLens is an MCP server listed in the public MCP registry as io.github.pzalutski-pixel/sharplens. 67 semantic C#/.NET analysis tools via Roslyn: navigation, refactoring, codegen, audit. This page covers its NuGet package (SharpLensMcp).

Is the SharpLens MCP server safe to use?

SharpLens scores 82 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 4 November 2026. It declares no install or post-install scripts. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

What tools does the SharpLens MCP server expose?

SharpLens exposes 67 tools: roslyn:health_check, roslyn:load_solution, roslyn:sync_documents, roslyn:get_symbol_info, roslyn:go_to_definition, and 62 more. Their descriptions and schemas cost roughly 9,359 tokens of context every time the server is loaded.

Is the SharpLens MCP server still maintained?

SharpLens is still listed as active in the MCP registry. We last reached this channel on 4 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

What licence is the SharpLens MCP server under?

SharpLens declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.