Skip to main content
Glama

open_file

Open a file from the project root to trigger LSP diagnostics, making it available for on-demand checks and navigation.

Instructions

Open a file in the LSP server. This triggers diagnostics and makes the file available for subsequent no-arg diagnostics calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesRelative file path from project root

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It explicitly reveals that calling open_file triggers diagnostics and makes the file available for subsequent no-arg diagnostics calls, which is meaningful side-effect information beyond the basic 'open' verb. It does not mention potential errors or idempotency, but the disclosed side effects are relevant and non-obvious.

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?

Two sentences with no filler. The core action is front-loaded, and the behavioral effect is given in a compact second sentence. Every word earns its place.

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 one-parameter tool with no output schema and no annotations, the description covers the essential context: what it does, what side effects it has, and how it relates to future diagnostics calls. It doesn't mention error handling or return values, but those are arguably less critical for this simple LSP operation and can be inferred. Minor gap: no explicit statement that the file must exist or that the path is project-relative (though the schema covers that).

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

Parameters3/5

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

Schema description coverage is 100%: the only parameter, 'file', is already documented as 'Relative file path from project root'. The description adds no further detail about the parameter (e.g., format constraints, whether the file must exist). Baseline of 3 is appropriate since the schema already provides complete parameter semantics.

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 states a specific verb and resource ('Open a file in the LSP server') and immediately clarifies its role: it triggers diagnostics and enables subsequent no-arg diagnostics calls. This clearly separates it from the many navigation and inspection siblings like goto_definition or hover.

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

Usage Guidelines4/5

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

The description implies when to use the tool: before running no-arg diagnostics, and it explains the consequence of doing so. It does not explicitly name alternatives or state when not to use it, but the context given is clear enough for an agent to infer the appropriate call sequence.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.