Skip to main content
Glama

Upsert Shopify theme file

upsert_shopify_theme_file
Destructive

Create or overwrite one file (Liquid/CSS/JS/JSON source code) in an UNPUBLISHED Shopify theme — this is how agents build the storefront website on a draft theme. Refuses the LIVE (MAIN) theme; publishing a theme to buyers is a separate approval-gated step. Use when a person or agent is building or editing the site's draft theme.

Routing: Shopify: write a theme source file on an UNPUBLISHED theme — refuses the live theme

[sensitive-tier — first use may require a manager's approval; a from-now-on approval makes future calls seamless, a just-once approval re-asks next time. Call it on the first clear ask; the card is the yes — do not re-ask in chat.]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe full file content (≤200000 chars)
filenameYesTheme path, e.g. 'sections/hero.liquid' or 'assets/custom.css'
theme_idYesTheme gid (gid://shopify/OnlineStoreTheme/...) — must NOT be the live theme
companyIdYesFreedomOS company id to act within (you must be a member). Required for company-scoped tools.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond annotations, the description discloses important guardrails: refusal of live themes, overwrite semantics, the separate publishing step, and detailed approval-tier behavior. The sensitive-tier guidance about 'first clear ask', 'from-now-on' vs 'just-once' approvals, and not re-asking materially changes how an agent should behave.

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

Conciseness4/5

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

The description is front-loaded with the core purpose and safety constraint, then provides routing and approval context. It is slightly repetitive — the 'refuses the live theme' point appears twice — but the extra information about approval behavior is valuable and earns its place.

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

Completeness5/5

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

For a mutating, destructive operation with a 100%-documented schema, the description covers what the tool does, the only valid target (unpublished themes), the live-theme refusal, the approval workflow, and the relationship to publishing. Nothing needed for correct invocation is missing.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema already documents each parameter, including the constraint that theme_id must not be the live theme and the filename path format. The description adds no parameter-level detail beyond the schema, so the baseline 3 is appropriate.

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 states a specific action ('Create or overwrite one file') and resource ('UNPUBLISHED Shopify theme') with content types. The explicit 'refuses the LIVE (MAIN) theme' and 'draft theme' framing distinguish it clearly from sibling tools like update_live_shopify_theme_file and publish_shopify_theme.

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

Usage Guidelines5/5

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

It explicitly says when to use the tool ('Use when a person or agent is building or editing the site's draft theme') and what it will not do ('Refuses the LIVE (MAIN) theme'). The routing line reinforces the intended usage and the publishing step is identified as a separate, approval-gated operation.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources