Skip to main content
Glama

Run a calculator

calculate
Read-onlyIdempotent

Run one calculator by id with numeric inputs: every key from list_calculators, exactly as listed, in the listed units (an unknown or missing key is an error naming it; nothing takes a default). Returns every result with its unit, the formula, the Given → Formula → Substitute → Result working when the engine can derive it, and the URL of the solved page.

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": {
      "calculator_id": "<calculator_id>",
      "inputs": "<inputs>"
    },
    "name": "calculate"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYesEvery input key from list_calculators (e.g. {"m": 2, "v": 3}), in the listed units; an unknown or missing key is an error
calculator_idYesThe calculator id (slug) from list_calculators, e.g. kinetic-energy

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / inputs / description
      Previous value: -"Input values keyed by input key, in the listed units; a missing key takes the default"New value: +"Every input key from list_calculators (e.g. {\"m\": 2, \"v\": 3}), in the listed units; an unknown or missing key is an error"
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds genuinely new behavior: strict input validation with an error that names the offending key, no defaulting whatsoever, and a detailed return contract including units, formula, derivation working, and solved-page URL.

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?

Two sentences, front-loaded with the action and followed by input rules then the return contract. The parentheticals are dense but each carries real information; the Given → Formula → Substitute → Result clause is longer than strictly needed but describes the return shape.

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?

With no output schema, the description carries the full burden of describing return values and does so completely (results with units, formula, derivation, page URL). The nested inputs object and strict-no-default validation behavior are both addressed, so an agent has everything needed to call it correctly.

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 coverage is 100%, so both parameters and their constraints are already documented structurally, and the description largely restates them (keys from list_calculators, listed units, unknown/missing key is an error). It adds only the marginal detail that the error names the key and that nothing takes a default.

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 and resource ('Run one calculator by id with numeric inputs') and immediately establishes the relationship to its sibling list_calculators as the source of ids and keys. An agent can distinguish this from list_calculators/get_constant without opening any schema.

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?

The prerequisite workflow is explicit: ids and every input key come from list_calculators, exactly as listed. It does not name an alternative for any overlapping scenario or state exclusions, but for a terminal execution tool the invocation path is unambiguous.

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