Selection Range
selectionRangeSelects semantically meaningful code ranges by expanding or shrinking selection to enclosing syntactic constructs like statements, blocks, and functions.
Instructions
Get semantically meaningful selection ranges for smart expand/shrink selection. Returns nested spans that represent progressively larger syntactic constructs. Useful for structural code selection (e.g., select expression → statement → block → function).
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>",
"locations": "<locations>"
},
"name": "selectionRange"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | File path (absolute or relative to cwd) | |
| locations | Yes | Array of positions to get selection ranges for |