translate_document_position
[codefix]
Translates a position across live document version history.
Try it locally in the TGlider playground
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filePath | string | Yes | Workspace-relative or absolute file path. |
| line | number | Yes | 1-based source line. |
| column | number | Yes | 1-based source column. |
| fromVersion | number | Yes | Source live-document version. |
| toVersion | number | No | Optional target live-document version. Defaults to the current live version. |
Examples
Replace sample paths and symbol keys with values from your workspace.
Translate a cursor to the latest document version
Arguments
{
"filePath": "src/app.ts",
"line": 10,
"column": 5,
"fromVersion": 1
}Full MCP request
Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "translate_document_position",
"arguments": {
"filePath": "src/app.ts",
"line": 10,
"column": 5,
"fromVersion": 1
}
}
}Response Notes
Returns translated line and column when version history can map the position.