Skip to main content
Glama

Edit several site files

edit_site_files
Destructive

Edit several files as ONE atomic write: per entry a path plus edits (as edit_site_file), or text to create a file. A new pages/.liquid also creates its page, so a page plus its nav link is one call. All land or none. Linted on save. Stages in the draft.

Input Schema

NameRequiredDescriptionDefault
idNoSite id.
filesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / files / items / properties / edits / items / properties / insertAfter
      Added value: +{
      +  "description": "Instead of oldText: anchor text (once in the file); newText goes right after it.",
      +  "maxLength": 200000,
      +  "type": "string"
      +}
    • addedInput schema / properties / files / items / properties / edits / items / properties / insertBefore
      Added value: +{
      +  "description": "Instead of oldText: newText goes right before this anchor.",
      +  "maxLength": 200000,
      +  "type": "string"
      +}
    • changedInput schema / properties / files / items / properties / edits / items / required
      Previous value: -[
      -  "oldText",
      -  "newText"
      -]New value: +[
      +  "newText"
      +]
    • addedInput schema / properties / files / items / properties / name
      Added value: +{
      +  "description": "Name of the page a new pages/ file creates (default from the file name).",
      +  "maxLength": 512,
      +  "type": "string"
      +}
    • addedInput schema / properties / files / items / properties / seo
      Added value: +{
      +  "description": "SEO of that page, as add_page's seo.",
      +  "type": "object"
      +}
    • addedInput schema / properties / files / items / properties / text
      Added value: +{
      +  "description": "A new file's whole text, instead of edits.",
      +  "maxLength": 2000000,
      +  "type": "string"
      +}
    • changedInput schema / properties / files / items / required
      Previous value: -[
      -  "path",
      -  "edits"
      -]New value: +[
      +  "path"
      +]
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructive/non-idempotent/not-read-only, and the description adds genuinely new traits: all-or-nothing atomicity, lint-on-save rejection, draft staging rather than live publish, and implicit page creation for new pages files. It does not cover conflict/version failure behavior or what happens to unchanged files, so it's strong but not complete.

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?

Front-loaded with the atomic-write guarantee, then the entry model, then side effects and stage semantics in four dense sentences with no filler. Phrasing is telegraphic ('as edit_site_file', 'All land or none'), which is efficient but requires the agent to look up the sibling for edit-shape details.

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 batch mutation with no output schema, it covers the essentials an agent needs: atomicity, lint gate, draft staging, side-effect page creation, and the two entry modes. Return values aren't documented, but no output schema exists and the description's core behavioral risks are all disclosed.

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?

With 50% schema coverage, the description meaningfully compensates by explaining the entry model: path plus `edits` mirroring edit_site_file, or `text` for whole-file creation, plus the page-creation consequence for pages paths. It says nothing about `id`, `baseVersion`, `seo`, or `name`, though those carry schema descriptions.

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 with scope: batch edit of several site files as ONE atomic write. It explicitly contrasts its per-entry modes (edits 'as edit_site_file', or `text` to create) and its implicit side effect (a new pages/<slug>.liquid also creates its page), which distinguishes it cleanly from edit_site_file and write_site_file.

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

Usage Guidelines4/5

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

Conveys when to prefer this over the singular sibling: multiple files that must move together, and the page-plus-nav-link scenario folded into one call. It stops short of stating explicit exclusions (e.g. 'use edit_site_file for a single file', 'use write_site_file for a full rewrite'), leaving the agent to infer single-vs-batch routing.

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