Skip to main content
Glama

Edit a site page

edit_site_page

On one site of the account, named in site. One change to a file of the site folder: find must match exactly once, whitespace included, and is replaced by replace. The result is parsed before it lands, so an edit that would break the page is refused with the line and the file keeps what it had. Each edit is a commit in the person's name and live at once. Then render_page to check your own work, and hand the person the page's address. 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>",
      "path": "<path>",
      "find": "<find>",
      "replace": "<replace>"
    },
    "name": "edit_site_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
findYes
pathYesThe file inside the site folder, like pages/about.liquid
siteYesThe site to work on, as list_sites names it
replaceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

The description adds substantial behavior beyond the annotations: find must match exactly once including whitespace, invalid edits are parsed and refused with the offending line, the original file is preserved on refusal, each edit is committed and live immediately, and the operation is admin-only. This gives an agent a clear picture of validation, failure handling, and mutation consequences.

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?

The description is compact and front-loads the site/file scope before explaining match behavior, validation, commit semantics, and the recommended next step. A few sentences are fragmentary, but they remain information-dense and largely earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a live-editing mutation tool with four required parameters and no output schema, the description covers the important safety and workflow details: exact matching, refusal on broken output, immediate commit, admin restriction, and render_page follow-up. It could say more about the success response and what happens on zero or multiple matches, but the core behavior is complete.

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 50%, but the description compensates by explaining that site names the account site, path is a file inside the site folder, find must match exactly once with whitespace included, and replace substitutes that match. It does not clarify whether find/replace are literal strings versus patterns, but the exact-match wording largely resolves that.

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?

The description states a specific verb and resource: edit one file in a site folder via a single find/replace change. It is clearly distinct from delete_site_page or edit_theme_file by scope, though it does not explicitly name the sibling alternatives.

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?

It gives useful context such as 'Admins only' and recommends running render_page afterward, but it does not explicitly say when to use this versus write_site_page, delete_site_page, or read_site_page. The usage is implied by the exact-match single-edit model rather than spelled out as routing guidance.

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