Skip to main content
Glama

Fudge for Shopify

Write draft file

write_draft_file
Destructive

Create a new theme file in a Fudge draft, or with replace rewrite a whole file. New theme filenames include the draft’s file prefix, except templates, config and locales. Every sections/*.liquid file needs a {% schema %} with a non-empty "name".

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": {
      "draft": "<draft>",
      "path": "<path>",
      "content": "<content>"
    },
    "name": "write_draft_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesA theme file such as sections/main-product.liquid or templates/product.json, or a content document such as .entities/product/123.jsonc or .entities/page/45.body.html.
draftYesThe draft’s fudge://project/… ref.
storeNoThe connected store to use. Omit when only one is connected.
contentYesThe complete file content, without line numbers.
replaceNoTrue to replace an existing file you have read in full.
revisionNoThe revision returned when this file was read, when replacing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, idempotentHint=false and non-open-world, so safety is covered. The description contributes domain-specific behavioral constraints beyond annotations: filename prefixing rules and the validation requirement that every sections/*.liquid file contain a non-empty {% schema %} 'name'.

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?

Three tight sentences, front-loaded with the primary action and the mode switch, with the naming and validation rules following. Nothing is redundant, though the prefix sentence is compressed to the point of mild ambiguity about which files are exempt.

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?

For a destructive, non-idempotent write with no output schema, the description covers naming and content validation but omits what happens when the target already exists without `replace`, and says nothing about the `revision`/read-before-write precondition that governs the replace path.

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 already 100%, so baseline is 3, but the description adds real meaning beyond the schema: the per-draft filename prefix rule affecting `path` (with exceptions for templates, config and locales) and the semantic distinction between create and rewrite that no schema field captures.

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

Purpose4/5

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

States a specific verb and resource (create a theme file in a Fudge draft) and disambiguates its two modes: new file creation versus full-file rewrite via `replace`. It does not explicitly distinguish itself from `edit_draft_file`, though the 'rewrite a whole file' phrasing implies the contrast.

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

Usage Guidelines3/5

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

The description implies when to set `replace` (whole-file rewrite) versus creating a new file, but never states the precondition that the file must have been read first, nor when to prefer `edit_draft_file` over a full rewrite. Usage guidance is inferable rather than explicit.

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.