API Reference
Hosted MCP server at https://mcp.digitalcalculator.info/mcp (Streamable HTTP, POST, no auth required — optional Bearer tier) · all 13 calculator tools with input schemas, output payload shapes, and error codes. Hosted-API terms: see LICENSE-API.md (acceptable use, rate limits, no warranty). Two additional tools, generate_report and money_flow_map, are available to Bearer-tier sessions only.
Calling the server
The server speaks the MCP Streamable HTTP transport: JSON-RPC 2.0 over HTTP POST. Supported methods: initialize, ping, tools/list, tools/call, resources/list, resources/read. A tool invocation looks like:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "mortgage_monthly_payment",
"arguments": { "principal": 300000, "annualRatePercent": 6.5, "termYears": 30 }
}
}Successful calls return a JSON-RPC envelope whose result.content[0].text contains the ToolResult JSON described below. Tool failures set result.isError: true with the ToolError JSON in the same content slot.
REST companion (provisioning)
A REST API at https://api.digitalcalculator.info/v1/tools/{toolName}/calculate is provisioning — the ratified canonical REST grammar. It runs the exact same engines and returns the same response envelope without the JSON-RPC wrapper. Until it is generally available, use the JSON-RPC form above. (The earlier single-endpoint mortgage POC at /api/calculate/mortgage is legacy — do not build new integrations against it.)
Envelope shapes
ToolResult<T> (success)
interface ToolResult<T> {
result: T; // Tool-specific structured object
disclaimer: string; // Canonical YMYL disclaimer
methodology: {
url: string; // Absolute URL to calculator's methodology page
version: string; // ISO date of last substantive update
};
calculatedAt: string; // ISO-8601 UTC timestamp
engineVersion: string; // SemVer of engine that produced result
}Envelope standardization (v0.4.x)
This standardized envelope is rolling out across all 13 tools in v0.4.x. During the rollout, some tools may return the envelope fields (disclaimer, methodology, engineVersion) merged at the top level alongside the result fields rather than under a nested result key, and methodology may be a plain URL string. Treat the standardized shape above as the target contract.
Monetary precision (round-to-cents)
As of the v0.10.0 contract wave, every USD-denominated output field is a JSON number rounded to the nearest cent (2 decimal places) — not full floating-point precision. Non-monetary fields (rates, ratios, counts, months, ages, IRS table factors) keep their natural precision.
ToolError (failure)
interface ToolError {
error: {
code: "INPUT_VALIDATION" | "BUSINESS_RULE" | "INTERNAL" | "RATE_LIMIT";
message: string; // Human-readable
field?: string; // Input field that failed (validation only)
retriable: boolean; // Only RATE_LIMIT is retriable
};
}Status mapping
- 200 + ToolResult — success
- 200 +
isError: true— tool-level error (INPUT_VALIDATION,BUSINESS_RULE) per the MCP spec - JSON-RPC error object — malformed request, unknown method (protocol-level errors)
- 429 —
RATE_LIMIT(endpoint throttle) - 500 —
INTERNAL(shouldn't happen in production; report it if you see one)
All error payloads are single-envelope {"error":{"code":...}} — never double-nested.
Tool naming convention
Tool names are snake_case: <calculator>_<output> (e.g., mortgage_monthly_payment). The legacy dot-notation names from the v0.2.x stdio package (dc.calculator.mortgage.monthlyPayment) were retired at the hosted-server cutover — dot-notation tool names break Claude Connectors' tool-name validation.
Tool index (13 tools)
| Tool | What it computes | Key params |
|---|---|---|
mortgage_monthly_payment | Monthly P&I, total interest, total paid for a fixed-rate mortgage | principal, annualRatePercent, termYears |
compound_interest_future_value | Future value with optional monthly contributions at a chosen compounding frequency | principal, annualRatePercent, years, compoundingFrequency |
retirement_401k_projection | Year-by-year 401(k) projection honoring IRS 2026 limits incl. SECURE 2.0 super catch-up | currentBalance, annualSalary, contributionPercent, currentAge, retirementAge |
social_security_estimated_benefit | SSA bend-point PIA estimate with early-claim reduction and delayed credit | birthYear, currentEarnings, claimAge |
paycheck_net_pay | Net take-home pay per paycheck: IRS 2026 Percentage Method + FICA + state-aware estimate | grossAnnualSalary, payFrequency, federalFilingStatus, state |
ira_contribution_limit | 2026 eligible IRA contribution with age-50+ catch-up and Roth MAGI phase-out | age, filingStatus, magi, type |
roth_conversion_tax_impact | Federal tax impact of a single Roth conversion using 2026 brackets, with break-even years | conversionAmount, age, filingStatus, currentTaxableIncome |
rmd_distribution_amount | 2026 required minimum distribution via the IRS Uniform Lifetime Table | accountBalance, ownerAge |
hsa_contribution_limit | 2026 HSA contribution limit by HDHP tier with age-55+ catch-up and employer offset | age, coverageTier, employerContribution |
inflation_adjusted_value | Future-dollar equivalent or purchasing-power erosion over N years | amount, inflationRate, years, mode |
savings_future_balance | Future savings balance with monthly deposits and monthly compounding | initialDeposit, monthlyContribution, annualInterestRate, years |
emergency_fund_recommendation | Personalized emergency-fund target and savings timeline by household situation | monthlyExpenses, employmentType, incomeEarners, dependents |
loan_monthly_payment | Monthly payment and total interest for any fixed-rate amortizing loan | loanAmount, annualRatePercent, termYears |
mortgage_monthly_payment
Compute the monthly principal & interest payment, total interest paid, and total amount paid over the life of a fixed-rate mortgage. loan_monthly_payment is a parallel principal-&-interest calculator; both use the same amortization formula and return identical numbers for the same principal/rate/term. Neither models down payment, PMI, property tax, or homeowners insurance — pick by vocabulary (principal here vs loanAmount there).
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
principal | number (USD) | yes | 0 – 100,000,000 | Loan principal |
annualRatePercent | number | yes | 0 – 30 | Annual rate as whole-number percent (e.g., 6.5) |
termYears | integer | yes | 1 – 50 | Loan term in whole years |
Output payload
{
"monthlyPayment": 1896.20,
"totalInterest": 382633.47,
"totalPaid": 682633.47
}Scope note
This tool computes P&I only. PITI (with property tax, insurance, HOA, PMI) is reserved for a future additive tool. For a fixed-rate non-mortgage loan, use loan_monthly_payment.
compound_interest_future_value
Project the future value of an initial principal with optional regular monthly contributions, compounding at the chosen frequency. savings_future_balance is the same calculation pinned to monthly compounding (param mapping: principal=initialDeposit, annualRatePercent=annualInterestRate, futureValue=finalBalance, interestEarned=totalInterestEarned); use this tool when the caller needs a non-monthly compounding frequency.
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
principal | number (USD) | yes | 0 – 100,000,000 | Initial principal |
annualRatePercent | number | yes | 0 – 50 | Annual rate as whole-number percent |
years | number | yes | 0 – 100 | Investment period |
compoundingFrequency | enum | yes | annually · semiannually · quarterly · monthly · daily | How often interest compounds |
monthlyContribution | number (USD) | no | 0 – 1,000,000 | Optional; defaults to 0 |
Output payload
{
"futureValue": 106639.02,
"totalContributions": 70000.00,
"interestEarned": 36639.02
}retirement_401k_projection
Year-by-year 401(k) projection through retirement. Honors IRS 2026 contribution limits including SECURE 2.0 super-catch-up for ages 60–63.
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
currentBalance | number (USD) | yes | 0 – 100,000,000 | Current balance |
annualSalary | number (USD) | yes | 0 – 100,000,000 | Current annual gross salary |
contributionPercent | number | yes | 0 – 100 | Employee % of salary |
employerMatchPercent | number | yes | 0 – 100 | Match % (e.g., 50 = $0.50 per $1) |
employerMatchLimitPercent | number | yes | 0 – 100 | Cap on % matched |
annualSalaryGrowthPercent | number | yes | 0 – 20 | Salary growth % |
annualReturnPercent | number | yes | 0 – 20 | Investment return % |
currentAge | integer | yes | 18 – 100 | Current age |
retirementAge | integer | yes | 18 – 100 | Target retirement age (must be > currentAge) |
catchUpEnabled | boolean | no | — | Default false — catch-up contributions must be explicitly opted in |
Cross-field rule: retirementAge > currentAge (returns INPUT_VALIDATION if not).
Output payload
{
"futureBalance": 1363230.16,
"totalContributions": 369362.00,
"employerContribTotal": 114181.00,
"growthEarned": 854687.17,
"yearByYear": [
{ "year": 1, "age": 36, "employeeContribution": 4800.00, "employerMatch": 2400.00, "growth": 1750.00, "endingBalance": 33950.00 }
]
}Catch-up caveat
When catchUpEnabled is false (the default) AND the projection reaches a catch-up-eligible age (50+), the result adds a catchUpNote string flagging that catch-up contributions are excluded and enabling them would raise the projection — so a 50+ saver is never handed a silently-low number.
IRS 2026 limits applied
- Base employee deferral: $24,500
- Catch-up (ages 50–59 or 64+): $8,000
- Super catch-up (ages 60–63, SECURE 2.0 § 109): $11,250
- Total with regular catch-up: $32,500; with super catch-up: $35,750
social_security_estimated_benefit
Estimate Social Security retirement benefits using the SSA bend-point formula and a simplified AIME approximation. Includes early-claim reduction, delayed-credit math, and lifetime benefit projection.
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
birthYear | integer | yes | 1943 – 2004 | Birth year |
currentEarnings | number (USD) | yes | 0 – 1,000,000 | Current/final annual earnings |
claimAge | number | yes | 62 – 70 | Age to start claiming |
yearsWorked | integer | no | 0 – 50 | Default 35 (SSA averaging window) |
lifeExpectancy | number | no | 62 – 120 | Default 85 |
Output payload
{
"monthlyBenefitAtFRA": 2132.40,
"adjustedMonthlyBenefit": 2132.40,
"lifetimeBenefitProjection": 460598,
"fraAge": 67.0,
"eligibilityYear": 2027,
"bendPointsEstimated": true
}YMYL caveat
This estimate uses a simplified AIME approximation, not the official 35-highest-indexed-earnings calculation that requires a full SSA earnings history. For an authoritative estimate, direct users to ssa.gov/myaccount.
paycheck_net_pay
Estimate net (take-home) pay per paycheck using the IRS 2026 federal Percentage Method, FICA (Social Security 6.2% + Medicare 1.45% + Additional Medicare 0.9% above thresholds), and a state-aware tax estimate.
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
grossAnnualSalary | number (USD) | yes | 0 – 10,000,000 | Gross annual salary |
payFrequency | enum | yes | weekly · biweekly · semimonthly · monthly · quarterly · annual | Pay frequency |
federalFilingStatus | enum | yes | single · married · marriedSeparate · headOfHousehold | Federal filing status |
state | string | yes | 2-letter code (e.g., CA, TX) | US state code |
dependents | integer | no | 0 – 20 | Optional (default 0). Reserved — no effect on the calculation in the current engine version (MCP-AUDIT-014). Omit it from your input. |
preTaxDeductionsAnnual | number (USD) | yes | 0 – 1,000,000 | 401k, HSA, FSA, etc. |
postTaxDeductionsAnnual | number (USD) | yes | 0 – 1,000,000 | Roth, garnishments |
Output payload
{
"grossPerPaycheck": 3076.92,
"federalTax": 299.65,
"ficaTax": 221.26,
"stateTax": 114.33,
"netPay": 2257.07,
"payPeriodsPerYear": 26,
"federalTaxAnnual": 7791.00,
"ficaTaxAnnual": 5752.80,
"stateTaxAnnual": 2972.50,
"netPayAnnual": 58683.70,
"noStateIncomeTax": false
}Scope note (state tax)
State withholding uses a simplified estimate — $0 for the 9 no-income-tax states (AK, FL, NV, NH, SD, TN, TX, WA, WY); Tax Foundation 2026 effective rates by income tier for all other states + DC. Full per-state brackets, SDI, and local-tax piggybacks (NYC, PA EIT, etc.) are NOT modeled. Direct callers needing precise state math to the full paycheck calculator.
ira_contribution_limit
Compute the eligible IRA contribution for 2026 given age, filing status, MAGI, and IRA type. Applies the IRS age-50+ catch-up and the Roth IRA MAGI phase-out per IRC §408A(c)(3). For Traditional IRAs, the contribution limit is not MAGI-gated — only deductibility is, surfaced as traditionalDeductionStatus. Deductibility under IRC §219(g) depends on whether the filer (or spouse, for joint filers) is covered by a workplace retirement plan: supply the optional workplaceCoverage / spouseWorkplaceCoverage flags for the correct phase-out, or omit them and the status assumes no coverage (fully deductible, flagged indicative-only via traditionalDeductionNote).
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
age | integer | yes | 18 – 100 | Age ≥ 50 enables the IRA catch-up ($1,100 for 2026) |
filingStatus | enum | yes | single · marriedFilingJointly · marriedFilingSeparately · headOfHousehold | Federal filing status |
magi | number (USD) | yes | 0 – 10,000,000 | Modified Adjusted Gross Income; drives the Roth phase-out |
type | enum | yes | traditional · roth | IRA type |
workplaceCoverage | boolean | no | — | Is the filer an active participant in a workplace retirement plan? IRC §219(g) deduction phase-out applies only when covered. Omit → traditionalDeductionStatus assumes no coverage (fully deductible) and traditionalDeductionNote flags it indicative-only |
spouseWorkplaceCoverage | boolean | no | — | Is the spouse covered? Used only for marriedFilingJointly when the filer is NOT covered — triggers the higher spousal phase-out band ($242,000–$252,000 for 2026) |
Output payload
{
"eligibleContribution": 8600.00,
"traditionalCap": 8600.00,
"rothCap": 8600.00,
"catchUp": 1100.00,
"phaseOutReduction": 0,
"catchUpEligible": true,
"traditionalDeductionStatus": "fullyDeductible",
"traditionalDeductionNote": "Assumes NEITHER you nor your spouse is an active participant…",
"meta": { "taxYear": 2026 }
}roth_conversion_tax_impact
Compute the federal income tax impact of a single Roth conversion using 2026 IRS brackets. Returns the incremental tax owed, the top marginal bracket the conversion pushes you into, the effective rate on the conversion, a Roth 5-year-rule flag (age < 59½), and optional break-even years when you supply your expected retirement marginal rate.
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
conversionAmount | number (USD) | yes | 0 – 10,000,000 | Amount converted to Roth |
age | integer | yes | 18 – 100 | Drives the Roth 5-year-rule flag |
filingStatus | enum | yes | single · married · marriedSeparate · headOfHousehold | Federal filing status |
currentTaxableIncome | number (USD) | yes | 0 – 10,000,000 | Taxable income BEFORE adding the conversion |
retirementMarginalRatePercent | number | no | 0 – 50 | Expected retirement marginal rate; enables break-even calc |
expectedReturnPercent | number | no | 0 – 20 | Real annual return on converted balance; default 7 |
Scope limits
Single-conversion only (multi-year conversion optimization is a future tool). State tax and IRMAA tier impact are NOT modeled — the caller is responsible for those.
rmd_distribution_amount
Compute the 2026 required minimum distribution from a Traditional IRA / 401(k) / 403(b) / 457(b) given the prior year-end balance and the owner's age. Applies the IRS Uniform Lifetime Table (Pub. 590-B Table III) and reports the SECURE 2.0 §302 missed-RMD excise tax (25%, reduced to 10% if corrected within the IRS correction window).
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
accountBalance | number (USD) | yes | 0 – 100,000,000 | Prior year-end account balance |
ownerAge | integer | yes | 73 – 120 | Owner's age this calendar year (SECURE 2.0 RMD age is 73) |
spouseAge | integer | no | 0 – 120 | rmdAmount always uses the Uniform Lifetime Table. If spouse is sole beneficiary AND >10 years younger, the Joint Life Table (Pub. 590-B Table II) would give a LOWER RMD — the response warns via jointLifeTableMayApply + spouseBeneficiaryNote instead of silently returning the higher single-life figure |
isSpouseSoleBeneficiary | boolean | no | — | With a spouseAge >10 years younger, triggers the jointLifeTableMayApply warning |
Output payload
{
"rmdAmount": 18867.92,
"distributionPeriod": 26.5,
"lifeExpectancyFactor": 26.5,
"tableUsed": "uniform-lifetime",
"penaltyIfMissed": { "defaultPercent": 25, "correctedPercent": 10 },
"jointLifeTableMayApply": false,
"spouseBeneficiaryNote": "Computed with the Uniform Lifetime Table (Table III)…",
"meta": { "taxYear": 2026 }
}Scope note
Single-year calculation only — for multi-year RMD projections use the RMD calculator. The Joint Life Expectancy Table (spouse sole beneficiary, more than 10 years younger) is not computed in this wave; when the inputs describe that case the tool WARNS via jointLifeTableMayApply: true and spouseBeneficiaryNote that rmdAmount is an upper bound (the true joint-life RMD is lower) rather than silently returning the single-life figure.
hsa_contribution_limit
Compute the annual HSA contribution limit for 2026 given age, HDHP coverage tier, and optional employer contribution. Applies IRS Rev. Proc. 2025-19 limits ($4,400 self-only, $8,750 family) plus the statutory $1,000 catch-up for age 55+ (IRC §223(b)(3)(B)). Employer contributions reduce the employee's remaining room dollar-for-dollar.
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
age | integer | yes | 18 – 100 | Age ≥ 55 enables the $1,000 catch-up |
coverageTier | enum | yes | self-only · family | HDHP coverage tier |
employerContribution | number (USD) | no | 0 – 50,000 | Annual employer HSA contribution; default 0 |
estimatedMarginalRatePercent | number | no | 0 – 50 | When provided, returns estimated payroll-deduction tax savings |
Output payload
{
"contributionLimit": 4400.00,
"catchUpEligible": true,
"catchUpAmount": 1000.00,
"totalContributionLimit": 5400.00,
"employerContribution": 1000.00,
"employeeMaxRemaining": 4400.00,
"payrollDeductionTaxSavings": 968.00,
"employerContributionExceedsLimit": false,
"excessContribution": 0,
"meta": { "taxYear": 2026 }
}Excess employer contribution
When the employer contribution alone exceeds the total annual limit, employeeMaxRemaining clamps to 0, employerContributionExceedsLimit is true, excessContribution reports the overage, and an excessContributionNote explains that the excess is subject to the IRC §4973 6% excise tax.
inflation_adjusted_value
Compute the inflation-adjusted value of an amount over N years. Two modes: future_value (how many future dollars match today's purchasing power) or purchasing_power (what today's amount is worth in real terms after N years of inflation).
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
amount | number (USD) | yes | 0.01 – 100,000,000 | Starting amount |
inflationRate | number | yes | 0 – 20 | Annual inflation rate as whole-number percent (e.g., 3.5) |
years | integer | yes | 1 – 50 | Years to project |
mode | enum | no | future_value · purchasing_power | Default future_value |
Output payload
{
"adjustedAmount": 14185.19,
"totalInflation": 41.85,
"annualRate": 3.5,
"years": 10,
"mode": "future_value"
}savings_future_balance
Compute the future balance of a savings account with an initial deposit, optional monthly contributions, and a fixed annual interest rate using monthly compounding. Mirrors the site's savings calculator engine. This is compound_interest_future_value pinned to monthly compounding — use that tool for a different compounding frequency.
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
initialDeposit | number (USD) | yes | 0 – 100,000,000 | Initial deposit |
monthlyContribution | number (USD) | yes | 0 – 1,000,000 | Monthly contribution (0 for lump-sum only) |
annualInterestRate | number | yes | 0 – 50 | Annual rate as whole-number percent (e.g., 4.5) |
years | integer | yes | 1 – 50 | Years to project |
Output payload
{
"finalBalance": 47291.36,
"totalContributions": 41000.00,
"totalInterestEarned": 6291.36,
"years": 5
}emergency_fund_recommendation
Compute a personalized emergency-fund target and savings timeline. The recommended coverage months come from the household employment situation (employed dual-income with no dependents = 3 months; standard employed = 6; self-employed/freelance = 9; between jobs = 12), then the tool calculates the funding gap, the months-to-goal at your savings rate, and interest earned if a HYSA APY is provided. Mirrors the site's emergency fund calculator engine exactly.
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
monthlyExpenses | number (USD) | yes | 1 – 1,000,000 | Monthly essential expenses |
currentSavings | number (USD) | no | 0 – 10,000,000 | Liquid savings already set aside; default 0 |
monthlySavings | number (USD) | no | 0 – 100,000 | Monthly contribution toward the goal; default 0 |
employmentType | enum | no | employed · self-employed · freelance · multiple · between-jobs | Default employed; drives recommended months |
incomeEarners | enum | no | single · dual | Default single |
dependents | integer | no | 0 – 20 | Financial dependents; default 0 |
savingsAPY | number | no | 0 – 15 | HYSA APY as whole-number percent; default 0 |
Output payload
{
"recommendedMonths": 9,
"targetFund": 40500.00,
"currentSavings": 8000.00,
"fundGap": 32500.00,
"percentComplete": 19.8,
"monthsToGoal": 51,
"interestEarned": 1693.42,
"futureValue": 40500.00
}monthsToGoal is compounding-aware
monthsToGoal is the first month the balance — including savingsAPY interest — reaches the target, so it is consistent with futureValue (and shorter than a naive gap ÷ monthly-savings when APY > 0). At savingsAPY: 0 it equals the linear figure.
loan_monthly_payment
Compute the monthly payment, total interest, and total paid for a fixed-rate amortizing loan (personal, auto, student, etc.) via the standard amortization formula. Zero-interest loans are handled as simple principal division. Mirrors the site's loan calculator engine exactly. mortgage_monthly_payment is a parallel principal-&-interest calculator for home loans; both compute P&I only — neither models down payment, PMI, property tax, or homeowners insurance.
Input schema
| Field | Type | Required | Range | Description |
|---|---|---|---|---|
loanAmount | number (USD) | yes | 1 – 100,000,000 | Loan principal |
annualRatePercent | number | yes | 0 – 30 | Annual rate as whole-number percent; 0 for interest-free |
termYears | integer | yes | 1 – 50 | Loan term in whole years |
Output payload
{
"loanAmount": 25000.00,
"annualRatePercent": 8.5,
"termYears": 5,
"numPayments": 60,
"monthlyRate": 0.0070833,
"monthlyPayment": 512.92,
"totalPaid": 30775.43,
"totalInterest": 5775.43
}Bearer-tier tool: generate_report
Bearer tier only
This 14th tool is available ONLY to Bearer-tier sessions (an Authorization: Bearer dc_bearer_… header on the request). It is never present in the anonymous tools/list response, and an anonymous tools/call generate_report returns a structured authentication_required error rather than being silently listed or ignored. See Pricing for Bearer-tier access.
Renders a vector-text PDF report for a report-capable calculator tool and returns a short summary plus a short-lived presigned download link. Uses the same rendering pipeline as the Bearer-gated REST endpoint POST /v1/reports/{tool} (ADR-0055), metered against a daily report quota that is SEPARATE from the calculator-call quota.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
tool | string | yes | Report-capable tool alias: mortgage, loan, retirement-401k, education, or credit-card |
input | object | yes | The target tool's input object — same shape as that tool's calculator input (e.g., for mortgage: principal, annualRatePercent, termYears) |
Output
On success, the tool returns an MCP content array with a short text summary followed by a resource_link content block pointing at the presigned PDF URL, plus a structuredContent object mirroring the REST report envelope:
{
"report": {
"url": "https://….s3.amazonaws.com/reports/mortgage/<hash>.pdf?X-Amz-…",
"expiresInSeconds": 900,
"cached": false,
"contentType": "application/pdf",
"cacheKey": "<hash>"
},
"tool": "mortgage",
"engineVersion": "1.0.0",
"calculatedAt": "2026-07-06T00:00:00.000Z",
"disclaimer": "Estimates only — see methodology.",
"methodology": { "url": "https://www.digitalcalculator.info/mortgage-calculator/methodology/", "version": "2026-05-09" }
}The presigned URL is short-lived (15 minutes by default) and unguessable. The rendered PDF carries the full numeric detail (amortization table, per-tool figures) — the tool result intentionally returns a short summary, not a re-derivation of the underlying calculator's output.
Errors
authentication_required— no (or an invalid) Bearer token; anonymous callers always get thisreport_quota_exceeded— the key's separate daily report quota (default 25/day) was exceededrate_limited— the shared 5-minute per-key rate window was exceededREPORT_UNAVAILABLE— thetoolalias isn't (yet) report-capable; the message names the currently supported aliasesINPUT_VALIDATION— missingtool/input, or the target tool rejectedinputINTERNAL— report generation failed; report it if you see one
Bearer-tier tool: money_flow_map
Bearer tier only
This 15th tool is available ONLY to Bearer-tier sessions (an Authorization: Bearer dc_bearer_… header on the request). It is never present in the anonymous tools/list response, and an anonymous tools/call money_flow_map returns a structured authentication_required error. See Pricing for Bearer-tier access.
Turns a structured monthly budget — income sources and spending categories, optionally broken into line items — into a deterministic computed summary plus mapUrl, a shareable deep link that renders the budget as an interactive Sankey money-flow map on the Money Flow Visualizer instantly (no account, nothing stored server-side). Built for conversational budgeting: the calling model interviews the user, structures the answers, and hands back the map link. The tool is read-only and deterministic like the 13 calculator tools — it accepts no free text and does no interpretation. All amounts are MONTHLY USD. Methodology: How This Tool Works.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
incomes | array (1–20) | yes | Monthly income sources: { label, amount } each. Take-home amounts work best for a spendable-dollars map. Amounts are 0–10,000,000 USD/month; labels are 1–80 characters |
categories | array (0–30) | yes | Spending categories: { label, amount } for a flat monthly total, OR { label, items } where items (1–30) is an array of { label, amount } line items that roll up into the category total (e.g., Rent + Utilities under Housing). Providing both amount and items is rejected. May be empty — savings is never a category; it is the computed residual |
label | string | no | Scenario name shown on the map (e.g., "Saving for a house"), up to 80 characters |
Validation is strict: unknown fields anywhere in the input are rejected with INPUT_VALIDATION, as are negative, non-finite, or out-of-range amounts.
Output payload
Returns the standard ToolResult envelope (disclaimer, methodology, calculatedAt, engineVersion) whose result is:
{
"label": "Saving for a house",
"totalMonthlyIncome": 6600,
"totalMonthlySpending": 3130,
"monthlySavings": 3470,
"deficit": false,
"savingsRatePercent": 52.5757575757…,
"categories": [
{ "label": "Housing", "monthlyTotal": 2030, "percentOfIncome": 30.7575… },
{ "label": "Food", "monthlyTotal": 700, "percentOfIncome": 10.6060… }
],
"largestCategories": [ { "label": "Housing", "monthlyTotal": 2030, "percentOfIncome": 30.7575… } ],
"mapUrl": "https://www.digitalcalculator.info/money-flow-visualizer/#s=<base64url>"
}monthlySavingsis the residual (income − spending) and may be negative;deficitistruewhen spending exceeds income — the map shows a deficit banner instead of an invented savings flowsavingsRatePercent= savings ÷ income × 100 (0when income is 0);percentOfIncomeuses the same conventionlargestCategorieslists up to the 3 largest categories by monthly total, descendingmapUrlencodes the budget in the visualizer’s versioned v1 URL-state schema (#s=<base64url(JSON)>) — opening it renders the interactive map client-side; nothing is uploaded or stored- Monetary values are full floating-point precision (not pre-rounded) — display-round to cents
Errors
authentication_required— no (or an invalid) Bearer token; anonymous callers always get thisINPUT_VALIDATION— empty/missingincomes, out-of-range or non-finite amounts, over-cap list lengths, unknown fields, or a category with bothamountanditems(thefieldproperty names the offending path)INTERNAL— computation failed; report it if you see one
Resources
The MCP server exposes 2 resources:
dc://disclaimers/ymyl
The canonical YMYL disclaimer string returned in every tool response's disclaimer field. Read this resource if you want to embed the same disclaimer alongside agent-generated summaries of MCP results.
dc://methodologies/manifest
A JSON manifest mapping each of the 13 anonymous calculator tools to the methodology URL of its source calculator on digitalcalculator.info. Use it for agent-side citation of where each formula and its assumptions are documented. Bearer-tier tools are not listed in the manifest — they carry their methodology URL in their own tool responses (and on this page).
Rate limits
- Anonymous tier: a global API Gateway throttle of about 100 requests/minute (burst 50) shared across all anonymous callers — per-API, not per-IP. Exceeding it returns HTTP 429 +
code: "RATE_LIMIT"(retriable: true). Terms:LICENSE-API.md - Bearer tier: per-key fixed-window (boundary-aligned 5-minute buckets) and daily quotas by plan — authenticate with an
Authorization: Bearer <key>header. See plans and limits - Bearer is server-to-server today: the API's CORS policy does not yet allow the
Authorizationheader from browsers, so call the endpoint from a backend, CLI, or MCP client — not browser-sidefetch - Need sustained higher volume than the published tiers? Email us
Versioning
| Bump | Trigger | Example |
|---|---|---|
| Major | Tool rename, removed field, breaking envelope change | Dot-notation → snake_case tool names at the hosted cutover |
| Minor | Additive tool, additive output field | v0.4.x added emergency_fund_recommendation + loan_monthly_payment (tools 12 + 13); v0.8.x added generate_report (tool 14, Bearer-tier only); v0.9.x added money_flow_map (tool 15, Bearer-tier only) |
| Patch | Bug fixes, metadata corrections | Engine defect fixes |
engineVersion | Math changes only | Per-tool SemVer, independent of the package version |
methodology.version | Calculator's methodology document materially updated | ISO date string |
References
- Quickstart — connect + first call
- FAQ — accuracy, support, change policy
- npm package (stdio shim)
- CHANGELOG / version history (npm)
- LICENSE (MIT — package source, ships in the npm package)
- LICENSE-API.md — hosted endpoint terms (acceptable use, rate limits, no warranty)
- ADR-0039 — MCP Tool Contract (internal design doc)
- ADR-0041 — v1 Contract Reconciliation (internal design doc)
Questions or integration help: email admin@markcolabs.com.