Skip to main content
Glama
famtong8-dev

W3 MCP LSP Server

by famtong8-dev

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PROJECT_ROOTNoRoot directory of your project. Defaults to current directory.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
lsp_goto_definitionA

Jump to symbol definition location.

šŸ”“ 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: "file:line:column" or "Definition not found"

Example: āœ… {"file_path": "src/app.ts", "line": 4, "character": 9} → "/path/src/app.ts:15:5"

lsp_hoverA

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"

lsp_find_referencesA

Find all usages/references of 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: "Found N references:

file:line:column ..." or "No references found"

Example:
    āœ… {"file_path": "src/app.ts", "line": 4, "character": 9}
    → "Found 2 references:

/path/src/app.ts:5:9 /path/src/utils.ts:10:2"

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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