Skip to main content
Glama

Run Experiment

run_experiment
Idempotent

Run a full automatic experiment, baseline only, or a manual comparison.

    May incur remote agent costs and, for steering, proposal-model charges.
    Use phase='steering' for the full flow: freeze reviewed cases, run any
    unfinished baseline, then optimize automatically. Choose comparison
    repetitions up front; each candidate and fresh baseline use that same
    count, frozen when comparison starts. Baseline-only remains available
    for reviewing results before a manual comparison. Steering accumulates improvements
    and stops at 100%, patience, or its candidate/budget limits. sweep applies
    only to steering; omit methods to use this agent's integration. Poll
    get_experiment_job every 30-60s. A repeated request_key never launches
    twice, even after completion. A new key explicitly resumes paused work.
    

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": {
      "agent_id": "<agent_id>",
      "experiment_id": "<experiment_id>",
      "revision": "<revision>",
      "phase": "<phase>",
      "request_key": "<request_key>"
    },
    "name": "run_experiment"
  }
}

Input Schema

NameRequiredDescriptionDefault
phaseYes
sweepNoOptional steering bounds (max_candidates, patience, methods); applies only when phase='steering'.
agent_idYesStable agent ID from list_agents or create_agent.
revisionYesLatest draft revision returned by get_experiment or the previous edit.
request_keyYesUnique key for this launch. Retry lost responses with the same key and arguments; use a new key to resume.
max_new_runsNo
experiment_idYesExperiment ID within this agent; letters, digits, hyphens, underscores.
comparison_repetitionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag openWorldHint=true, idempotentHint=true, and readOnlyHint=false, and the description adds real value on top: remote agent costs and proposal-model charges, freezing of case revisions and comparison repetition counts, and steering stop conditions (100%, patience, budget limits). It does not describe what a paused or partially-completed launch leaves behind, but the cost and lifecycle disclosure is strong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the action and modes, and the phase guidance and cost warning are well placed. However, the middle section is dense and compresses several distinct procedures into run-on sentences, and the trailing sentence fragment about request_key repeats the schema description rather than adding structure.

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 an 8-parameter, 5-required long-running orchestration tool with no output schema, the description covers costs, lifecycle, polling, idempotency, and per-phase behavior. Gaps remain on max_new_runs and on what the immediate return looks like (job handle for polling), but the overall picture is sufficient to call it correctly.

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 63%, with agent_id, revision, request_key, experiment_id, and sweep already documented in the schema. The description reinforces phase and sweep meaning and adds the crucial up-front semantics of comparison_repetitions ('choose comparison repetitions up front... frozen when comparison starts'), but leaves max_new_runs and the phase enum values largely explained only by the schema.

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?

The description opens with a specific verb and scope: 'Run a full automatic experiment, baseline only, or a manual comparison,' and the phase enum maps onto those three modes. It distinguishes the modes but never names sibling tools like create_experiment or get_experiment as alternatives, so differentiation is only partial.

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 conditional guidance: use phase='steering' for the full flow, baseline-only to review results before a manual comparison, sweep only with steering, and poll get_experiment_job every 30-60s. It also explains idempotency via request_key and resume semantics. Missing explicit exclusions, e.g. when not to run at all or prerequisites like reviewed cases being required.

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.