Skip to main content
Glama

roslyn:get_code_actions_at_position

Retrieve available code fixes and refactorings at a specific position in C# source code using Roslyn compiler analysis.

Instructions

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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to source file
lineYesZero-based line number
columnYesZero-based column number
endLineNoOptional: end line for selection
endColumnNoOptional: end column for selection
includeCodeFixesNoInclude fixes for diagnostics (default: true)
includeRefactoringsNoInclude refactorings (default: true)
Behavior4/5

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

With no annotations, the description carries full burden and adds significant behavioral context: it discloses the output format ('List of actions with title, kind, equivalenceKey'), the workflow relationship with another tool, and the critical zero-based coordinate requirement. It doesn't mention error handling or performance limits, but covers core operational behavior well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (purpose, usage, output, workflow, important note). Every sentence earns its place, but the 'USAGE' line could be more concise by integrating with the schema details. Slightly verbose in listing parameter names explicitly.

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?

For a tool with 7 parameters, 100% schema coverage, and no output schema, the description adds good context: workflow integration, output format, and coordinate warnings. It doesn't explain error cases or provide examples, but covers enough for effective use given the rich schema support.

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 parameters are fully documented in the schema. The description adds minimal value beyond the schema: it mentions optional selection parameters ('endLine, endColumn') and implies default behavior for includeCodeFixes/includeRefactorings but doesn't detail them. Baseline 3 is appropriate as the schema does the heavy lifting.

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 verb ('Get'), resource ('ALL available code actions'), and scope ('at a position'), with specific mention of 'fixes + refactorings' and '100+ Roslyn refactorings'. It distinguishes from siblings like 'apply_code_action_by_title' by explaining this is the discovery tool in a workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided: 'USAGE' section details parameter combinations, 'WORKFLOW' explains when to use this vs. 'apply_code_action_by_title' (step 1 vs. step 2), and 'IMPORTANT' warns about zero-based coordinates. It clearly defines the tool's role in a multi-step process.

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