Skip to main content
Glama

start_lsp

Initialize the language server for a project directory to enable code analysis features like finding references, getting type information, and checking diagnostics.

Instructions

Initialize or reinitialize the LSP server with a specific project root directory. Call this before using get_references, get_info_on_location, or get_diagnostics when working in a project different from the one the server was started with. root_dir should be the workspace root (directory containing go.mod, package.json, Cargo.toml, etc.). Optional language_id (e.g. "go", "typescript", "rust") selects a specific configured server in multi-server mode — use this when working in a mixed-language repo to ensure the correct server handles the workspace. If unsure which server is active, call get_server_capabilities first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
root_dirYes
language_idNo
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses behavioral traits such as the initialization/reinitialization function, prerequisites for other tools, and context for optional parameters. However, it lacks details on error handling, side effects, or performance implications, keeping it from a perfect score.

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, starting with the core purpose. Each sentence adds value: prerequisites, parameter details, and usage tips. There is no redundant or wasted text, making it 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?

For a tool with no annotations, no output schema, and 2 parameters, the description is largely complete, covering purpose, usage, and parameters. However, it lacks explicit mention of return values or error cases, which could be helpful given the complexity of LSP initialization.

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

Parameters5/5

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

Given 0% schema description coverage, the description fully compensates by explaining both parameters: 'root_dir' as the workspace root with examples (e.g., 'directory containing go.mod, package.json, Cargo.toml') and 'language_id' for selecting a server in multi-server mode with usage context. It adds meaning beyond the bare schema.

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 action ('Initialize or reinitialize the LSP server') and resource ('with a specific project root directory'), distinguishing it from sibling tools like 'restart_lsp_server' or 'detect_lsp_servers'. It explicitly mentions the verb and target, avoiding tautology.

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 ('before using get_references, get_info_on_location, or get_diagnostics when working in a project different from the one the server was started with') and includes alternatives ('call get_server_capabilities first' if unsure). It also distinguishes usage contexts like multi-language repos.

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