update_file
Update one of the four root files. Always provide the COMPLETE file content, not a partial diff. The content is parsed before it is stored — if it has a syntax error, or if the composition is invalid, the file is NOT updated and the error is returned to you. Otherwise it is reformatted, committed, and applied to the live editor immediately, so you can screenshot the preview afterwards to check your work. Only these four names are accepted: a path like components/product-card/template.hbs is not a file and cannot be written here — use update_component. Changes are saved to the catalogue and can queue a thumbnail render that fetches external assets referenced by its content.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"documentId": "<documentId>",
"file": "<file>",
"content": "<content>",
"llm_model": "<llm_model>"
},
"name": "update_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The file to update | |
| content | Yes | The complete new content for the file | |
| llm_model | Yes | The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess. | |
| documentId | Yes | The catalogue's id. Call list_documents first if you do not have one. | |
| conversation_id | No | Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request. | |
| expectedRevision | No | The contentRevision you read this file at. Always send it. Without it a write built from stale source can overwrite somebody else's edit or a lock they have just set. | |
| activateComponents | No | Only with file "template.hbs", and only when converting a legacy catalogue: switches the document to component mode in the same commit as the entry that composes the layouts. Rejected if the registry does not validate or the entry places no page layout. A document already in component mode ignores it, and nothing can switch a document back. |