Skip to main content
Glama

Write a theme file

write_theme_file
Idempotent

On one site of the account, named in site. A whole file of the theme, new or replaced (.liquid .json .css .js .md .txt .svg .html, up to 256 KB): a commit in the person's name, live by itself once the theme is whole — the answer says live, or held with why, and the file's warnings. A menu link is a row of set_navigation, never a link in the theme. For a change inside an existing file use edit_theme_file. Never assets/built in a theme that builds — that is the build's output. Admins only.

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": {
      "site": "<site>",
      "theme": "<theme>",
      "path": "<path>",
      "content": "<content>"
    },
    "name": "write_theme_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
siteYesThe site to work on, as list_sites names it
themeYes
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing that the write produces a commit in the person's name, that the file goes live once the theme is whole, and that the response reports `live` or `held` with a reason plus file warnings. It also adds a 256 KB cap and extension allowlist. Minor gap: it doesn't clarify how a 'replaced' file's prior contents are handled, though idempotentHint covers repeat writes.

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?

Extremely dense but front-loaded: scope first, then what counts as a valid write, then the response, then the sibling routing, then the hard exclusions. Every clause carries a distinct constraint; nothing is filler despite the telegraphic run-on style.

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 four-parameter write with no output schema, it covers scope, format limits, side effects (commit, going live or held), the response shape, auth requirements, and the main misuse traps. An agent has everything needed to call it correctly.

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

Parameters4/5

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

Schema coverage is only 25% (just `site` is described), so the description has to compensate and largely does: it defines `path` through the allowed extensions and the size ceiling, and establishes that `content` is the entire file body rather than a patch. The `theme` parameter remains unexplained, keeping it from a 5.

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?

States a specific verb and resource — writing a whole theme file, new or replaced, on one site. It explicitly distinguishes itself from sibling edit_theme_file (in-place edits) and delete/read_theme_file by scope, so an agent can choose it without opening the schema.

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?

Gives explicit when-not guidance: use edit_theme_file for changes inside an existing file, use set_navigation for menu links, and never write assets/built in a building theme. It also states the prerequisite that only admins can call it.

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