Skip to main content
Glama

execute_command

Execute LSP workspace commands to apply refactorings, generate code, or trigger server-specific operations after identifying available actions.

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
Behavior3/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 of behavioral disclosure. It describes that the tool executes commands via LSP, returns server-defined results or null, and mentions server-side operations, but lacks details on error handling, permissions, rate limits, or side effects. For a tool that likely involves server interactions, this is a moderate gap, but the description covers basic behavior adequately.

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 appropriately sized and front-loaded, with three sentences that each earn their place: the first states the purpose, the second provides usage guidelines, and the third explains the return value. There is no redundant or verbose language, making it efficient and easy to parse.

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 the tool's complexity (LSP command execution with server interactions), no annotations, no output schema, and 0% schema coverage, the description does well by explaining purpose, usage, and return values. However, it could benefit from more details on error cases or behavioral nuances. It's largely complete but has minor gaps for a tool of this nature.

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 description coverage is 0%, so the description must compensate. It explains that 'command' is a server-defined identifier from code actions and 'arguments' are used with it, adding meaningful context beyond the schema's type definitions. However, it doesn't specify format examples or constraints for arguments, leaving some ambiguity. With 0% coverage, this is above baseline but not fully comprehensive.

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 tool's purpose with specific verbs ('execute a workspace command via LSP') and resources ('server-defined identifiers returned by code actions'), distinguishing it from siblings like get_code_actions (which provides commands) and apply_edit (which applies edits directly). It explicitly mentions triggering server-side operations like refactoring, code generation, or server-specific 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?

The description provides explicit guidance on when to use this tool ('Use this after get_code_actions') and distinguishes it from alternatives by specifying its role in the workflow (triggering server-side operations rather than just retrieving actions or applying edits). It clearly indicates the prerequisite step and the tool's specific function in the LSP command execution process.

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