Skip to main content
Glama

Place or refund a test order

run_test_order

Try the store's checkout end to end without real money. action "place" places a real order through the store's own checkout, marked as a test, and returns the payment link plus the provider's test card: give both to the owner to finish paying (payment pages cannot be paid automatically). Refused while the store's payments are LIVE (it would take real money) or when it takes no online payment. Then check_test_order confirms it was marked paid, and action "refund" cancels and refunds the paid test order. Receipts go to the owner's email.

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": {
      "site_id": "<site_id>",
      "action": "<action>"
    },
    "name": "run_test_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderNorefund: the test order's id or number
actionYesplace = place a test order through the store's own checkout (only while its payments are in test or demo mode); refund = cancel and refund a paid test order
productNoplace: the product's slug or exact title; omit to use the first product that can be bought
site_idYesThe site, from list_sites
user_goalNoOptional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false, destructiveHint=false, openWorldHint=true, idempotentHint=false; the description adds the substantive traits: a real-but-test order is created, a payment link plus provider test card are returned, refund cancels and refunds, and receipts go to the owner's email. It also explains the refusal conditions, which the annotations cannot express. The only gap is that nothing warns that 'place' is not idempotent, so a retry creates a second order.

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?

Dense but front-loaded with the payoff of the tool first, then the two actions, then the follow-up tool. Every sentence contributes something (refusal conditions, the non-automatable payment page, the test card handoff). Slightly long as a single block; sequencing the two actions would improve scanability.

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 mutating, open-world tool with no output schema, the description covers what is created, what is returned, what blocks the call, and what happens after. It omits any mention of prerequisites for test-mode payments (e.g. setting up test keys via the connect_test_payment_keys sibling) and stays silent on retry/idempotency behavior, which matters for a non-idempotent 'place'.

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 100% and every parameter is already documented in the schema, including the action enum semantics and that 'order' is used for refund. The description reinforces the place/refund distinction but adds no syntax, format, or default behavior beyond what the schema already states. Baseline 3 is appropriate when the schema carries the load.

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 concrete verb pair and resource ("action 'place' places a real order through the store's own checkout... action 'refund' cancels and refunds") and immediately scopes it to test mode without real money. It also distinguishes itself from the sibling check_test_order by giving that tool the verification role, so an agent can tell the two apart without opening either 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 selection criteria for each action plus the exact conditions under which 'place' is refused (payments LIVE, store takes no online payment), and hands off the next step to check_test_order. The note that payment pages cannot be paid automatically tells the agent this tool's job ends at returning the link and card, which is precisely the kind of routing guidance that prevents misuse.

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.

Resources