SharpLens
NUGET · SHARPLENSMCP · 2 COMPONENTS · SCANNED AUG 3
67 semantic C#/.NET analysis tools via Roslyn: navigation, refactoring, codegen, audit.
Available components
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 →
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
- Provenance check failed: no build-provenance attestation is published. See how to fix → View diagnostics → Fail
- Clear OSI-approved license (MIT).Pass
- Actively maintained (last published 30 days ago).Pass
- Disclosure check failed: no security disclosure policy was found in the source repository. See how to fix → Fail
Schema Quality & AI Usability0
- Schema quality not yet verified: our sandbox run of this package did not complete, so we have no schema to assess.Unverified
Stability & Change Management0
- Stability not yet verified: our sandbox run of this package did not complete, so we have no schema to compare.Unverified
Tool Coverage0
- Tool coverage not yet verified: our sandbox run of this package did not complete, so we have no tool definitions to assess.Unverified
Capabilities0
- Protocol version not yet verified: our sandbox run of this package did not complete, so we never saw its MCP handshake.Unverified
Unverified: 4 categories
Categories scored 0 because our sandbox run of this package has not given us the schema these checks need to read. That is a gap on our side rather than a finding about the package, and we only credit what we can confirm, so the score stands at 0 until the capture succeeds. We are working through the fleet, so this normally clears without any action from you. How we score packages →
Add this component to your MCP client. Where a client-specific snippet is available, pick your client below and copy it straight into your config; otherwise use the connection detail shown.
nuget · SharpLensMcp
claude mcp add pzalutski-pixel-sharplens -- dnx [email protected] --yes
codex mcp add pzalutski-pixel-sharplens -- dnx [email protected] --yes
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"pzalutski-pixel-sharplens": {
"type": "local",
"command": [
"dnx",
"[email protected]",
"--yes"
],
"enabled": true
}
}
} mcp_servers:
pzalutski-pixel-sharplens:
command: "dnx"
args: ["[email protected]", "--yes"] {
"mcpServers": {
"pzalutski-pixel-sharplens": {
"command": "dnx",
"args": [
"[email protected]",
"--yes"
]
}
}
} 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.
- 2 Aug 26 +15
- Malware scan: unverified → pass ▲ security
- 31 Jul 26 −5
- We updated how we score, so this day's move reflects our rubric, not a change to the server See what changed → functional
- 30 Jul 26 −18
- Malware scan: pass → unverified ▼ security
- 27 Jul 26 0
- Tool coverage: Tool coverage not yet verified: our sandbox run of this package did not complete, so we have no tool definitions to assess. functional
- Schema quality: Schema quality not yet verified: our sandbox run of this package did not complete, so we have no schema to assess. functional
- 26 Jul 26 47
First indexed and scored.
- We updated how we score, so this day's move reflects our rubric, not a change to the server See what changed → functional
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 3 Aug 2026 · Analysed nuget/[email protected]
Provenance none
Ecosystem: nuget · Outcome: none
Reason: nuget_signature_unverified
Dependencies 0 packages
0 packages in the resolved dependency tree.
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.
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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-based line number on the method |
| preview | boolean | — | 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).
| Name | Type | Req | Description |
|---|---|---|---|
| changeType | string | yes | Type of change: rename, changeType, addParameter, removeParameter, changeAccessibility, delete |
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-based line number of the symbol |
| newValue | string | — | 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)
| Name | Type | Req | Description |
|---|---|---|---|
| endLine | integer | yes | End line (0-based) |
| filePath | string | yes | Absolute path to source file |
| startLine | integer | yes | Start 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)
| Name | Type | Req | Description |
|---|---|---|---|
| endLine | integer | yes | End line (0-based) |
| filePath | string | yes | Absolute path to source file |
| startLine | integer | yes | Start 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)
| Name | Type | Req | Description |
|---|---|---|---|
| includeCallers | boolean | — | Include caller analysis (default: true) |
| includeOutgoingCalls | boolean | — | Include methods/properties this method calls (default: false) |
| maxCallers | integer | — | Max callers to return (default: 20) |
| maxOutgoingCalls | integer | — | Max outgoing calls to return (default: 50) |
| methodName | string | yes | Method name |
| typeName | string | yes | Containing 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| endColumn | integer | — | Optional: end column for selection |
| endLine | integer | — | Optional: end line for selection |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-based line number |
| preview | boolean | — | Preview mode (default: true). Set to false to apply. |
| title | string | yes | Action 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.
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number (editor column - 1) |
| diagnosticId | string | yes | Diagnostic ID (e.g., CS0168, CS1998, CS4012) |
| filePath | string | yes | Absolute path to source file |
| fixIndex | integer | — | Index of fix to apply (omit to list available fixes). Call without this parameter first to see available fixes. |
| line | integer | yes | Zero-based line number (editor line - 1) |
| preview | boolean | — | 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).
| Name | Type | Req | Description |
|---|---|---|---|
| changes | array | yes | Array of changes to apply |
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file containing the method |
| line | integer | yes | Zero-based line number on the method |
| preview | boolean | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| sourceType | string | yes | The source type name (e.g., 'MyDerivedClass') |
| targetType | string | yes | The 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.
| Name | Type | Req | Description |
|---|---|---|---|
| format | string | — | 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-based line number on the field |
| preview | boolean | — | 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number (editor column - 1) |
| filePath | string | yes | Absolute path to source file containing the class |
| includeMemberNames | array | — | Optional: specific member names to include (omit to include all public members) |
| interfaceName | string | yes | Name for the new interface (e.g., 'IMyService') |
| line | integer | yes | Zero-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).
| Name | Type | Req | Description |
|---|---|---|---|
| accessibility | string | — | Accessibility: private, public, internal (default: private) |
| endLine | integer | yes | Zero-based end line of selection |
| filePath | string | yes | Absolute path to source file |
| methodName | string | yes | Name for the new method |
| preview | boolean | — | Preview mode (default: true). Set to false to apply. |
| startLine | integer | yes | Zero-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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| endColumn | integer | — | Optional: end column for selection |
| endLine | integer | — | Optional: end line for selection |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-based line number |
| preview | boolean | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| attributeName | string | yes | Attribute name (e.g. 'Authorize', 'HttpGet', 'Obsolete') |
| maxResults | integer | — | Maximum results (default: 100) |
| projectName | string | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number (editor column - 1) |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-based line number (editor line - 1) |
| maxResults | integer | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| level | string | — | '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.
| Name | Type | Req | Description |
|---|---|---|---|
| maxResults | integer | — | Cap on candidates returned (default: 20). totalCount reflects unbounded match count. |
| minEfferentCoupling | integer | — | Minimum outbound type dependencies to qualify (default: 20) |
| minMembers | integer | — | Minimum member count to qualify (default: 20) |
| projectName | string | — | 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-based line number |
| maxResults | integer | — | 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number (editor column - 1) |
| filePath | string | yes | Absolute path to source file containing the symbol |
| kind | string | — | Optional kind filter (case-insensitive). One of: write, invocation, cast, typeof, nameof, attribute, read. When set, the response includes totalReferences (unfiltered) and totalReferencesAfterFilter… |
| line | integer | yes | Zero-based line number (editor line - 1) |
| maxResults | integer | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| maxResults | integer | — | Maximum results (default: 100) |
| projectName | string | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| includeInternal | boolean | — | Include internal members (default: false; only public) |
| includeProperties | boolean | — | Include properties (default: true) |
| maxResults | integer | — | Cap on reported items (default: 50). totalCount reflects the true unbounded count. |
| projectName | string | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| includeInternal | boolean | — | Include internal members (default: false - usually want to keep internal APIs) |
| includePrivate | boolean | — | Include private members (default: true) |
| maxResults | integer | — | Maximum results to return (default: 50, helps manage large outputs) |
| projectName | string | — | Optional: analyze specific project by name, omit to analyze entire solution |
| symbolKindFilter | string | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| filePattern | string | — | Optional: Glob pattern to filter files (e.g., '*.cs', 'Services/*.cs', '*Repository.cs'). Matches against file names, not full paths. |
| includeTests | boolean | — | Include test projects (default: true). Set to false to skip projects with 'Test' in the name. |
| preview | boolean | — | Preview mode (default: true). Set to false to apply changes to disk. ALWAYS preview first! |
| projectName | string | — | 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file containing the type |
| includeProperties | boolean | — | Include properties with setters (default: false) |
| initializeToDefault | boolean | — | Use ?? default for nullable types (default: false) |
| line | integer | yes | Zero-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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file |
| includeOperators | boolean | — | Include == and != operators (default: true) |
| line | integer | yes | Zero-based line number on the type |
| preview | boolean | — | 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")
| Name | Type | Req | Description |
|---|---|---|---|
| attributeName | string | yes | Attribute name (e.g., 'Obsolete', 'Serializable', 'JsonProperty') |
| maxResults | integer | — | Maximum results (default: 100) |
| scope | string | — | '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
| Name | Type | Req | Description |
|---|---|---|---|
| typeName | string | yes | Type 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.
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column |
| direction | string | — | 'callees' (default), 'callers', or 'both' |
| filePath | string | yes | File containing the root method |
| line | integer | yes | Zero-based line of the method declaration or invocation |
| maxDepth | integer | — | Max BFS depth, 1-10 (default: 3). Required bound; depths above 10 explode on connected graphs. |
| maxNodes | integer | — | 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| endColumn | integer | — | Optional: end column for selection |
| endLine | integer | — | Optional: end line for selection |
| filePath | string | yes | Absolute path to source file |
| includeCodeFixes | boolean | — | Include fixes for diagnostics (default: true) |
| includeRefactorings | boolean | — | Include refactorings (default: true) |
| line | integer | yes | Zero-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.
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| diagnosticId | string | yes | Diagnostic ID (e.g., CS0246) |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | — | Optional: zero-based column |
| filePath | string | yes | Absolute path to source file |
| line | integer | — | Optional: zero-based line for specific method |
| metrics | array | — | 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-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)
| Name | Type | Req | Description |
|---|---|---|---|
| baseTypeName | string | yes | Base type name |
| includeTransitive | boolean | — | Include indirect descendants (default: true) |
| maxResults | integer | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| projectName | string | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string | — | Optional: path to specific file, omit for all files |
| includeHidden | boolean | — | Include hidden diagnostics (default: false) |
| projectPath | string | — | Optional: path to specific project |
| runAnalyzers | boolean | — | 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. |
| severity | string | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| assemblyName | string | — | Optional: restrict resolution to a specific assembly when the type name is ambiguous. |
| includeInherited | boolean | — | Include members from base types (default: true). Stops before System.Object. |
| includeXmlDocs | boolean | — | Include XML doc summaries when available (default: true). |
| maxMembers | integer | — | Cap on member entries (default: 200). totalCount reflects the unbounded member count. |
| typeName | string | yes | Fully-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")
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string | yes | Absolute 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.
| Name | Type | Req | Description |
|---|---|---|---|
| generatedFileName | string | yes | Name of the generated file |
| projectName | string | yes | Project 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").
| Name | Type | Req | Description |
|---|---|---|---|
| typeName | string | yes | The 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-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)
| Name | Type | Req | Description |
|---|---|---|---|
| methodName | string | yes | Method name |
| overloadIndex | integer | — | Which overload (0-based, default: 0) |
| typeName | string | yes | Containing 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.
| Name | Type | Req | Description |
|---|---|---|---|
| methodName | string | yes | The method name (e.g., 'ProcessData') |
| overloadIndex | integer | — | Which overload to get (0-based, default: 0) |
| typeName | string | yes | The 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.
| Name | Type | Req | Description |
|---|---|---|---|
| maxMethods | integer | — | Maximum methods to process (default: 20) |
| methods | array | yes | Array 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-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.
| Name | Type | Req | Description |
|---|---|---|---|
| projectName | string | — | 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).
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | Zero-based column number |
| filePath | string | yes | Absolute path to source file |
| line | integer | yes | Zero-based line number inside the method |
| maxDepth | integer | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| includeAnalyzers | boolean | — | Run configured DiagnosticAnalyzers in addition to compiler diagnostics (default: true). |
| projectName | string | yes | Project to audit. Required. |
| topN | integer | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| includeDocuments | boolean | — | Include document lists (default: false, limited to 500 per project) |
| includeReferences | boolean | — | Include package references (default: true, limited to 100 per project) |
| maxProjects | integer | — | Maximum number of projects to return (e.g., 10 for large solutions) |
| projectNamePattern | string | — | Filter projects by name pattern (supports * and ? wildcards, e.g., '*.Application' or 'MyApp.*') |
| summaryOnly | boolean | — | 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.
| Name | Type | Req | Description |
|---|---|---|---|
| projectName | string | — | Filter to specific project |
No output schema declared.
No examples provided.