Skip to main content
Glama

close_document

Close files in the LSP server to free up resources and reduce memory usage when documents are no longer being analyzed.

Instructions

Close a file in the LSP server. Use this tool when you're done with a file to free up resources and reduce memory usage. It's good practice to close files that are no longer being actively analyzed, especially in long-running sessions or when working with large codebases.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
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. It explains the tool's purpose and benefits (freeing resources, reducing memory usage) but lacks details on potential side effects (e.g., whether closing affects unsaved changes, error handling, or specific LSP server behavior). It provides some behavioral context but not comprehensive operational details.

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 front-loaded with the core action ('Close a file in the LSP server'), followed by usage guidance and rationale. Each sentence adds value without redundancy, making it efficient and well-structured for quick comprehension.

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 low complexity (1 parameter, no output schema, no annotations), the description is mostly complete. It covers purpose, usage, and benefits, but lacks details on error cases or server-specific behaviors. For a simple close operation, this is adequate but not exhaustive.

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?

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It implies the parameter is a file path ('Close a file'), but doesn't explicitly define 'file_path' or its format. Since there's only one parameter and its purpose is reasonably inferred, the description adds sufficient 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 action ('Close a file in the LSP server') and the resource ('a file'), distinguishing it from sibling tools like 'open_document' or 'destroy_session'. It specifies the exact operation and target, making the purpose unambiguous.

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 explicitly states when to use this tool ('when you're done with a file') and provides context for its application ('to free up resources and reduce memory usage', 'especially in long-running sessions or when working with large codebases'). It differentiates usage from other tools by focusing on resource management.

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