Skip to main content
Glama

PoliErgaleio

audit_mortgage_statement

Forensic audit of a mortgage statement: replays the loan day by day and grid-searches the bank's interest convention (Actual/365, Actual/360 or Actual/Actual day count; monthly, semi-annual or annual capitalisation; exact or 2-decimal daily rounding), ranks candidates by RMS error against the bank's own running balance, and reports the interest overcharge implied by the best fit. Use to audit an actual mortgage statement. Require statement rows, at least one usable interest rate and balance checkpoints sufficient to fit the calculation. Reuse only extracted facts; inferred day-count and capitalization conventions are estimates, not confirmed bank terms.

Input Schema

NameRequiredDescriptionDefault
rowsYesParsed statement rows in chronological order. At least one row must carry ratePct.
topNNoHow many ranked candidate conventions to return (default 3).
rulesNoSkip the grid search and test one explicit convention.
includeRowDetailNoInclude the per-row expected balance / delta / flag detail (can be large).

Output Schema

NameRequiredDescriptionDefault
seriesNo
rmsDeltaYes
fitStatusYes
periodEndYes
rowDetailNo
finalDeltaYes
assumptionsYes
flaggedRowsYes
periodStartYes
bankInterestYes
bestFitLabelYes
bestFitRulesYes
observationsYes
rowsAnalyzedYes
netOverchargeYes
expectedInterestYes
rankedCandidatesYes
netOverchargeRangeYes
equivalentCandidatesYes
expectedInterestRangeYes
equivalentCandidateCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it explains the internal fitting procedure, that results are ranked by RMS error, and crucially that inferred day-count and capitalisation conventions are estimates rather than confirmed bank terms. It omits runtime/cost expectations for a grid search over up to 2000 rows, which keeps it out of 5 territory.

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-loaded with the core mechanism, then prerequisites, then the accuracy caveat — a sensible ordering. The opening sentence is long and clause-heavy, but every clause describes a distinct part of the computation rather than padding.

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?

An output schema exists, so return shape need not be described. The description covers inputs, fitting methodology, and interpretive limits, which is enough for a nested-schema, four-parameter analytical tool. A note on how confidence degrades with few checkpoints would have completed it.

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 baseline is 3; the description still adds real meaning by stating that the rows must be chronological with at least one ratePct and that balance checkpoints are what the fit uses. Those constraints are not obvious from the schema alone, so it edges above baseline.

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 concrete verb and resource ("forensic audit of a mortgage statement") and then specifies the mechanism: day-by-day replay, grid search over day-count/capitalisation/rounding conventions, RMS ranking, and overcharge reporting. This is clearly distinguishable from the sibling parse_mortgage_statement_text, which only extracts data, and from simulate_mortgage, which projects rather than audits.

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?

"Use to audit an actual mortgage statement" plus explicit preconditions (statement rows, at least one usable rate, sufficient balance checkpoints) tells the agent when the tool applies and what makes an input valid. It stops short of naming the alternative parse tool or saying when not to use it, so it earns a 4 rather than 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.

Resources