update_document
[codefix]
Replaces the full text of an already open live document.
Try it locally in the TGlider playground
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filePath | string | Yes | Workspace-relative or absolute file path. |
| text | string | Yes | New full in-memory document text. |
Examples
Replace sample paths and symbol keys with values from your workspace.
Replace live document text
Arguments
{
"filePath": "src/app.ts",
"text": "export const value = 2;"
}Full MCP request
Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "update_document",
"arguments": {
"filePath": "src/app.ts",
"text": "export const value = 2;"
}
}
}Response Notes
Returns updated live document version and workspace revision metadata.