Skip to main content
Glama

Compound Interest Calculator

calc_interest
Read-onlyIdempotent

Calculate compound interest for investments.

Formula: A = P(1 + r/n)^(nt) Where:

  • P = principal amount

  • r = annual interest rate (as decimal)

  • n = number of times interest compounds per year

  • t = time in years

Input Schema

NameRequiredDescriptionDefault
rateYesAnnual interest rate as decimal 0.0-1.0 (e.g. 0.05 = 5%). If entering a percentage, divide by 100 first.
timeYesInvestment time in years (must be > 0), e.g. 10.0
principalYesInitial investment amount in dollars (must be > 0), e.g. 1000.0
compounds_per_yearNoCompounding frequency per year (must be > 0): 12=monthly, 365=daily

Output Schema

NameRequiredDescriptionDefault
rateYes
timeYes
topicYes
formulaYes
principalYes
difficultyYes
final_amountYes
total_interestYes
compounds_per_yearYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds the computation formula and the decimal convention for the rate, but says nothing about precision/rounding, handling of extreme inputs, or output format. With annotations carrying the safety burden, this is adequate but not rich.

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 purpose is front-loaded in one sentence and the formula plus variable list follow in a scannable structure with no wasted prose. It is slightly longer than strictly necessary for a 4-parameter calculator, but every line contributes to interpretation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and read-only/idempotent annotations, the description need not explain return values, and it covers the conceptual model fully. The minor gap is that it never mentions the default monthly compounding or the >0 constraints that the schema enforces.

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 description coverage is 100%, so the baseline is 3, but the description goes further by mapping P, r, n, and t onto the formula and clarifying that n is compounds-per-year and r is the decimal annual rate. This ties each input to its role in the computation, adding meaning beyond the individual schema 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?

The description names a specific verb and resource ('Calculate compound interest for investments') and the accompanying formula pins down exactly which computation is performed, making it clearly distinct from generic siblings like calc_expression or calc_statistics. An agent can identify this as the financial/interest-specific calculator without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this tool versus alternatives such as calc_expression, nor any exclusions or prerequisites. Usage is only implied by the tool's name and formula, so an agent must infer routing on its own.

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.