Skip to main content
Glama
ProfessioneIT

lsp-mcp-server

lsp_code_actions

Retrieve and apply code actions like quick fixes, refactoring operations, and import organization at specific positions in source files to automate code improvements.

Instructions

Get available code actions (refactorings, quick fixes) at a position or range. Use for automated fixes, imports organization, and refactoring operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
start_lineYesStart line number (1-indexed)
start_columnYesStart column number (1-indexed)
end_lineNoEnd line number (1-indexed). Defaults to start line.
end_columnNoEnd column number (1-indexed). Defaults to start column.
kindsNoFilter by code action kinds: quickfix, refactor, refactor.extract, refactor.inline, refactor.rewrite, source, source.organizeImports, source.fixAll
applyNoIf true, apply the first available action. If false, just list available actions.
action_indexNoIndex of the action to apply (when apply=true). Defaults to 0 (first action).
Behavior3/5

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

Annotations provide readOnlyHint=false, openWorldHint=false, and idempotentHint=false, indicating this is a mutable, non-idempotent operation. The description adds useful context about what types of actions are available (refactorings, quick fixes) and their purposes, but doesn't elaborate on behavioral aspects like side effects, error conditions, or performance characteristics beyond what annotations already convey.

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?

Two sentences with zero waste. The first sentence states the purpose and core functionality, the second provides usage context. Every word earns its place with no redundancy or fluff.

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 8 parameters, no output schema, and annotations covering basic behavioral hints, the description provides good context about what code actions are and when to use them. However, it doesn't explain what the return format looks like or how to interpret the results, which would be helpful given the lack of output schema.

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?

With 100% schema description coverage, the input schema already documents all 8 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline of 3 for high schema coverage.

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 specific verb 'Get' and resource 'available code actions' with explicit examples like 'refactorings, quick fixes'. It distinguishes from siblings by focusing on code actions rather than completions, diagnostics, or other LSP operations.

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 clear context for when to use this tool ('for automated fixes, imports organization, and refactoring operations'), but doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools.

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/ProfessioneIT/lsp-mcp-server'

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