get_semantic_tokens
Get semantic tokens for a code range to identify each element's syntactic type and modifiers, clarifying roles like function or variable when hover documentation is not enough.
Instructions
Get semantic tokens for a range in a file. Returns each token's type (function, variable, keyword, parameter, type, etc.) and modifiers (readonly, static, deprecated, etc.) with 1-based line/character positions. Use this to understand the syntactic role of code elements — distinct from hover which gives documentation. Only available when the language server supports textDocument/semanticTokens.
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_path": "<file_path>",
"start_line": "<start_line>",
"start_column": "<start_column>",
"end_line": "<end_line>",
"end_column": "<end_column>"
},
"name": "get_semantic_tokens"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_line | Yes | ||
| file_path | Yes | ||
| end_column | Yes | ||
| start_line | Yes | ||
| language_id | No | ||
| start_column | Yes |