Skip to main content
Glama

Compound Interest Calculator

calculate_compound_interest
Read-onlyIdempotent

Use this when you need to project a savings account, certificate of deposit or investment balance from a starting amount, an annual rate, a term and optional monthly deposits. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.

Do not use this when interest is not reinvested (use simple-interest), you need the deposit required to hit a target (use savings-goal), or you are repaying a loan (use loan-payment). What it computes: Computes the future balance of a principal earning compound interest at a chosen compounding frequency, optionally with a fixed deposit at the end of every month, and splits the result into contributions and interest. Inputs: principal (number); annual_rate_percent (number, %); years (number, years); compounding_frequency (enum, optional); monthly_contribution (number, optional). Complete JSON argument examples: {"principal":10000,"annual_rate_percent":5,"years":10,"compounding_frequency":"monthly"} | {"principal":5000,"annual_rate_percent":6,"years":20,"compounding_frequency":"monthly","monthly_contribution":100} Outputs: final_balance, total_contributions, total_interest, effective_annual_rate_percent [%], growth_multiple. Formula: A = principal × (1 + r/n)^(n·years) with r = annual_rate_percent/100 and n periods per year. Contributions: i_m = (1 + r/n)^(n/12) − 1, m = 12·years, FV_contrib = monthly_contribution × ((1 + i_m)^m − 1) / i_m (m × contribution when r = 0). final_balance = A + FV_contrib. Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/compound-interest with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/finance/compound-interest.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearsYesLength of the investment in years; fractional years allowed (2.5 = 30 months). Unit: years.
principalYesStarting amount deposited or invested, in any currency.
annual_rate_percentYesNominal annual rate (APR) in percent; 5 means 5 %. Unit: %.
monthly_contributionNoOptional fixed deposit made at the end of every month, compounded at the effective monthly rate implied by compounding_frequency.
compounding_frequencyNoHow often interest is credited: n = 1, 2, 4, 12, 52 or 365 periods per year.monthly

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "annual_rate_percent": 5,
      +    "compounding_frequency": "monthly",
      +    "principal": 10000,
      +    "years": 10
      +  },
      +  {
      +    "annual_rate_percent": 6,
      +    "compounding_frequency": "monthly",
      +    "monthly_contribution": 100,
      +    "principal": 5000,
      +    "years": 20
      +  }
      +]
  2. Added
  3. Removed
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/destructive annotations, the description discloses the exact formula, the treatment of monthly contributions (including zero-rate edge case), the effective annual rate and growth multiple outputs, and a direct REST fallback path. This is rich behavioral context with no contradiction.

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?

The description is longer than average but well-structured with labeled sections and front-loaded usage guidance. The formula, examples, and REST fallback each earn their place, though the output/input lists mildly duplicate schema content.

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 a 5-parameter calculator with rich annotations, output schema, and sibling tools, the description fully equips an agent: usage rules, parameter semantics, formula, examples, output names, REST fallback, and doc link. Nothing essential for correct selection or invocation is missing.

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 the baseline is 3; the description adds value by explaining the contribution formula, defining i_m, clarifying compounding_frequency maps to n values, and providing complete JSON examples. This goes beyond the schema's per-field 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?

Description opens with a specific verb-plus-resource: projecting a savings account, certificate of deposit, or investment balance from principal, annual rate, term, and optional monthly deposits. It also names sibling alternatives (simple-interest, savings-goal, loan-payment) and states what the tool computes, including the contribution/interest split, clearly distinguishing it from other calculators.

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?

Contains explicit when-to-use guidance ('Use this when you need to project...'), a direct call instruction, and explicit when-not-to-use exclusions with named alternatives for non-reinvested interest, savings-goal planning, and loan repayment. This leaves no ambiguity about tool selection.

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