Skip to main content
Glama

replace_page_document

Destructive

Replace and stage the whole document. Include all elements, settings and theme to keep. Does not publish.

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": {
      "target": "<target>",
      "document": "<document>"
    },
    "name": "replace_page_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYesTarget page resource; kind must be page.
documentYes
previewScenariosNoComplete ordered set of up to six named preview states. Omit to retain the previous set; pass an empty array to clear. Keep scenarios relevant to the current page

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / previewScenarios
      Added value: +{
      +  "description": "Complete ordered set of up to six named preview states. Omit to retain the previous set; pass an empty array to clear. Keep scenarios relevant to the current page",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "description": {
      +        "type": "string"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "overrides": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "dataFixtures": {
      +            "oneOf": [
      +              {
      +                "description": "Omit or pass null to use normal sample data. An empty array matches no queries.",
      +                "items": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "error": {
      +                      "description": "Optional message for the error scenario.",
      +                      "type": "string"
      +                    },
      +                    "hasMore": {
      +                      "description": "Paginated queries only. Defaults to true for loadingMore and false otherwise. empty requires false.",
      +                      "type": "boolean"
      +                    },
      +                    "params": {
      +                      "description": "Optional complete query parameters to match after host normalization. Omit to match all parameters for this query. Exact matches take precedence.",
      +                      "type": "object"
      +                    },
      +                    "query": {
      +                      "description": "Query name from the page queries catalog.",
      +                      "type": "string"
      +                    },
      +                    "scenario": {
      +                      "description": "Fixed visual state. success refreshing and loadingMore use built-in sample records unless value is supplied. Other scenarios use the query initial value. Data actions do not change fixture states.",
      +                      "enum": [
      +                        "success",
      +                        "empty",
      +                        "idle",
      +                        "loading",
      +                        "error",
      +                        "refreshing",
      +                        "loadingMore"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "value": {
      +                      "anyOf": [
      +                        {
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "number"
      +                        },
      +                        {
      +                          "type": "boolean"
      +                        },
      +                        {
      +                          "type": "object"
      +                        },
      +                        {
      +                          "type": "array"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ],
      +                      "description": "Optional complete query result matching its result schema. Pass JSON directly including explicit null. Omit for built-in data. Not allowed with empty."
      +                    }
      +                  },
      +                  "required": [
      +                    "query",
      +                    "scenario"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "inputs": {
      +            "type": "object"
      +          },
      +          "state": {
      +            "type": "object"
      +          }
      +        },
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "name",
      +      "description",
      +      "overrides"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / target / properties / designId
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / target / properties / kind / enum
      Previous value: -[
      -  "page",
      -  "email"
      -]New value: +[
      +  "page",
      +  "email",
      +  "wallet",
      +  "apple-wallet",
      +  "google-wallet"
      +]
  2. Changed3 schema fields changed
    • removedInput schema / properties / expectedRevision
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / target / properties / organizationId
      Removed value: -{
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "target",
      -  "expectedRevision",
      -  "document"
      -]New value: +[
      +  "target",
      +  "document"
      +]
  3. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, so the bar is lower, and the description still adds real context: the operation stages rather than publishes, and you must include everything you want to keep. It stops short of explicitly saying prior document content is discarded or what is returned, but the staging and completeness semantics are material additions.

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?

Three short, front-loaded statements with no filler, and the key constraint ('Does not publish') is placed at the end where it still reads clearly. The phrasing 'Include all elements, settings and theme to keep' is slightly telegraphic but still parses.

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

Completeness3/5

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

For a destructive whole-document replacement with a deeply nested schema and no output schema, the description covers staging and completeness but omits what happens to existing content, whether a draft is created or updated, and any guidance on the previewScenarios parameter. Annotations carry the destructive signal, so this is adequate but not complete.

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 coverage is 67% and the target and previewScenarios parameters are already documented in the schema. The description adds only an indirect hint that 'document' is the complete payload; it says nothing about the target kinds or the previewScenarios parameter, which is the most complex part of the schema.

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?

States a specific verb and resource: 'Replace and stage the whole document', and clarifies scope with 'Does not publish'. It doesn't distinguish itself from the partial-edit sibling (edit_page_document), but the whole-document vs partial distinction is at least implied by 'whole document'.

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?

'Include all elements, settings and theme to keep' implies this is a full-replacement operation where omitted content is lost, which is useful when-to-use signal. However, it never names the alternative (edit_page_document) or states an explicit exclusion such as 'use edit_page_document for partial changes'.

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.