upsert_theme_file
Create or update a Shopify theme file by providing theme ID, filename, content, and content type. Enables programmatic management of theme assets.
Instructions
Create or update a theme file
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": {
"themeId": "<themeId>",
"filename": "<filename>",
"content": "<content>",
"contentType": "<contentType>"
},
"name": "upsert_theme_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | File content | |
| themeId | Yes | Theme ID (e.g., 'gid://shopify/OnlineStoreTheme/123456789') | |
| filename | Yes | Filename (e.g., 'sections/header.liquid') | |
| contentType | Yes | Content type |