Skip to main content
Glama

get_code_actions

Retrieve available code modifications like refactorings, quick fixes, and error corrections for a selected code range to implement improvements or resolve issues.

Instructions

Get code actions for a specific range in a file. Use this tool to obtain available refactorings, quick fixes, and other code modifications that can be applied to a selected code range. Examples include adding imports, fixing errors, or implementing interfaces.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
language_idNo
start_lineYes
start_columnYes
end_lineYes
end_columnYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the tool 'gets' code actions, implying a read-only operation, but doesn't clarify if it's safe, requires specific permissions, or has side effects like triggering analysis. It also omits details on response format, error handling, or rate limits, leaving behavioral gaps for a tool with 6 parameters.

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 appropriately sized with three sentences: purpose statement, usage directive, and examples. It's front-loaded with the core function and avoids redundancy. However, the examples could be more structured, and it slightly repeats 'code modifications'.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 parameters, no annotations, no output schema), the description is incomplete. It covers the basic purpose and usage but lacks details on behavioral traits, parameter meanings, and expected outputs. For a tool that likely returns actionable code edits, more context on response format or integration with tools like apply_edit is needed.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions 'specific range in a file' and examples like 'adding imports', which loosely relate to parameters like file_path and line/column ranges, but doesn't explain what language_id is for, the format of file_path, or how start/end coordinates work. With 6 undocumented parameters, this adds minimal semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get code actions for a specific range in a file' with specific examples like refactorings, quick fixes, and code modifications. It distinguishes itself from siblings by focusing on code actions for a range, unlike tools like get_diagnostics or get_completions. However, it doesn't explicitly contrast with all similar tools like apply_edit or format_range.

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

Usage Guidelines3/5

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

The description provides implied usage guidance: 'Use this tool to obtain available refactorings, quick fixes, and other code modifications' and gives examples. It suggests when to use it (for code modifications on a range) but lacks explicit when-not-to-use guidance or clear alternatives among siblings like apply_edit or format_range, which might handle similar actions differently.

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/blackwell-systems/agent-lsp'

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