Skip to main content
Glama

shopify_upsert_theme_files

DestructiveIdempotent

Create or update up to 50 Shopify development theme files in a single call, verifying file digests and preventing changes to main themes.

Instructions

Create or update up to 50 files on a DEVELOPMENT theme in one call. UNPUBLISHED release candidates and MAIN themes are immutable and refused with SHOPIFY_THEME_ROLE_PROTECTED. The connector waits for the bounded Shopify job and independently compares exact filename/body representation digests.

Args:
    theme_id (required): DEVELOPMENT theme ID (numeric or GID).
    files (required): JSON-string list of files (max 50): [{filename, content?, url?, base64?}]. Use content for text bodies (Liquid/JSON/CSS); url or base64 for binary assets.
    expected_preimage_sha256 (required): Exact governed get_theme lifecycle digest approved for this file mutation.
    project_id: Authenticated Project UUID.
    project_ref: Exact project correlation reference.
    connector_account_ref: Project-bound connector account alias.
    idempotency_key: Stable business-action identity.
    effect: Claimed read or write effect; Spring verifies it.
    approval_ref: Approved platform task UUID when resuming a write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
effectNo
theme_idNo
project_idNo
project_refNo
approval_refNo
idempotency_keyNo
connector_account_refNo
expected_preimage_sha256No

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.1.1

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that the operation waits for a bounded job and independently compares digests, adding behavioral context beyond the annotations. It also mentions the refusal for immutable themes, which is a side effect. The write nature is obvious from 'Create or update', and the annotations already provide hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured, with a clear statement of purpose, a constraint, and a behavior note. It fits within a few sentences without unnecessary fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main purpose and key constraints, but it does not explain the output or the auxiliary parameters. Given the existence of an output schema, the lack of output explanation is acceptable, but the missing parameter context reduces completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explains theme_id, files, and expected_preimage_sha256, but the remaining six parameters are undocumented. The input schema provides no descriptions, so the coverage is low. The description only partially compensates, leaving many parameters unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates or updates up to 50 files on a development theme, with a specific limit and target. It distinguishes this from other theme file operations by mentioning the restriction to development themes and the error for release candidates or main themes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides guidance on when to use it by explicitly stating that only development themes are allowed, and that release candidates and main themes are refused. This helps the agent avoid misuse, though it does not explicitly compare with sibling tools like shopify_delete_theme_files.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RPasquale/lightbulb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server