Skip to main content
Glama

edit_page_document

Destructive

Stage an ordered, atomic batch of set/delete edits at document-relative object-key paths. Set replaces values without merging; parents must exist. Delete removes an existing key. Replace arrays whole; index paths are unsupported. Include element and child-reference changes in the same batch.

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>",
      "edits": "<edits>"
    },
    "name": "edit_page_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsYes
targetYesTarget page resource; kind must be page.
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",
      -  "edits"
      -]New value: +[
      +  "target",
      +  "edits"
      +]
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructive=true and non-idempotent, and the description correctly adds real behavioral detail beyond them: the batch is ordered and atomic, set replaces without merging, parents must exist, arrays are replaced whole. It stays silent on what 'stage' actually means operationally (draft-local, committed on publish?) and on what happens to a partially valid batch, which keeps it from a 5.

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?

Five tight sentences, front-loaded with the atomic-batch framing, then the two operations, then the array constraint, then the batching rule. No filler, no restatement of the name or title.

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 nested-object mutation with no output schema, the description covers op semantics well but omits the third parameter (previewScenarios) entirely and does not explain what the call returns or whether staged edits are visible before publish. Nested-object complexity warrants slightly more context than is supplied.

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 much of the path/op guidance in the description (no array indices, parents must exist, set replaces completely) is already stated verbatim in the schema property descriptions. The complex previewScenarios parameter is not mentioned at all in the description, so it fails to compensate for the remaining coverage gap; baseline 3 applies.

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?

A specific verb (stage an ordered, atomic batch of set/delete edits) plus a specific resource (document-relative object-key paths) makes the operation immediately identifiable. It implicitly contrasts with full-replacement siblings by framing the tool as a partial batch editor, but never names replace_page_document or the email/wallet variants, so sibling differentiation is left to inference.

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 element and child-reference changes in the same batch' gives one concrete batching rule, and 'Replace arrays whole; index paths are unsupported' steers away from a tempting wrong usage. However, it never says when to prefer this over replace_page_document, nor what prerequisites (draft vs published page, permissions) must hold before calling.

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.