Gated government loan program router. Step 1 classifies the conforming loan limit and surfaces the target program (VA, FHA, Conventional) into the output payload. A §21.4 fork gate then routes VA loans to the VA funding fee and residual income calculator (statutory table 38 USC §3729 + VA Pamphlet 26-7 Ch.4 residual income by region/family size). All other programs route to the FHA MIP eligibility and cost calculator (HUD Handbook 4000.1 UFMIP 1.75% + annual MIP grid from ML 2023-05). Both branches are reachable; the gate is a total function with mandatory default.
loan_program (VA / FHA / Conventional / USDA) from input into the output payload. The §21.4 gate reads /loan_program to route: VA to the VA benefit calculator, all others to FHA MIP calculation.check_conforming_loan_limit{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "check_conforming_loan_limit",
"arguments": {
"loan_amount": 420000,
"units": 1,
"state": "TX",
"loan_program": "VA"
}
},
"id": 1
}
compute_va_funding_fee_residual{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "compute_va_funding_fee_residual",
"arguments": {
"base_loan_amount": 420000,
"down_payment_pct": 5.0,
"loan_purpose": "purchase",
"va_use_type": "first",
"funding_fee_exempt": false,
"family_size": 3,
"state": "TX",
"dti_pct": 38.0,
"gross_monthly_income": 8500,
"monthly_shelter_expenses": 2200
}
},
"id": 2
}
compute_fha_mip_eligibility{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "compute_fha_mip_eligibility",
"arguments": {
"base_loan_amount": 420000,
"ltv_pct": 96.5,
"term_years": 30,
"fico_score": 640,
"front_end_dti_pct": 28.5,
"back_end_dti_pct": 41.0,
"loan_purpose": "purchase"
}
},
"id": 2
}
Copy this paragraph into Claude, OpenClaw, or any MCP-aware agent to run this whole workflow on the server and check one field that answers a real question.
Question: For this VA purchase, does the borrower still meet the residual income test if gross income falls to 2000?
Run the AINumbers MCP tool `run_chain` with {"chain":"mortgage-government-loan-fit"} and read `art-225-va-funding-fee-residual.residual_income.meets_requirement`.
Re-run with `inputs` for `art-225-va-funding-fee-residual`, reusing the values that result echoed, with `gross_monthly_income` changed so gross monthly income drops to 2000. Compare the same field.
Verify: call `verify_execution_hash` (https://mcp.ainumbers.co/mcp) with `claimed_hash` set to `composite_execution_hash` and the full `composite_artifact`.
Ledger, for a human re-check: https://ledger.ainumbers.co/
PII rule: send synthetic or anonymised inputs only. The MCP server runs these kernels and logs no payloads.
Chain page: https://ainumbers.co/chaingraph/chains/mortgage-government-loan-fit.html