lsp_hover
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
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |