close_document

[codefix]

Closes an in-memory live document so TGlider returns to disk-backed source for that file.

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.

Examples

Close a live document

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "close_document",
    "arguments": {
      "filePath": "src/app.ts"
    }
  }
}

Response Notes

Returns whether the document was closed and the new workspace revision.

↑/↓ NavigateEnter OpenSpace Expand