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

Examples: compound_interest(10000, 0.05, 5) # $10,000 at 5% for 5 years → $12,762.82 compound_interest(5000, 0.03, 10, 12) # $5,000 at 3% compounded monthly → $6,744.25

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
rateYes
timeYes
topicYes
formulaYes
principalYes
difficultyYes
final_amountYes
total_interestYes
compounds_per_yearYes

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the agent knows it's safe. The description adds the underlying formula, clarifies that the rate is a decimal, and provides example outputs, giving useful behavioral context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: a one-sentence summary, then formula, parameter legend, and examples. All content is relevant and necessary for correctly invoking a compound interest calculator.

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?

The formula, parameter explanation, and example outputs cover the tool's behavior fully. The output schema covers return structure, and the schema constraints handle edge cases, making this description sufficient for reliable usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage, the baseline is 3, but the description significantly elevates understanding by presenting the formula A = P(1 + r/n)^(nt) and worked examples showing the role of each parameter, including the default for compounds_per_year.

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 'Calculate compound interest for investments', using a specific verb and resource. It clearly distinguishes itself from sibling calc tools (calc_expression, calc_statistics, calc_units) by focusing on compound interest specifically.

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?

The context is clear: investment and compound interest, reinforced by the formula and examples. However, it does not explicitly state when to use this tool over alternatives or provide exclusions, so it stops short of a 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.

TDQS

A4/5.0
Disambiguation4/5

Most tools are clearly distinct (calculation, interest, stats, units, matrix ops, plotting, workspace). However, plot_function, plot_line_chart, and plot_financial_line could be confused since they all produce line-like plots, though descriptions note their specific use cases.

Naming Consistency5/5

Tool names follow a clear, consistent prefix pattern: calc_*, matrix_*, plot_*, and workspace_*. This makes it easy to infer related functionality at a glance.

Tool Count4/5

17 tools is on the higher side but acceptable for the wide math scope (basic arithmetic, statistics, units, matrices, plotting, workspace). Each tool serves a distinct purpose, though a couple like plot_line_chart and plot_function could potentially be consolidated.

Completeness4/5

Core mathematical operations are well covered: expression evaluation, statistics, unit conversion, matrix operations, and common plot types. Minor gaps exist (e.g., no bar chart, no equation solving), but these are not critical for the server's apparent educational purpose.