Skip to main content
Glama

End A/B test

end_ab_test
Destructive

Ends a started A/B test and makes one version the bundle or cart every shopper sees. Any version can win; A keeps the item as it is. It goes in two steps. The first call ends nothing: it returns what the results say, a picture of the version, what it changes on the live item and a confirm_token. Show the merchant, and say so when we haven't called that version the winner. When they say yes, call again with the same ab_test_id and version plus confirm_token. undo_change reverses the change to the item for 30 days. An ended test can't restart.

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": {
      "ab_test_id": "<ab_test_id>",
      "version": "<version>"
    },
    "name": "end_ab_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
versionYesThe version every shopper sees from now on.
ab_test_idYesTest id from list_ab_tests.
confirm_tokenNoThe token from the first call, once the merchant said yes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it explains that the first invocation is a dry preview, that a confirm token gates the real mutation, that undo_change reverses the item change for 30 days, and that an ended test cannot restart. This is exactly the destructive/irreversible detail the destructiveHint=true annotation only gestures at.

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-loads the purpose, then the two-step procedure with consequences. Slight chattiness in the merchant-facing instructions ('Show the merchant, and say so when...'), but nearly every sentence carries operational 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?

With no output schema, the description compensates by describing what the first call returns (results interpretation, a render of the version, the live-item diff, confirm_token). Combined with the irreversibility and 30-day undo window, an agent has everything needed to call this correctly.

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 is 3, and the description earns the bump by explaining cross-call parameter reuse (same ab_test_id and version on the second call), the role of confirm_token, and that any version A-D can win with A leaving the item unchanged.

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?

States a specific verb and resource ('Ends a started A/B test') plus the outcome ('makes one version the bundle or cart every shopper sees') and the special-case semantics of version A. It does not explicitly separate itself from the sibling delete_ab_test, but a reader can still tell what this does without opening the schema.

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 unusually concrete call flow: first call ends nothing and returns results plus a confirm_token, then re-call with the same ab_test_id and version once the merchant says yes. It also says to surface the preview and flag when the chosen version isn't the winner. It stops short of saying when to choose end vs delete_ab_test.

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