update_file
Update a Shopify file's alt text, filename, or content after it is ready. Provide the file ID and optional new values to modify its metadata or replace the file source.
Instructions
Update a file's alt text, filename, or content (by providing a new source URL). The file must be in READY state. Requires write_files access scope.
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": {
"id": "<id>"
},
"name": "update_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | GID of the file to update (e.g. 'gid://shopify/MediaImage/123' or 'gid://shopify/GenericFile/123'). | |
| alt | No | New alt text for accessibility. | |
| filename | No | New filename (extension must match original). | |
| original_source | No | New source URL to replace file content (preserves URL). |