Skip to main content
Glama

calibrate

Idempotent

Fit constant model parameters to observed time-series data using local or global optimization, enabling model calibration from empirical observations.

Instructions

Fit constant model parameters to an observed time-series — the inverse of simulate. Only constant auxiliaries/flows can be calibrated (stocks are rejected: overriding a stock pins it to a constant rather than setting its initial value). least_squares (default) reports a linearized std_error; differential_evolution is a global, seeded alternative requiring bounds. Observation times must lie within the model window (no extrapolation). Requires the optional pysd dependency (pip install 'stella-mcp[sim]').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNodifferential_evolution seed (kept non-null for reproducibility)
methodNoOptimizer: least_squares (local, gives std_error) or differential_evolution (global, seeded, needs bounds)least_squares
maxiterNodifferential_evolution generation cap (default 100)
popsizeNodifferential_evolution population multiplier
weightsNoOptional positive per-target residual multipliers; inverse-sigma values give normalized residuals and the usual statistical std_error interpretation
max_nfevNoleast_squares function-evaluation cap
model_idNoSession-scoped model ID. Optional; defaults to the current model for this session.
objectiveNoObjective (sum of squared residuals; scale via weights)sse
parametersYesConstant parameters to fit (constant auxiliaries/flows only; stocks are rejected)
observationsYesObserved data on one shared time grid: inline {time, targets} or {csv_path} (first CSV column is time)
save_fit_csvNoOptional path to write a long (time, target, observed, fitted) CSV
return_fit_seriesNoAlso return the best-fit downsampled series per target
Behavior3/5

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

Annotations (readOnlyHint=false, idempotentHint=true) are present. The description adds constraints and method details but does not disclose side effects such as whether the model's parameters are updated after calibration. This is a notable gap for a mutation-like tool.

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?

A single dense paragraph that front-loads the main purpose and efficiently covers multiple aspects. Could be broken into sections for readability, but every sentence adds necessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite covering many aspects, the description fails to describe what the tool returns (no output schema exists). Given the tool's complexity (12 parameters, nested objects), the absence of return value information is a significant completeness gap.

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 baseline is 3. The description adds value by explaining method alternatives, the meaning of weights for std_error, the rejection of stocks, and the dependency requirement. This goes beyond schema descriptions.

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?

Clearly states the tool fits constant model parameters to observed time-series, explicitly contrasts with simulate, and specifies that only constant auxiliaries/flows are calibratable (stocks rejected). This distinguishes it from all sibling tools.

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?

Provides explicit guidance: inverse of simulate, constraints on parameters, method choices with characteristics, observation times must be within model window, and required dependency. While not naming alternative tools, the contrast with simulate sufficiently directs usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bradleylab/stella-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server