Skip to main content
Glama

execute_command

Execute server-defined commands from code actions to apply refactoring, generate code, or run server-specific actions. Use after retrieving code actions to trigger workspace operations.

Instructions

Execute a workspace command via LSP. Commands are server-defined identifiers returned by code actions (in the command field of a CodeAction). Use this after get_code_actions to trigger a server-side operation such as applying a refactoring, generating code, or running a server-specific action. Returns the server-defined result or null.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
argumentsNo
Behavior4/5

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

Without annotations, the description carries full burden. It discloses that the tool triggers server-side operations, including potentially mutating actions like refactoring, and specifies the return value as 'server-defined result or null'. Minor omission: no mention of error states or side effects beyond mutation implication.

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: first defines purpose, second gives usage context, third describes return. No filler or redundancy. Efficient and well-structured.

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 covers return value and usage flow (after get_code_actions). It could improve by mentioning error handling or prerequisites beyond the sequential hint, but for the tool's complexity (2 params, simple model), it is largely complete.

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?

With 0% schema property coverage, the description only mentions 'command' is a string and 'arguments' is optional, but does not explain the structure of arguments (array with any items) or how to form them. No additional semantic guidance is provided beyond the schema's bare structure.

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 it executes an LSP command, specifies that commands are server-defined identifiers from code actions, and provides concrete examples like 'applying a refactoring, generating code'. This effectively distinguishes it from sibling tools like get_code_actions.

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

Usage Guidelines5/5

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

Explicitly advises usage after get_code_actions by stating 'Use this after get_code_actions to trigger a server-side operation'. It also lists typical use cases (refactoring, code generation), providing clear context for when to invoke this tool.

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