Skip to main content
Glama

Agent Data Tools: Utilities

Compound interest calculator: future value with monthly contributions

calc_compound_interest
Read-only

Compound interest on savings or an investment: starting amount, annual rate, years, compounding (yearly, quarterly, monthly or daily) and an optional contribution at the end of each month. Returns the future value, total contributed, interest earned and the balance after each year. Use for savings goals and investment what-ifs; rates are assumed constant. Example: principal=10000, rate=7, years=10. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": {
      "principal": "<principal>",
      "rate": "<rate>",
      "years": "<years>"
    },
    "name": "calc_compound_interest"
  }
}

Input Schema

NameRequiredDescriptionDefault
rateYesAnnual interest rate in percent, -50 to 100
yearsYesYears, up to 100
monthlyNoContribution at the end of each month (default 0)
compoundNoyearly, quarterly, monthly (default) or daily
principalYesStarting amount (0 or more)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, which the description reinforces ('reads or computes only and changes nothing'). It adds genuinely new behavioral context: a per-call price ($0.01 via x402 USDC or card key), first 10 free, failed calls free, and that repeats are charged – consistent with idempotentHint=false. However, it doesn't discuss precision/rounding or any limits on result size, so it adds useful but not comprehensive context.

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 core computation and inputs are front-loaded in the first sentence, followed by return values, usage, example, and billing. It is dense but nearly every clause carries information; the pricing sentence is somewhat compressed yet necessary for an agent to understand cost implications.

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 compensates by stating exactly what is returned (future value, total contributed, interest earned, yearly balance). Combined with input semantics, usage context, the constant-rate assumption, and the cost model, 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 every parameter (including the compound enum values and the monthly default of 0) is already documented in the schema. The description restates the same field list and adds only a light example (principal=10000, rate=7, years=10) and the constant-rate assumption, so the baseline of 3 applies.

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 names a specific computation ('Compound interest on savings or an investment') and enumerates the exact inputs (starting amount, annual rate, years, compounding frequency, monthly contribution) plus what is returned. This is clearly distinguishable from sibling calculators like calc_loan or calc_tip.

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?

It gives explicit usage context ('Use for savings goals and investment what-ifs') and a stated constraint ('rates are assumed constant'), plus a worked example. It stops short of naming when-not-to-use cases or pointing to an alternative tool, so it lands at 4 rather than 5.

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