Skip to main content
Glama

lsp_hover

Read-onlyIdempotent

Retrieve the type signature and documentation for a symbol at a given file and line. This helps understand code without leaving the editor.

Instructions

Type signature and documentation of the symbol at file:line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesSource file
lineYes1-based line
symbolNoIdentifier on that line; its column is found automatically
characterNo1-based column (or give symbol instead)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and a closed world, so the safety profile is fully covered by structured data. The description adds some value by disclosing what is returned (type signature plus docs), but says nothing about behavior when no symbol exists at the position or about server availability errors.

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?

A single front-loaded sentence with no filler; the location and the returned content are both stated immediately. Nothing could be trimmed without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description does the important work of naming the return payload (type signature and documentation), which is genuinely necessary. However, it omits edge-case behavior such as empty results when no symbol is under the cursor, leaving a gap for a tool an agent will call speculatively.

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 coverage is 100%, and the schema itself documents both the file/line anchors and the symbol-vs-character alternative mechanism. The description only echoes 'file:line' and adds no syntax, format, or precedence detail beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the specific resource returned (type signature and documentation) at a precise location (file:line), which is far more informative than a bare 'hover'. It does not explicitly contrast itself with close siblings like lsp_definition or lsp_references, but the returned artifact is distinct enough that an agent can differentiate them.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus alternatives (lsp_definition, lsp_references, find_symbol), nor any prerequisites such as needing a running LSP server. The agent must infer usage purely from the name and the LSP convention.

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

Deploy Server

Other Tools