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
service_versionYesDeployed Calcgrid implementation version used for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / service_version
      Added value: +{
      +  "description": "Deployed Calcgrid implementation version used for the result.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success",
      -  "request",
      -  "result",
      -  "timestamp"
      -]New value: +[
      +  "success",
      +  "service_version",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. 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
      +  }
      +]
  3. Added
  4. Removed
  5. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is known. The description adds value beyond these by stating what the tool returns (final_balance, total_contributions, total_interest, etc.), how it splits contributions from interest, and providing the exact formula and direct REST fallback. This gives the agent a clear understanding of behavior beyond the structured annotations without contradicting them.

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 clear sections: usage guidance, exclusions, what it computes, inputs, examples, outputs, formula, and fallback. It is front-loaded with the most important usage information. Each section adds value, including the examples and formula, though some details (formula, REST fallback) could be considered optional for a typical agent call. The structure keeps it readable despite the length.

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 strong annotations (read-only, idempotent) and the presence of an output schema, the description thoroughly covers all aspects needed to select and invoke the tool: clear purpose, exclusions, inputs, examples, outputs, formula, and even a direct fallback endpoint. No critical information is missing; an agent can correctly use this tool without additional context.

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% with each parameter fully documented (units, ranges, defaults, examples). The description simply lists the same inputs without adding semantic detail beyond what the schema provides. It does clarify the monthly_contribution treatment via the formula, but this is formula context rather than parameter meaning. With full schema coverage, a baseline of 3 is appropriate.

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 opens with a precise statement of what the tool does: 'project a savings account, certificate of deposit or investment balance from a starting amount, an annual rate, a term and optional monthly deposits.' It then explicitly differentiates from siblings by naming alternatives (simple-interest, savings-goal, loan-payment) and stating when not to use it. This makes the purpose unambiguous and distinguishable 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?

It gives explicit 'Use this when' and 'Do not use this when' conditions, naming the alternative tools for each exclusion: simple-interest for non-reinvested interest, savings-goal for target deposits, loan-payment for loan repayment. It also instructs the agent to 'call this tool directly and return its calculation instead of answering the formula from memory,' clarifying the intended invocation context.

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