Skip to main content
Glama

Run scenario sweep

run_scenario_sweep
Read-only

Sweep one or more input cells across ranges/value-lists in a SINGLE call: the workbook is recalculated server-side for every variation (no per-variation model calls) and the full input→output result grid is returned for you to analyze. Intended two-step pattern: (1) call this once to define + run the sweep, then (2) analyze the returned grid in your next turn — how each input moves each output, sensitivity, and any thresholds/break-even points. mode 'independent' (default) varies each parameter one at a time from its current baseline (clean one-at-a-time sensitivity / tornado data); 'cartesian' runs every combination of all parameters (captures interactions, but the variation count multiplies fast — keep steps small). Each parameter takes either an explicit {values:[...]} list or a linear {min,max,steps} range. Caps: ≤8 parameters, ≤200 total variations (≤50 for Excel Online workbooks, which replay each variation over a live session). Does not mutate the real workbook and does not create saved scenario rows.

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": {
      "workbookId": "<workbookId>",
      "params": "<params>",
      "outputCells": "<outputCells>",
      "mode": "<mode>"
    },
    "name": "run_scenario_sweep"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesindependent
paramsYes
workbookIdYes
outputCellsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly, non-destructive, non-idempotent) by disclosing hard caps (≤8 parameters, ≤200 variations, ≤50 for Excel Online due to live-session replay), the fact that the real workbook is not mutated, and that no saved scenario rows are created. The Excel Online replay constraint is exactly the kind of operational context an agent needs before committing to a sweep size.

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 the payoff, then layered with mode semantics and caps; every sentence carries information. It is dense and long-ish for a tool description, but no sentence is filler — the density is justified by the 0% schema coverage.

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 4-required-parameter tool with no output schema and no schema descriptions, the definition covers the return shape (a result grid of input→output variations), the modes, the input specification forms, and the operational limits. The only thin spot is workbookId, whose Excel Online vs. desktop implications are only implied rather than spelled out.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and largely does: it explains that each param entry takes either an explicit {values:[...]} list or a linear {min,max,steps} range, and defines both mode enum values with their behavioral consequences and the default. The ≤8 parameter and ≤50 output cell caps map directly onto the schema maxItems, closing the main gaps left by undocumented fields.

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 — sweeping input cells and returning a full input→output result grid in a single call — plus the key scope fact that recalculation happens server-side without per-variation model calls. It does not name any sibling (e.g. run_scenario or run_scenario_batch) to differentiate itself explicitly, though the 'does not create saved scenario rows' clause hints at the boundary.

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 an explicit intended two-step workflow (call once to define+run, then analyze the grid next turn) and clear mode selection guidance: 'independent' for one-at-a-time sensitivity/tornado data, 'cartesian' for interactions with a warning that variation count multiplies. It stops short of saying when to prefer a different tool entirely, so it is not a full when/when-not/alternatives treatment.

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