Skip to main content
Glama

Replace the site's design or pages

replace_site
Destructive

Replace an existing site's DRAFT. With template_slug: switch it to another template — the owner said 'not my style' and picked another design. The whole draft is replaced (pages, theme, header and footer), so redo the copy and photos for the business afterwards. With fixture: replace everything with a fixture you composed; with page_updates: replace only the listed pages' trees. Saved as a draft — the live URL is unchanged until publish. Share url (the preview) and relay next_step; never say it is live.

Input Schema

NameRequiredDescriptionDefault
themeNoOptional theme swap. Can be combined with either fixture or page_updates.
fixtureNoFull updated Fixture — replaces all pages and site elements. Provide this OR page_updates, not both.
site_idYesThe site UUID returned by create_site_from_template or list_sites.
page_updatesNoPartial update — only the listed pages are changed. Provide this OR fixture, not both.
template_slugNoSwitch the site to this template (a slug from find_templates): its pages, theme and starter items replace the draft, on the SAME site — never build a second site for a switch. Then rewrite the copy and swap the photos for this business again, as after a first build. Do it only on the owner's yes.
expected_draft_updated_atNoOptional: the draft_updated_at from the get_page (with view: "content") you built this from. If the draft changed since (the owner edited in the editor), the update is refused with stale_fixture instead of overwriting their work.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and non-idempotent, but the description goes further: it says precisely what is destroyed (pages, theme, header and footer), that the work must be redone afterwards (copy and photos), and that the live URL is unaffected because the result is still a draft. It adds post-call behavior too — share `url`, relay `next_step`, never claim it is live.

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 action, then mode-by-mode breakdown, then the post-call instruction — a clean structure. A few clauses (the owner's "not my style" quote, the repeated reminder to redo copy and photos) are slightly padded, but nothing is redundant with the schema.

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, nested-payload mutation with no output schema, the description covers draft-vs-live semantics, the three payload shapes, consent, and the follow-up agent script; the stale-write guard lives in the schema text. Nothing an agent needs to invoke this 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 it by explaining the semantic effect of each mode argument (template_slug rewrites the same site rather than creating a new one; fixture replaces everything; page_updates touches only listed page trees). It does not add detail on expected_draft_updated_at or theme combination beyond what the schema already states.

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 ("Replace an existing site's DRAFT") and then enumerates the three mutually exclusive modes. An agent can distinguish this from sibling patch_fixture, create_site_from_template, update_page, and set_theme from the text alone.

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 explicit selection conditions per mode (template_slug = owner wants a different design, fixture = replacement you composed, page_updates = only listed pages) and an exclusion rule: "never build a second site for a switch." It also states the consent prerequisite ("Do it only on the owner's yes"), which is exactly the kind of routing an agent needs.

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