Skip to main content
Glama

calculate

Read-onlyIdempotent

Create a derived series from two indicators using an Excel-style op: ratio (A/B), ratio_pct (A/B100), diff (A-B), sum (A+B), product (AB). Returns the per-timepoint result + summary. Use for things like debt-to-GDP ratio, revenue-per-employee, spread between two yields. autario refuses to combine columns of different kinds. Read the semantics field of the schema before combining two columns. A refused call answers error_code incompatible_semantics with both columns, the reason, and the ops that WOULD work (e.g. spend and clicks do not add but divide into cpc); pass override=true with a reason to compute it anyway, and the reason is returned with the result. Every result carries a computation block naming the columns, kinds, rows and window it used. Runs on any verified autario indicator (World Bank, FRED, Eurostat, OECD, IMF, WHO, ECB, US Census, SEC).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesFirst operand A (the numerator of a ratio). Indicator id of a numeric series, exactly as list_indicators or get_entity_profile return it (a public indicator or one of your own uploads or connector tables).
bYesSecond operand B (the denominator of a ratio). Indicator id of a numeric series, exactly as list_indicators or get_entity_profile return it (a public indicator or one of your own uploads or connector tables).
opNoratio | ratio_pct | diff | sum | product (default: ratio)
fullNoReturn the full raw time series (heavy, many tokens). Default false → you get only the summary/stats, which is enough to ANSWER a question. Set true only when you must plot or export every point.
timeNoOptional time window. "2010-2023" keeps 2010 through 2023, "2019-01-2024-06" works by month, and a single "2015" keeps 2015 onward. Omitted or unparseable = the whole series.
entityYesEntity the series is read for: an ISO 3166 alpha-3 country code such as "DEU" or "USA", or an aggregate code such as "WLD" or "EUU" (the canonical name matches too). Use the codes list_indicators and get_entity_profile accept.
reasonNoWhy the refused combination is correct here. Returned with the result so a human can audit the decision.
overrideNoCompute a combination autario refused as incompatible. Requires `reason`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / a / description
      Added value: +"First operand A (the numerator of a ratio). Indicator id of a numeric series, exactly as list_indicators or get_entity_profile return it (a public indicator or one of your own uploads or connector tables)."
    • addedInput schema / properties / b / description
      Added value: +"Second operand B (the denominator of a ratio). Indicator id of a numeric series, exactly as list_indicators or get_entity_profile return it (a public indicator or one of your own uploads or connector tables)."
    • addedInput schema / properties / entity / description
      Added value: +"Entity the series is read for: an ISO 3166 alpha-3 country code such as \"DEU\" or \"USA\", or an aggregate code such as \"WLD\" or \"EUU\" (the canonical name matches too). Use the codes list_indicators and get_entity_profile accept."
    • changedInput schema / properties / op / description
      Previous value: -"ratio | ratio_pct | diff | sum | product"New value: +"ratio | ratio_pct | diff | sum | product (default: ratio)"
    • addedInput schema / properties / time / description
      Added value: +"Optional time window. \"2010-2023\" keeps 2010 through 2023, \"2019-01-2024-06\" works by month, and a single \"2015\" keeps 2015 onward. Omitted or unparseable = the whole series."
  2. Changed2 schema fields changed
    • addedInput schema / properties / override
      Added value: +{
      +  "description": "Compute a combination autario refused as incompatible. Requires `reason`.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Why the refused combination is correct here. Returned with the result so a human can audit the decision.",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / full
      Added value: +{
      +  "description": "Return the full raw time series (heavy, many tokens). Default false → you get only the summary/stats, which is enough to ANSWER a question. Set true only when you must plot or export every point.",
      +  "type": "boolean"
      +}
  4. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Even with readOnlyHint/idempotentHint already declared, the description discloses substantial behavior beyond the annotations: the compatibility refusal with error_code incompatible_semantics, the ops that WOULD work, the override+reason audit path, and the computation block attached to every result. This is far richer than the annotations alone.

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-loads purpose and operations, then layers in the guidances and refusal semantics. Dense and mostly earning its sentences, though the trailing provider list and the repeated restatement of override/reason add some redundancy.

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?

For an 8-param tool with no output schema, the description covers purpose, operation set, error/refusal behavior, override path, returned computation block, and provider scope. An agent has everything needed to call it correctly, including the summary-vs-full tradeoff.

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 the schema already carries parameter meaning, and the description mostly restates it (override requires reason, reason is returned). The one genuine addition is the instruction to read the semantics field before combining, but otherwise the schema does the heavy lifting – baseline 3.

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 (Create), resource (derived series), and enumeration of operations (ratio, ratio_pct, diff, sum, product) on two named operands. This clearly distinguishes it from siblings like correlate, pct_change, and regression, so an agent can orient without opening the 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?

Gives concrete use cases (debt-to-GDP, revenue-per-employee, yield spread) and a clear path for the refused case (override=true with a reason). It does not, however, explicitly route the agent away from adjacent siblings such as pct_change or correlate, so the when-not is only implied.

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