Skip to main content
Glama
famtong8-dev

W3 MCP LSP Server

by famtong8-dev

lsp_hover

Read-onlyIdempotent

Retrieve type signatures and documentation for any symbol in a JavaScript or TypeScript file by specifying its exact position, using zero-indexed line and character coordinates.

Instructions

Get type information and documentation for symbol at position.

đź”´ CRITICAL: Line and character are STRICTLY 0-INDEXED (0, 1, 2...), NOT 1-indexed!

❌ WRONG (what editor displays): Editor shows: "Ln 5, Col 10" ❌ DON'T use: {"line": 5, "character": 10}

âś… CORRECT (0-indexed): âś… DO use: {"line": 4, "character": 9} Formula: lsp_value = editor_value - 1

CHARACTER COUNTING (0-indexed from start of line): Line: "const greeting = "Hello";" Index: 0123456789... • 'c' in const → character: 0 • 'o' in const → character: 1 • 'g' in greeting → character: 6 • 'H' in string → character: 18

Args: params (LSPInput): Must provide line and character as 0-indexed values

Returns: str: Type signature like "(parameter) name: string" or "No info available"

Example: ✅ {"file_path": "src/app.ts", "line": 4, "character": 9} → "(parameter) greeting: string"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: it emphasizes the critical 0-indexing requirement, shows the exact return format ('(parameter) name: string' or 'No info available'), and explains the formula for converting editor values. The annotations already state readOnly, idempotent, and non-destructive, so the description enriches rather than repeats them. No contradictions found.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a critical warning at the top, clear do/don't examples, and a character indexing diagram. It is somewhat repetitive—the 0-indexing rule is repeated across the warning, character counting section, and schema—but the repetition reinforces a crucial point. It earns a 4 because while not maximally concise, it prioritizes the most important information and remains scannable.

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

Completeness5/5

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

The description is highly complete: it covers the tool's purpose, input parameters with exhaustive indexing guidance, return value format, and a concrete usage example. The output schema is provided, so return value details do not need to be over-explained. Given the potential for off-by-one errors, this description fully equips an agent to invoke the tool correctly.

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?

The description goes far beyond the schema by providing detailed 0-indexing examples, a character-counting illustration, and the conversion formula (lsp_value = editor_value - 1). This adds substantial meaning to the 'line' and 'character' parameters beyond what the schema's descriptions offer. It also clarifies the file_path parameter as relative to the project root. The abundant examples make the parameter usage crystal clear.

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 opens with a specific verb+resource: 'Get type information and documentation for symbol at position.' This clearly distinguishes it from sibling tools like lsp_goto_definition (jump to definition) and lsp_find_references (find references). The purpose is unambiguous and immediately understandable.

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 provides clear context for use by explaining how to convert editor 1-based positions to 0-based values and includes a concrete example. It does not explicitly state when not to use it or contrast with alternatives, but the purpose and critical indexing instructions implicitly guide usage. No exclusion criteria are mentioned, so it scores a 4 rather than a 5.

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/famtong8-dev/w3-mcp-server-lsp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server