Skip to main content
Glama

Solve for the missing number: future value, starting amount, rate or time

smartfin_calculate_missing_variable
Read-onlyIdempotent

Finds the one missing number among four that sit in the same equation, a single amount earning one fixed yearly rate with interest added at a chosen frequency (FV = PV x (1 + r/n)^(n x t)): the future value, the starting amount, the annual rate, or the time in years. Use when the user knows three of the four and wants the fourth, e.g. "what rate turns $10,000 into $20,000 in 10 years", "how many years until $10,000 reaches $20,000 at 6%", or "what do I need to start with to reach $50,000". Do not use for regular contributions (use smartfin_project_savings_growth), for what a real investment did (use smartfin_calculate_investment_return), or for a forecast: one fixed rate is an assumption, and a required rate is the arithmetic, not a return to expect. To only grow an amount forward use smartfin_calculate_future_value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearsNoTime in years; a part of a year is a decimal. Leave out when solving for years
currencyNoCurrency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD
solve_forYesWhich number to find: future_value, present_value (the starting amount), annual_rate_pct or years
future_valueNoAmount at the end in the currency chosen. Leave out when solving for future_value
present_valueNoStarting amount in the currency chosen. Leave out when solving for present_value
annual_rate_pctNoYearly rate in %, above -100, e.g. 6. Leave out when solving for annual_rate_pct
compounding_frequencyYesTimes a year interest is added: 1 annually, 2 semiannually, 4 quarterly, 12 monthly, 52 weekly, 365 daily

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
citeYesHow to credit this result
dataYes
nextYesSuggested follow-up calls
linksYes
how_toYesSteps for the user to see or redo this on smartfin.fyi
sourceYes
summaryYesPlain-language result the assistant can quote

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / currency
      Added value: +{
      +  "description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD",
      +  "enum": [
      +    "USD",
      +    "EUR",
      +    "GBP",
      +    "CHF",
      +    "AUD",
      +    "CAD",
      +    "SGD",
      +    "HKD",
      +    "INR",
      +    "JPY"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / future_value / description
      Previous value: -"Amount at the end in dollars. Leave out when solving for future_value"New value: +"Amount at the end in the currency chosen. Leave out when solving for future_value"
    • changedInput schema / properties / present_value / description
      Previous value: -"Starting amount in dollars. Leave out when solving for present_value"New value: +"Starting amount in the currency chosen. Leave out when solving for present_value"
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, so the safety profile is covered. The description adds genuine interpretation context beyond that: one fixed rate is an assumption and a solved rate is arithmetic rather than an expected return. It does not discuss precision, rounding, or edge behavior when inputs are inconsistent, so it stops short of a 5.

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?

Purpose, formula, and usage trigger are front-loaded in the first two sentences. The exclusion sentence is a long run-on packing three alternatives plus a caveat, which slightly hurts scannability, but no sentence is wasted.

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?

An output schema exists, so return values need no explanation. The description covers the operation, the equation, the trigger condition, examples, and the sibling tools to use instead — everything an agent needs to select and invoke this tool 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 description coverage is 100%, so the schema already documents all seven parameters including enum meanings, bounds, and the 'leave out when solving for X' pattern. The description restates the four solvable quantities and maps present_value to 'the starting amount,' which is a marginal clarification rather than new information. Baseline 3 is appropriate when the schema does the heavy lifting.

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 (finds the one missing number) and resource (the four variables of FV = PV x (1 + r/n)^(n x t)), and even spells out the equation being solved. It distinguishes itself from siblings by naming smartfin_project_savings_growth, smartfin_calculate_investment_return, and smartfin_calculate_future_value as the wrong tools for adjacent tasks.

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?

Gives an explicit trigger condition ('Use when the user knows three of the four and wants the fourth') backed by three concrete natural-language examples. It also provides explicit exclusions with the replacement tool named for each, so routing decisions require no inference.

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