Skip to main content
Glama

open_document

Open a file in the LSP server for analysis to enable diagnostics, hover information, and completions. Specify the language for appropriate language service handling.

Instructions

Open a file in the LSP server for analysis. Use this tool before performing operations like getting diagnostics, hover information, or completions for a file. The file remains open for continued analysis until explicitly closed. The language_id parameter tells the server which language service to use (e.g., 'typescript', 'javascript', 'haskell'). The LSP server starts automatically on MCP launch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
language_idNo
textNo
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 and does well by disclosing key behavioral traits: the file remains open for continued analysis until explicitly closed, the language_id parameter's purpose, and that the LSP server starts automatically on launch. It doesn't cover error handling or performance aspects, but provides substantial operational context.

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 efficiently structured with three sentences that each add value: first states the purpose, second provides usage guidelines, third explains parameter semantics and server behavior. No wasted words, and key information is front-loaded.

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 3 parameters, 0% schema coverage, no annotations, and no output schema, the description does well by covering purpose, usage context, and some parameter semantics. It could explain the text parameter or error cases more, but provides sufficient context for basic operation given the complexity.

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?

With 0% schema description coverage for 3 parameters, the description compensates by explaining the language_id parameter's purpose ('tells the server which language service to use') and implying file_path is required (though not explicitly stated). It doesn't cover the text parameter, but adds meaningful context 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 ('Open a file in the LSP server for analysis') and distinguishes it from sibling tools by explaining this is a prerequisite for operations like diagnostics, hover, or completions. It explicitly names the resource (file) and context (LSP server).

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 performing operations like getting diagnostics, hover information, or completions') and distinguishes it from alternatives by noting the file remains open until explicitly closed (implying close_document is the counterpart). It also mentions the LSP server starts automatically, clarifying prerequisites.

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