Skip to main content
Glama

Edit a sales page

edit_sales_page
Destructive

Change part of the sales page above one of the seller's checkouts, or of an upsell's own page (pass upsell), without rewriting the rest. Call get_sales_page first, then pass edits: each find is text copied exactly from the current HTML (enough of it to appear only once) and replace is what goes there instead. Edits apply in order; if any find isn't there, or is there more than once without all: true, nothing changes. On a draft this applies straight away. On a LIVE checkout it applies straight away too (status applied; the seller can roll it back on their Approvals page), unless it touches money: a price, currency, billing, the delivery link, payment plans, an early-bird price or campaign, or a retention discount or pause. Those create an approval request instead (status pending_approval): tell the seller, give them the approvalUrl, and check later with approval_status. To change other things straight away, don't send money fields in the same call. Never invent a price or a link. The answer includes slop: { score, flags }, Swipefast's plain-rules check of the page's words (0-100, no AI): if score is 20 or more, fix the flagged phrases with edit_sales_page, keep the facts, and save again.

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": {
      "product": "<product>",
      "edits": "<edits>"
    },
    "name": "edit_sales_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsYesThe changes, in order.
upsellNoAn upsell's id from get_product, to edit its page instead of the sales page.
accountNoOnly to work in a client's account: its id from list_accounts. Leave it out for your own account.
productYesThe checkout's id or slug.

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 already declare destructiveHint=true, and the description adds crucial behavior beyond that: edits are atomic, draft versus LIVE handling differs, money-related fields trigger pending_approval, approvals can be rolled back, approvalUrl should be surfaced, and slop scoring may require follow-up edits. This is exactly the additional context an agent needs before mutating a live page.

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 dense but well front-loaded: purpose and workflow first, then live-page approval behavior, then slop output handling. It is somewhat long, but nearly every sentence carries operational meaning for a complex mutation tool.

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?

With no output schema, the description still explains the important return-signal behavior (status applied versus pending_approval, approvalUrl, and slop score/flags). It covers atomicity, rollback, and safety constraints, leaving no significant gaps for correct invocation.

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 schema already documents product, upsell, account, and edit fields. The description adds meaningful semantics beyond the schema: find must be exact text unique enough to occur once, replace is substitution text, edits apply in order, and the all flag is needed for multiple occurrences.

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 ('Change part of the sales page') and scopes it precisely: partial find/replace editing rather than full rewriting, optionally for an upsell page. It names the prerequisite sibling get_sales_page, so an agent can distinguish it from a replacement-style tool.

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 an explicit workflow: call get_sales_page first, supply find/replace edits in order, and expect atomic failure if a find is missing or ambiguous. It also clearly routes money-related edits to approval status and says to omit money fields when immediate application is desired.

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.