Skip to main content
Glama

code_actions

Retrieve quick fixes and refactorings for a code position. Passes overlapping diagnostics to include relevant code actions, enabling automated problem resolution.

Instructions

Get available code actions (quick fixes, refactorings) at the given position. Diagnostics overlapping the range are passed to the server so quick fixes are included.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colYesColumn number (1-indexed)
fileYesRelative file path from project root
lineYesLine number (1-indexed)
endColNoEnd column of range (1-indexed, defaults to col)
endLineNoEnd line of range (1-indexed, defaults to line)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It does reveal a useful behavior: diagnostics overlapping the range are passed to the server so quick fixes are included, which goes beyond a plain definition. However, it does not mention whether the operation has side effects, permission requirements, or what kind of response is returned.

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?

The description is two compact sentences with no filler. It front-loads the core action and then adds the key diagnostic-related detail, making every sentence useful.

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

Completeness3/5

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

The schema covers parameters well and the description communicates the basic operation plus the diagnostics-passing behavior. However, with no output schema and no annotations, the agent is left without guidance on what the returned code actions look like or when this tool is the right choice among siblings.

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 the schema already explains file, line, col, endLine, and endCol. The description adds only the general notion of 'position' and 'range', which does not materially improve on the schema's own parameter descriptions.

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: getting available code actions (quick fixes, refactorings) at a position. It is specific enough to separate it from navigation and lookup siblings like goto_definition and hover, though it does not explicitly differentiate itself from other action-oriented tools.

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

Usage Guidelines2/5

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

There is no guidance about when to use this tool versus alternatives, nor any mention of exclusions or fallback tools. The description implies usage through 'Get available code actions' but does not explain contexts where this is preferred over diagnostics or rename_prepare.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.