Skip to main content
Glama

Run a calculator

run_calculator
Read-onlyIdempotent

Use this when the user needs one of Calcgrid's 538 deterministic calculators and no dedicated typed tool covers it. Call it immediately after search_calculators once calculator_id and input_hints are known; do not stop at search or schema discovery. Do not use it for trivial arithmetic, live rates or unrelated tasks. Returns typed values with units, formula, sources, freshness and timestamp; validation errors identify the field and a repair hint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsYesParameter names and values from search_calculators input_hints or get_calculator_schema. Use numbers as numbers, ISO dates as YYYY-MM-DD and lists as arrays.
calculator_idYesExact calculator_id from search_calculators; for example 'compound-interest'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changed
    • changedInput schema / properties / calculator_id / description
      Previous value: -"Calculator id, e.g. 'compound-interest'."New value: +"Exact calculator_id from search_calculators; for example 'compound-interest'."
    • addedInput schema / properties / calculator_id / examples
      Added value: +[
      +  "compound-interest"
      +]
    • changedInput schema / properties / inputs / description
      Previous value: -"Input parameters keyed by name as documented by get_calculator_schema."New value: +"Parameter names and values from search_calculators input_hints or get_calculator_schema. Use numbers as numbers, ISO dates as YYYY-MM-DD and lists as arrays."
    • addedInput schema / properties / inputs / examples
      Added value: +[
      +  {
      +    "annual_rate_percent": 4.8,
      +    "principal": 15000,
      +    "years": 12
      +  }
      +]
    • changedOutput schema / description
      Previous value: -"Unified result envelope (see /docs/response-format.md)"New value: +"Deterministic calculation result with typed values, units, formula, sources and timestamp."
    • addedOutput schema / properties / next_actions / items
      Added value: +{
      +  "type": "object"
      +}
    • addedOutput schema / properties / request / properties
      Added value: +{
      +  "calculator_id": {
      +    "type": "string"
      +  },
      +  "inputs": {
      +    "type": "object"
      +  },
      +  "tool": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / result / properties / calculator_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / calculator_name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / entity_type
      Added value: +{
      +  "const": "calculation",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / status
      Added value: +{
      +  "const": "completed",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / units / additionalProperties
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / values / additionalProperties
      Added value: +true
    • addedOutput schema / properties / result / required
      Added value: +[
      +  "entity_type",
      +  "calculator_id",
      +  "status",
      +  "values",
      +  "formula",
      +  "summary"
      +]
    • addedOutput schema / properties / sources / items
      Added value: +{
      +  "type": "object"
      +}
    • addedOutput schema / properties / success / const
      Added value: +true
    • addedOutput schema / properties / timestamp / format
      Added value: +"date-time"
    • addedOutput schema / properties / version
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success"
      -]New value: +[
      +  "success",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive, and the description adds determinism, typed return values with units/formula/sources/freshness/timestamp, and validation errors with field-level repair hints. There is no contradiction with the annotations.

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

Conciseness5/5

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

The description is three purposeful sentences with front-loaded usage conditions, followed by workflow timing, exclusions, and return behavior. Every sentence earns its place and there is no filler.

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?

Given the output schema, full parameter documentation, and rich annotations, the description covers everything an agent needs: selection criteria, invocation timing, parameter origin, exclusions, return payload, and error behavior. Nothing critical is missing.

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 description coverage is 100%, so the input schema already documents calculator_id and inputs with examples and types. The description mentions input_hints and the parameter source but does not add substantive semantic detail beyond the schema.

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?

The description clearly states it runs one of Calcgrid's 538 deterministic calculators when no dedicated typed tool covers it. It identifies a specific verb, resource, and scope, and distinguishes itself from the many specialized sibling calculator 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?

It gives explicit when-to-use guidance: call immediately after search_calculators once calculator_id and input_hints are known, and do not stop at search or schema discovery. It also states exclusions: do not use it for trivial arithmetic, live rates, or unrelated tasks.

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