translate_document_position

[codefix]

Translates a position across live document version history.

Why this tool exists

Editor and agent workflows often need preview-first writes and in-memory text to stay aligned while planning or validating edits.

How it helps the agent

The model can preview disk writes, preserve live document version guards, and keep semantic reads aligned with fresh edits.

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

Translate a cursor to the latest document version

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.

↑/↓ NavigateEnter OpenSpace Expand