Skip to main content
Glama

tvm-fund

calculate_loan_payment

Read-onlyIdempotent

Calculate the level periodic payment (PMT) that fully amortises a loan: the constant payment per period covering principal and interest over the loan term. Formula: PMT = P x [r(1 + r)^n] / [(1 + r)^n - 1]. WHEN TO USE: Use to size loan/mortgage payments, check affordability, or reverse-engineer what a borrower can service — given principal, periodic rate and number of periods. WHEN NOT TO USE: Do NOT use for interest-only facilities, balloon structures with uneven payments, or when you need the total interest paid rather than the payment itself. BEHAVIOUR: pure deterministic calculation — no side effects, no network or storage access; idempotent and non-destructive; identical inputs always produce identical outputs. Division by zero, non-finite inputs, or mathematically undefined combinations return an explicit error instead of a number. RETURNS: JSON object { loan_payment: number (currency per period), inputs }. PARAMETERS: principal (required): Loan principal amount, e.g. 500000. Must be > 0. rate (required): Periodic interest rate as a decimal, e.g. 0.005 = 0.5% monthly for a 6% annual rate (never pass percentage points). Must match period frequency. periods (required): Total number of payments, e.g. 60 for a 5-year monthly loan. Must be >= 1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rateYesPeriodic interest rate as a decimal, e.g. 0.005 = 0.5% monthly for a 6% annual rate (never pass percentage points). Must match period frequency.
periodsYesTotal number of payments, e.g. 60 for a 5-year monthly loan. Must be >= 1.
principalYesLoan principal amount, e.g. 500000. Must be > 0.

TDQS

A4.9/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: pure deterministic calculation, no side effects, no network or storage access, idempotent and non-destructive behavior, and explicit error returns for invalid mathematical inputs. This is consistent with the readOnlyHint, idempotentHint, and destructiveHint 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 thorough but well organized with clear labeled sections: formula, when to use, when not to use, behavior, returns, and parameters. Critical information is front-loaded, and every section serves a distinct purpose for correct tool invocation.

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?

Since there is no output schema, the description appropriately defines the return shape as a JSON object with loan_payment and inputs. It also covers the formula, parameter constraints, edge-case error behavior, and exclusions. Nothing material is missing for an agent to call this tool correctly.

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?

The input schema already documents all three parameters with constraints and examples, so the baseline is strong. The description adds extra value through the formula, the warning about passing decimal rates rather than percentage points, and the relationship between periods and loan term.

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 states a specific verb and resource: calculating the level periodic payment (PMT) that fully amortises a loan. It includes the formula, clarifies the payment covers principal and interest, and is clearly distinguishable from the other finance calculator siblings by its fully-amortising loan focus.

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?

The description includes both WHEN TO USE and WHEN NOT TO USE sections. It specifies appropriate use cases like mortgage sizing and affordability checks, and explicitly excludes interest-only facilities, balloon structures, and requests for total interest paid. This gives an agent clear routing guidance.

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.6/5.0
Disambiguation5/5

Each tool targets a mathematically distinct calculation (single-sum PV/FV, annuity, perpetuity, payback, fund multiples). The descriptions include explicit 'WHEN TO USE' and 'WHEN NOT TO USE' sections with cross-references, making it unambiguous which tool applies to which scenario.

Naming Consistency5/5

All tool names follow the exact pattern verb_noun with the consistent 'calculate_' prefix (e.g., calculate_present_value, calculate_payback_period). The naming convention is uniform across the entire set.

Tool Count5/5

11 tools is well within the ideal range for a focused domain. Each tool addresses a distinct calculation relevant to time-value-of-money and fund performance, with no redundant entries.

Completeness3/5

The set covers many core calculations but is missing NPV and IRR, which are explicitly referenced as the recommended tools in several descriptions (e.g., payback periods, TVPI). This creates a notable gap that could lead agents to follow cross-references to non-existent tools.

Resources