Write draft file
write_draft_fileCreate a new theme file in a Fudge draft, or with replace rewrite a whole file. New theme filenames include the draft’s file prefix, except templates, config and locales. Every sections/*.liquid file needs a {% schema %} with a non-empty "name".
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": {
"draft": "<draft>",
"path": "<path>",
"content": "<content>"
},
"name": "write_draft_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | A theme file such as sections/main-product.liquid or templates/product.json, or a content document such as .entities/product/123.jsonc or .entities/page/45.body.html. | |
| draft | Yes | The draft’s fudge://project/… ref. | |
| store | No | The connected store to use. Omit when only one is connected. | |
| content | Yes | The complete file content, without line numbers. | |
| replace | No | True to replace an existing file you have read in full. | |
| revision | No | The revision returned when this file was read, when replacing. |