Skip to main content
Glama

Replace a whole object with edited XML

patchwork_replace
Destructive

Replace an entire layout, theme, value list or custom function with edited XML to make bulk changes in FileMaker files, creating a new reversible version.

Instructions

Replace a whole layout, theme, value list or custom function with edited XML. Get the XML from patchwork_show, edit it, and send all of it back: anything you leave out is lost. Use it when no specific tool fits; prefer patchwork_place_field, patchwork_retheme and patchwork_recolor_layouts for what they cover. Scripts go through patchwork_set_steps. Makes a new version; patchwork_undo reverses it.

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": {
      "kind": "<kind>",
      "name": "<name>",
      "xml": "<xml>"
    },
    "name": "patchwork_replace"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlYesThe whole object as XML. For a layout, the whole <Layout> block: a lone layout object is skipped.
kindYesKind of the object to replace.
nameYesExact name of the existing object to replace.
dry_runNoOnly write the patch file to .patchwork/ and return its path. Nothing is applied, no version is made.
messageNoWhat this change does, kept in the version log. Default: a short description of the change.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds the operational consequence: 'anything you leave out is lost', plus the recovery path ('Makes a new version; patchwork_undo reverses it'). That is exactly the beyond-annotation context an agent needs before invoking a destructive write.

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?

Four tight sentences, front-loaded with what the tool does, then the required workflow, then the sibling routing, then the reversibility note. No filler, and each clause carries decision-relevant information.

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 destructive 5-parameter write tool with no output schema, the description covers the source of input, the loss risk, the versioning/undo model, and when to prefer alternatives. Nothing an agent needs in order to call it safely is missing.

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 100%, so the baseline is 3; the description earns above that by documenting the required workflow for the xml parameter (obtain it from patchwork_show, edit, return the whole thing) and by clarifying the all-or-nothing contract. It stops short of adding per-parameter detail for dry_run or message, which the schema already covers.

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 ('Replace') plus an explicit resource scope ('a whole layout, theme, value list or custom function with edited XML'), which distinguishes it from the granular siblings it names. An agent can identify this as the wholesale-overwrite tool 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 an explicit fallback rule ('Use it when no specific tool fits'), names three preferred alternatives with their coverage domains (patchwork_place_field, patchwork_retheme, patchwork_recolor_layouts), and routes scripts elsewhere to patchwork_set_steps. This is the when/when-not/alternatives pattern in full.

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