Skip to main content
Glama

Pagetool

Replace a page with new HTML

replace_page_html
Destructive

Re-imports ONE page (the home page too) from new HTML, in place: same address, same share link, same place in the page order, and a version is saved first so it can be undone. Use it to refresh a page built earlier. stage:true previews it before it goes live. Free.

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": {
      "html": "<html>"
    },
    "name": "replace_page_html"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesThe new full HTML for this page, imported exactly like create_site_from_html (the result includes the import report). The page keeps its address, its place in the page order and its version history; a version is saved first.
pathNoThe page to replace, e.g. "/about". "/" (the home page) is allowed. Defaults to "/".
stageNotrue = replace a staged copy instead of the live page: preview it at staged_preview_url, then publish_staged or discard_staged. Required with the operator token on a live site.
site_keyNoThe site the page belongs to. Defaults to the caller's current draft site when omitted.
draft_tokenNoThe draft token returned by draft_create, if you are working on an anonymous draft. Only needed when your client cannot send the x-pagetool-draft-token header.
keep_added_sectionsNotrue = keep the sections added with add_section (reviews, map and the like) after the imported content, in their original order. Default false: the page is replaced and the result lists them in dropped_sections with a warning (an empty list means none were dropped).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/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, so the description's job is to add context, and it does: address, share link and page order are preserved, a version is saved first so the operation can be undone, and stage:true operates on a staged copy instead of the live page. The schema-level note about dropped_sections and the warning accompanies that in the description's orbit, giving an agent a real picture of the side effects.

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?

Front-loaded with the action and its in-place guarantees, then usage, then the staging option, then the pricing note. Roughly three sentences with no filler and no repetition of the schema.

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 destructive six-parameter mutation with no output schema, the description covers the crucial concerns: reversibility via an automatic version, preserved identity of the page, and the staging escape hatch. It does not discuss auth or token requirements for live sites, which only the schema mentions, leaving a small gap for the most consequential mode.

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 description coverage is 100%, so every parameter is already documented in detail. The description adds essentially one semantic point, that stage:true is a preview that does not go live, which the schema also states. Baseline 3 is appropriate because the schema carries the parameter burden.

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?

"Re-imports ONE page (the home page too) from new HTML, in place" gives a specific verb and resource, and the emphasis on ONE plus the parenthetical carve out exactly which pages are covered. It implicitly separates itself from create_site_from_html (whole-site import) by contrasting scope, so an agent can distinguish the two without opening schemas.

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?

"Use it to refresh a page built earlier" states the intended situation clearly, and "stage:true previews it before it goes live" gives the safe-path condition. What is missing is an explicit negative case or named sibling (e.g. add_page for new pages rather than replacement), so the routing is implied rather than spelled out.

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