Browse documentation

translate_document_position

[codefix]

Translates a position across live document version history.

Try it locally in the TGlider playground

Parameters

NameTypeRequiredDescription
filePathstringYesWorkspace-relative or absolute file path.
linenumberYes1-based source line.
columnnumberYes1-based source column.
fromVersionnumberYesSource live-document version.
toVersionnumberNoOptional 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.