Skip to main content
Glama

Interés compuesto

fin-compound-interest
Read-onlyIdempotent

Calcula el valor futuro con interés compuesto A = P(1 + r/n)^(n·t), con aportes periódicos opcionales. Cuándo: un cálculo de dinero, impuestos o matemática financiera tiene que ser exacto y reproducible (redondeo, centavos, tasas). No para: calcular el interés simple I = P·r·t y monto total, con tiempo en años, meses o días (fin-simple-interest). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Computes the future value of a principal with compound interest A = P(1 + r/n)^(n·t), optional regular contributions at period end, and the interest earned. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: computing the simple interest I = P·r·t and the total amount, with time in years, months or days (fin-simple-interest). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
yearsYesYears (number; required; min 0; max 1000).
principalYesInitial principal (number; required; min 0).
annual_rateYesAnnual nominal rate, decimal (number; required; min 0; max 10).
contributionNoContribution per period (number; optional; default 0; min 0).
compounds_per_yearNoCompounding periods per year (integer; optional; default 12; min 1; max 365).

Output Schema

NameRequiredDescriptionDefault
future_valueNo
interest_earnedNo
total_contributedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / annual_rate / examples
      Added value: +[
      +  0.05
      +]
    • addedInput schema / properties / principal / examples
      Added value: +[
      +  1000
      +]
    • addedInput schema / properties / years / examples
      Added value: +[
      +  10
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Computes the future value of a principal with compound interest A = P(1 + r/n)^(n·t), optional regular contributions at period end, and the interest earned. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: computing the simple interest I = P·r·t and the total amount, with time in years, months or days (fin-simple-interest). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint=false, idempotentHint and destructiveHint=false, yet the description adds genuinely new operational limits (64 KB JSON input, 1 s per call, 1 MB result) that matter for batching decisions. The 'solo lectura, sin red, sin estado guardado' and 'determinista' sentences largely restate the annotations, which is redundant but consistent, not contradictory.

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?

Front-loads the purpose and formula before the when/not-for routing and limits, using clear labels. It is somewhat long and partially bilingual, with the redundant side-effects clause and a pointer fragment ('[EN completo / full EN: inputSchema.description]') that adds little, but no sentence is damaging.

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?

An output schema exists, so return-value explanation is not required, and the description covers purpose, routing, determinism, and hard limits. Everything an agent needs to select and call this tool correctly is present.

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 schema baseline already documents all five parameters. The description adds real semantics on top: it clarifies that contributions are optional and occur at period end, and the formula maps annual_rate and compounds_per_year to r and n, disambiguating nominal rate versus compounding frequency.

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?

States a specific verb and resource plus the exact formula: computes future value A = P(1 + r/n)^(n·t) with optional periodic contributions. Explicitly contrasts with fin-simple-interest (I = P·r·t), so an agent can distinguish it from siblings without opening the schema.

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?

Provides an explicit 'Cuándo' clause (money/tax/financial math needing exact, reproducible results with rounding, cents and rates) and an explicit 'No para' clause naming the alternative fin-simple-interest and its criteria (simple interest, time in years/months/days). Both the positive and negative routing conditions are present.

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