Skip to main content
Glama

Edit draft file

edit_draft_file
Destructive

Change part of a theme file or .entities document in a Fudge draft by replacing exact text, without line gutters. Fudge validates the result and refreshes the preview.

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>",
      "edits": "<edits>"
    },
    "name": "edit_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.
editsYes
storeNoThe connected store to use. Omit when only one is connected.
revisionNoThe revision returned when this file was read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the mutation profile is covered. The description adds genuine value by saying Fudge validates the result and refreshes the preview, but it omits what happens when validation fails, whether the edit list is atomic, and how the 'revision' conflict is handled.

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?

Two efficient sentences with the core action front-loaded and the validation/preview behavior trailing as useful context. 'Without line gutters' is slightly cryptic but compact rather than wasteful.

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?

A five-parameter destructive mutation with no output schema needs more than a two-sentence summary. Validation and preview refresh are covered, but failure behavior, atomicity across up to 50 edits, and revision-conflict handling are all absent.

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 coverage is 80%, so the schema already explains old_string/new_string, replace_all, and the two path categories. The description only echoes that replacement is exact-text based and adds nothing about the 'revision' concurrency parameter or the multi-edit array semantics. Baseline 3 is appropriate.

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: replacing exact text in 'a theme file or .entities document in a Fudge draft'. That scope separates it from broad content-editing siblings, though it never names edit_draft_content or write_draft_file, so the boundary is only implied.

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

Usage Guidelines2/5

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

No explicit when-to-use guidance. The phrase 'replacing exact text' hints at surgical edits versus full rewrites, and 'without line gutters' hints it differs from a line-numbered editor, but the agent is given no condition for choosing this over write_draft_file or edit_draft_content.

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.