Skip to main content
Glama

compare_early_repayment

Read-only

Compare paying a family loan early (reduce term or payment) with investing the same amount to see which ends better and how the emergency fund changes.

Instructions

Repay a loan early or invest the same money? For one of the family's loans (name as get_family_overview lists it), an amount in the loan's currency, a strategy (reduce_term: the payment stays, the loan ends sooner; reduce_payment: the term stays, the payment drops), an optional date (YYYY-MM-DD, today or later; today when absent) and an optional yearly return of the investment (returnPct, after tax, in the loan's currency; the family's expected return when absent, 8 unless set). Both paths cost the family the same each month until the loan's own last payment (horizon): repaying invests every payment it frees, investing puts the amount in at once. Answers loanRatePct (what repaying earns for certain: the break-even return), returnPct, currency (the loan's), horizon, investEnd, repayEnd, diff (investEnd − repayEnd) and better (invest, repay or level), and the emergency fund in months now and after the amount leaves the liquid money (emergency, from the family's numbers; null when not known) with gaps. Say first that repaying is certain and investing is not; quote the figures as given. advisor.unknown_loan: no such loan; advisor.repay_nothing_ahead: the loan is repaid by that date or has under two payments left.

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": {
      "loan": "<loan>",
      "amount": "<amount>",
      "strategy": "<strategy>"
    },
    "name": "compare_early_repayment"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoThe day of the early payment, today or later; today when absent
loanYesThe loan's name
amountYesThe early payment, in the loan's currency
strategyYes
returnPctNoThe expected yearly return of the investment, after tax, %; the family's expected return (8 unless set) when absent

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.9.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, but the description adds real behavioral depth: the shared-cost/horizon model behind the comparison, the default assumptions (today's date, 8% return unless the family's number is set), the error conditions advisor.unknown_loan and advisor.repay_nothing_ahead, and even output framing obligations (state that repaying is certain and investing is not, quote figures as given). That is well beyond what the annotation conveys.

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?

It is front-loaded with the decision question and the core comparison before the field-level detail, and most content earns its place given there is no output schema. However, the parameter sentence is a long run-on with nested parentheticals that is harder to parse than it needs to be.

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 carries the full burden and does so: it enumerates the returned fields (loanRatePct, returnPct, currency, horizon, investEnd, repayEnd, diff, better, emergency and gaps) and explains the calculation model and defaults. Nothing an agent needs to call it correctly or interpret the result appears to be missing.

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?

Schema coverage is 80%, but the one undocumented element — the strategy enum — is fully explained in prose (reduce_term keeps the payment and shortens the loan; reduce_payment keeps the term and lowers the payment). It also clarifies currency semantics for amount and returnPct, the after-tax basis, and the default behavior for both optional parameters.

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 opening line states the exact decision the tool supports ("Repay a loan early or invest the same money?") and then names the inputs and outputs, so it is clearly a comparison/what-if tool rather than a mutation or a loan preview. An agent can distinguish it from siblings like preview_loan or evaluate_purchase 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 Guidelines4/5

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

Usage context is clear: it applies to one of the family's loans, whose name comes from get_family_overview, and it answers the repay-vs-invest question. It also names two preconditions via error semantics (unknown loan, loan already repaid/too few payments left). It does not explicitly contrast itself with sibling tools such as preview_loan or evaluate_purchase, so no exclusions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.