getTypeAtPosition
Get the TypeScript type at a specific line and column in a file, with options to expand nested types.
Instructions
Get the TypeScript type at a specific position in a file
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>"
},
"name": "getTypeAtPosition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| col | No | Column number (1-indexed), overrides :col in file | |
| file | Yes | File path with optional :line:col suffix (e.g., "src/user.ts:10:5") | |
| line | No | Line number (1-indexed), overrides :line in file | |
| content | No | File content for virtual/unsaved files | |
| expandDepth | No | How deep to expand nested types (0=just name, 5=full detail) | |
| projectRoot | No | Project root directory (auto-detected if omitted) |