Goal seek
goal_seekInverse 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
| Name | Required | Description | Default |
|---|---|---|---|
| max | No | ||
| min | No | ||
| input | Yes | ||
| output | Yes | ||
| target | Yes | ||
| tolerance | No | ||
| workbookId | Yes | ||
| maxIterations | No |