Skip to main content
Glama

Set the offers after payment

set_offer_chain
Destructive

Arrange the one-click upsells buyers see after paying as a chain: which offer comes first, and where each yes and each no leads, another offer or the thank-you page (thank_you). Use offer ids from get_product (upsells and offerChain); create an offer with add_upsell first. Up to 5 offers, no loops, every offer reachable from the first, on every plan; a downsell is the offer a no leads to. This replaces the chain; offers left out stay on the checkout but aren't shown. Each offer a buyer takes is charged the way their first payment allows, and only when they say yes. 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.

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>",
      "steps": "<steps>"
    },
    "name": "set_offer_chain"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsYesThe offers in order. The first is shown first.
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.6/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, and the description confirms and explains that: 'This replaces the chain; offers left out stay on the checkout but aren't shown.' It goes well beyond the annotations by disclosing the draft-versus-live behavior, the applied versus pending_approval statuses, seller rollback on the Approvals page, and that charges only happen on a yes. The one gap is that it never says what the call returns or how failures are surfaced beyond the status field.

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?

Front-loaded with the core action and routing, then constraints, then the live-versus-draft approval rules. Every sentence carries operational information, though the money-field exception is dense and reads as a run-on list, and the approval paragraph could be tightened without losing meaning.

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?

This is a destructive, state-replacing mutation with no output schema, so the description has to carry the whole burden, and it does: prerequisites, cardinality and loop rules, replacement side effects, charge behavior, and the draft/live approval fork with a follow-up tool named. An agent has everything it needs to call this correctly or to know it must pause for approval.

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 baseline would be 3, but the description adds real meaning to the steps array: ordering semantics ('The first is shown first' is in the schema, but 'a downsell is the offer a no leads to' is not), the thank_you sentinel behavior, and structural constraints of no loops and full reachability. It leaves the account parameter unmentioned, which the schema already handles.

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: 'Arrange the one-click upsells buyers see after paying as a chain: which offer comes first, and where each yes and each no leads.' It also distinguishes itself from siblings by pointing to get_product for ids and add_upsell for creating offers, so an agent can tell it apart from add_upsell and set_retention_offers without opening any schema.

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 explicit prerequisites ('Use offer ids from get_product'; 'create an offer with add_upsell first'), scope limits ('Up to 5 offers, no loops, every offer reachable from the first'), and the exact alternative path when the call touches money (approval request, approvalUrl, approval_status). It also tells the agent what to do instead ('don't send money fields in the same call').

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.