Skip to main content
Glama

Simulate A/B Test

simulate_ab_test

Start async A/B simulation test comparing two agent configurations. Executes multi-turn simulated conversations for BOTH configurations against identical personas and scenarios, then compares performance metrics. Returns a jobId immediately - use get_simulation_status to poll for results. Three ways to specify the variant: (1) variantPrompt — full prompt content; (2) variantPromptId — reference an existing stored prompt; (3) variantOverrides — array of find/replace ops applied on top of the resolved baseline (no need to send full content, server applies the diff). Same for baseline (variantOverrides has no baseline equivalent — baseline must come from baselinePrompt or baselinePromptId).

Input Schema

NameRequiredDescriptionDefault
runIdNoProvider run ID for the runtime context snapshot. Required with conversationId when runtimeContextId is not provided.
maxTurnsNoMaximum turns per conversation (default: 10)
customerIdNo(Converra superadmin only) Target customer ID to act on behalf of
personaCountNoTotal number of personas to use
scenarioCountNoTotal number of scenarios to use
variantPromptNoThe challenger agent's full system prompt content. Use this OR variantPromptId OR variantOverrides.
baselinePromptNoThe baseline agent's system prompt content. Either this or baselinePromptId must be provided.
conversationIdNoConversation ID containing the runtime context snapshot. Required with runId when runtimeContextId is not provided.
simulationTypeNoSimulation type: standard, context_grounded_probe (one-turn context probe), or context_grounded_dialogue (multi-turn context-grounded dialogue). Context-grounded types require baselinePromptId plus runtimeContextId or conversationId with runId.
includePersonasNoOptional specific personas to include
variantPromptIdNoAlternative to variantPrompt: ID of stored agent to use as variant.
baselinePromptIdNoAlternative to baselinePrompt: ID of stored agent to use as baseline. Also fetches LLM settings.
includeScenariosNoOptional specific scenarios to include
runtimeContextIdNoRuntime context snapshot ID to bind for both A/B arms. Use this OR conversationId with runId.
variantOverridesNoConstruct the variant by applying find/replace overrides on top of the resolved baseline content. Avoids sending the full prompt when the change is small. Each override's `find` string must occur exactly once in the prompt (after prior overrides have been applied) — multiple or zero matches throw a validation error. Order matters: each find runs against the result of prior overrides. Anchors are case-sensitive and match any substring (including inside larger words) — include surrounding whitespace/punctuation to disambiguate short anchors. Example: [{find: "Be concise.\n", replace: "Be concise and warm.\n"}]. Use this OR variantPrompt OR variantPromptId.
conversationsPerPersonaNoConversations per persona (default: 1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare write/non-destructive/non-open-world, but the description adds real behavioral context: the call is asynchronous and returns immediately, results are retrieved via a separate status tool, and variantOverrides throw validation errors on zero/multiple matches and are applied in order. That goes well beyond the annotation surface.

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 and async contract are front-loaded, and the three variant modes are numbered clearly. Slightly padded by restating the override mechanic ('server applies the diff') that the schema already carries, but the sentences largely earn their place.

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 16-parameter async tool with no output schema, the description covers the essentials an agent needs: what it returns (jobId), how to get results, and the variant/baseline source rules. Defaults for maxTurns/personaCount/conversationsPerPersona and runtime-context requirements are left to the schema, which is acceptable given the 100% coverage.

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, but the description adds cross-parameter meaning the schema doesn't: the three mutually exclusive variant specification modes and the fact that variantOverrides has no baseline equivalent (baseline must come from baselinePrompt/baselinePromptId). That resolves real ambiguity among 16 parameters.

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 ('Start async A/B simulation test comparing two agent configurations') and pins the scope to two configurations executing against identical personas/scenarios. That two-arm comparison is what separates it from single-agent siblings like simulate_agent, so an agent can pick it 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 clear operational context: returns a jobId and you must poll with get_simulation_status, plus the three ways to specify the variant and the baseline source constraint. It stops short of an explicit 'use this instead of simulate_agent when...' comparison against the closest sibling, so it's strong but not fully routing.

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