Skip to main content
Glama

Goal seek

goal_seek
Read-only

Inverse of a scenario: find the single INPUT cell value that drives one OUTPUT cell to a target, using a deterministic numeric solver server-side (no per-iteration model calls). Single-variable, like Excel's Goal Seek — for exploring several inputs at once, use run_scenario_sweep instead. Provide the input cell, the output cell, and the numeric target; optionally pass min/max bounds (the solver uses robust bisection when they bracket the target, otherwise the secant method from the input's current value) plus tolerance/maxIterations. Reusing learnings: if a prior run_scenario_sweep showed the useful range for this input, pass it as min/max to make the solve fast and reliable. Returns { solution, achievedOutput, converged, iterations, method, reason? }; check converged — if false, the target may be unreachable or need wider bounds. Local-processing workbooks only (switch Excel Online workbooks to local first). Does not mutate the real workbook.

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>",
      "input": "<input>",
      "output": "<output>",
      "target": "<target>"
    },
    "name": "goal_seek"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxNo
minNo
inputYes
outputYes
targetYes
toleranceNo
workbookIdYes
maxIterationsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is largely structured data; the description corroborates with 'does not mutate the real workbook' and 'no per-iteration model calls.' It also discloses the solver's method selection (bisection when bounds bracket the target, otherwise secant from the current value) and failure interpretation via converged — genuine context beyond annotations, though it is presented as a restatement of read-only behavior rather than adding new risk detail.

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 purpose and the sibling alternative, then parameters, then return value, then constraints — a sensible order. It is a single dense paragraph of long compound sentences; a short list for parameters and return fields would scan faster without losing content.

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?

Despite no output schema, the description enumerates the return object (solution, achievedOutput, converged, iterations, method, reason) and explains how to act on converged=false. For an 8-parameter solver with nested input/output objects, the definition covers preconditions, fallback guidance, and result interpretation adequately.

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 description coverage is 0%, so the description carries the full burden; it explains input cell, output cell, target, min/max bounds, tolerance, and maxIterations, and adds the behavioral rule that bounds enable bisection. It stops short of giving units or defaults for tolerance/maxIterations, and workbookId is left self-evident, so it is strong but not exhaustive.

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/resource: find the single input cell value driving one output cell to a target, and explicitly frames it as 'the inverse of a scenario.' It names the sibling it is not (run_scenario_sweep) and constrains scope to single-variable solving, so an agent can distinguish it without opening a 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?

Explicitly routes multi-input exploration to run_scenario_sweep, tells the agent to reuse a prior sweep's observed range as min/max for speed and reliability, and states the precondition that workbooks must be local (switch Excel Online to local first). Both when-to-use and when-not-to-use are covered.

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