Write theme file (full contents)
write_fileWrite full contents of a Shopify theme file, creating a new file or replacing an existing one, and auto-commit the change to git.
Instructions
Create a new theme file or fully overwrite an existing one, then auto-commit to git. For small edits to existing files prefer patch_file — it is safer and cheaper.
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": {
"filename": "<filename>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Full file contents | |
| message | No | Short description of the change for the git log | |
| filename | Yes | Theme-relative path, e.g. snippets/countdown.liquid |