Skip to main content
Glama

roslyn:get_code_actions_at_position

Identify all available code fixes and refactorings at any position in a C# file, enabling targeted code improvements.

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)
Behavior3/5

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

No annotations exist, so the description carries full burden. It discloses the zero-based coordinate behavior and that it returns all actions. However, it does not state whether the operation is read-only, has side effects, or requires specific permissions. Given the lack of annotations, more behavioral detail would be beneficial.

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?

The description is well-structured with sections (USAGE, OUTPUT, WORKFLOW, IMPORTANT) and is front-loaded with the purpose. It is concise but retains necessary details. Minor improvement: could be slightly more compact without losing clarity.

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?

Given no output schema, the description adequately describes the return format (title, kind, equivalenceKey). It covers all 7 parameters implicitly through usage patterns and schema coverage. It mentions the 100+ refactorings for context. Could mention error handling or pagination, but overall sufficient for an agent to use effectively.

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 coverage is 100%, so baseline is 3. The description adds a usage pattern but does not provide additional meaning beyond what the schema already offers (e.g., zero-based coordinates are already in schema). It does not elaborate on the boolean flags or the optional selection parameters beyond the schema.

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'). It distinguishes itself from siblings like 'apply_code_action_by_title' and 'get_code_fixes' by positioning itself as the master tool that returns both fixes and refactorings.

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 description provides explicit usage patterns (filePath, line, column) and a workflow: call this first, then use apply_code_action_by_title. It also highlights the zero-based coordinate requirement. However, it doesn't explicitly distinguish when to use 'get_code_fixes' instead, though it is implied.

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