Skip to main content
Glama

get_code_actions

List available code actions and refactorings at a cursor position in a C# file. Specify a range to enable extract-method style refactorings.

Instructions

List available code actions (refactorings and fixes) at a position in a C# file. Optionally specify endLine/endColumn to select a range for extract-method style refactorings. Returns action titles that can be passed to apply_code_action. Returns an envelope with items sorted by kind then title, totalCount, truncated, and limit (default 100).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYesLine number (1-based)
limitNoMaximum number of items to return (default: 100). Items are sorted by kind then title.
columnYesColumn number (1-based)
endLineNoEnd line for text selection (1-based, optional)
filePathYesFull path to the C# source file
endColumnNoEnd column for text selection (1-based, optional)
Behavior4/5

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

No annotations provided, so description carries full burden. It explains return envelope structure (items sorted by kind then title, totalCount, truncated, limit default 100), but does not explicitly state read-only behavior or error cases. However, given the lack of annotations, this is reasonably transparent.

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

Conciseness5/5

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

Three sentences, front-loaded with purpose, no extraneous information. Every sentence adds value.

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?

Covers key behaviors: optional range selection, return envelope structure, sorting, and limit. No output schema, but description provides necessary details. Could mention error conditions or empty results, but overall sufficient for a complex tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. Description adds value by explaining optional endLine/endColumn for 'extract-method style refactorings' and restates limit default, giving context beyond 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?

Description clearly states 'List available code actions (refactorings and fixes) at a position in a C# file' with specific verb and resource. It distinguishes from sibling 'apply_code_action' by noting that returned titles can be passed to it.

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?

Describes when to optionally specify endLine/endColumn for range selection and notes the workflow to apply_code_action. No explicit when-not-to-use or comparison with similar sibling like get_code_fixes, but context is clear.

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/MarcelRoozekrans/roslyn-codelens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server