Skip to main content
Glama

Add a one-click upsell

add_upsell

Add a one-click upsell buyers see after paying to one of the seller's checkouts, draft or live. On a checkout with no offer after payment yet, it's the first. Otherwise say where it goes in the chain: after (an offer id from get_product's offerChain) and when ("yes" or "no"): it's shown when the buyer answers that offer that way, and leads on to wherever that answer went before. A downsell is an offer after the upsell, when "no". Up to 5 offers in a chain, on every plan. Optionally pass html for a custom upsell page. On a draft this applies straight away. On a LIVE checkout nothing changes yet: it creates an approval request (status pending_approval) that the seller approves in Swipefast; tell them, give them the approvalUrl, and check later with approval_status. Never invent a price or a link.

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>",
      "headline": "<headline>",
      "price": "<price>",
      "deliveryUrl": "<deliveryUrl>"
    },
    "name": "add_upsell"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlNoOptional HTML for the upsell page. Omit for the built-in layout.
whenNoShown when the buyer says yes or no to the after offer.
afterNoThe offer (from get_product's offerChain) this one comes after. Needed when the checkout already has one.
priceYesPrice in the checkout's currency, in major units (27 = $27.00).
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.
headlineYesThe offer's title, e.g. "Add the swipe file".
deliveryUrlYeshttps:// link where buyers get this after purchase. Required.
descriptionNoOne or two sentences on why it's worth it.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false): on a draft the change applies immediately, while on a LIVE checkout it creates an approval request with status pending_approval, requires the seller to approve in Swipefast, and the agent should surface the approvalUrl and re-check with approval_status. It adds the 5-offer chain cap on every plan and an explicit guardrail never to invent a price or link.

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?

Purpose is front-loaded and every clause carries operational information. The middle sentences are dense and run-on with nested colons and quoted enum values, which costs some readability, but little is redundant.

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 9-parameter mutation tool with no output schema, it covers the important unknowns: chain position, per-plan limits, draft vs live side effects, and the approval follow-up loop via approval_status. It does not describe the shape of the successful response (e.g., the new offer id or approvalUrl field name) beyond implying the approvalUrl is returned.

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 already 100%, so the baseline is 3, but the description adds relational meaning the schema cannot: 'after' must be an offer id from get_product's offerChain, 'when' selects the branch the offer is attached to, and a downsell is defined as an offer after the upsell when 'no'. It also notes 'html' is for a custom upsell page, consistent with but adding context to the schema text.

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 ('Add a one-click upsell buyers see after paying') and immediately scopes it to 'one of the seller's checkouts, draft or live', which distinguishes it from update_upsell and remove_upsell among the siblings.

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?

Gives explicit conditional guidance: if no offer after payment exists it becomes the first offer; otherwise the agent must supply 'after' (an offer id from get_product's offerChain) and 'when' (yes/no), with a clarifying note that a downsell is an offer after the upsell with when='no'. It also states the draft-vs-live behavior branch clearly. It stops short of naming sibling tools like update_upsell or add_order_bump as alternatives.

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.