Skip to main content
Glama

mtgmon Mortgage Analytics

HMDA product analytics

get_hmda_product_analytics
Read-onlyIdempotent

HMDA origination counts, reported dollar amounts, averages, and year-over-year growth for one product family, optionally for one property state or one lender, with an annual history back to 2018.

Use for: HELOC, reverse-mortgage, or closed-end mortgage origination volume and growth; product mix by loan program (conventional/FHA/VA/USDA), purpose, lien, occupancy, construction method, or business purpose; state-level or lender-level product questions. Do not use for: lender rankings or market share (search_lenders / get_lender_profile) or GSE loan performance (get_loan_performance).

Important: product_family defaults to 'heloc'. Use 'closed_end_mortgage' for ordinary mortgages or 'all' for every HMDA origination. Source is the frozen annual FFIEC/CFPB HMDA Snapshot LAR (one release per year, 2018 onward); state filters use the property state, not the lender's headquarters.

Returns data.selected_year, data.current and data.previous (each {year, origination_count, reported_amount_count, reported_amount_sum, average_reported_amount, reported_amount_max, origination_count_yoy_pct, reported_amount_sum_yoy_pct, average_reported_amount_yoy_pct}), data.history (one such row per year), data.filters (applied filters), data.definition, and data.source_releases. Amounts are USD; YoY fields are percent; for HELOCs the amount is credit available, not the drawn balance.

Behavior: read-only, no auth or API key, no PII, idempotent and safe to retry. The public endpoint https://mtgmon.com/mcp allows about 60 requests/min and 250 tool calls/day per client IP. Result shape is {data, meta}; meta carries available, as_of, source_scope, weighting, units, cache_status, caveats, and truncated. If meta.available is false the data is unavailable or the cache is still warming (retry after a few seconds); never report it as zero.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNoHMDA activity year, 2018 or later. Default: latest published Snapshot year (see data.selected_year).
stateNoTwo-letter USPS code of the property state, e.g. 'TX' (not the lender HQ). Empty (default) = nationwide.
lenderNoCanonical HMDA lender key: the exact `name` value from a search_lenders result, e.g. 'Rocket/Quicken' or 'United Wholesale Mortgage'. Legal names such as 'Rocket Mortgage, LLC' do not match and return meta.available=false. Default: all lenders.
loan_programNo'all' (default), 'conventional', 'fha', 'va', 'usda_rhs', or 'unknown'.all
loan_purposeNo'all' (default), 'purchase', 'home_improvement', 'refinance' (rate/term), 'cash_out_refinance', 'other', 'not_applicable', or 'unknown'.all
lien_positionNo'all' (default), 'first', 'subordinate', 'not_secured', 'not_applicable', or 'unknown'.all
occupancy_typeNo'all' (default), 'principal_residence', 'second_residence', 'investment_property', or 'unknown'.all
product_familyNo'heloc' (DEFAULT: open-end lines of credit that are not reverse mortgages), 'closed_end_mortgage' (ordinary first and second mortgages), 'reverse_mortgage', 'unclassified_or_exempt', or 'all' (every HMDA origination). Set this explicitly; the default is not the whole market.heloc
business_purposeNo'all' (default: consumer + business + exempt/unknown records), 'consumer', 'business', or 'exempt_unknown'.all
credit_structureNo'all' (default), 'open_end', 'closed_end', or 'exempt_unknown'. Usually leave 'all'; product_family already implies it.all
construction_methodNo'all' (default), 'site_built', 'manufactured', or 'unknown'.all
reverse_mortgage_statusNo'all' (default), 'reverse', 'not_reverse', or 'exempt_unknown'. Usually leave 'all'; product_family already implies it.all

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
metaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • addedInput schema / properties / business_purpose / description
      Added value: +"'all' (default: consumer + business + exempt/unknown records), 'consumer', 'business', or 'exempt_unknown'."
    • addedInput schema / properties / construction_method / description
      Added value: +"'all' (default), 'site_built', 'manufactured', or 'unknown'."
    • addedInput schema / properties / credit_structure / description
      Added value: +"'all' (default), 'open_end', 'closed_end', or 'exempt_unknown'. Usually leave 'all'; product_family already implies it."
    • addedInput schema / properties / lender / description
      Added value: +"Canonical HMDA lender key: the exact `name` value from a search_lenders result, e.g. 'Rocket/Quicken' or 'United Wholesale Mortgage'. Legal names such as 'Rocket Mortgage, LLC' do not match and return meta.available=false. Default: all lenders."
    • addedInput schema / properties / lien_position / description
      Added value: +"'all' (default), 'first', 'subordinate', 'not_secured', 'not_applicable', or 'unknown'."
    • addedInput schema / properties / loan_program / description
      Added value: +"'all' (default), 'conventional', 'fha', 'va', 'usda_rhs', or 'unknown'."
    • addedInput schema / properties / loan_purpose / description
      Added value: +"'all' (default), 'purchase', 'home_improvement', 'refinance' (rate/term), 'cash_out_refinance', 'other', 'not_applicable', or 'unknown'."
    • addedInput schema / properties / occupancy_type / description
      Added value: +"'all' (default), 'principal_residence', 'second_residence', 'investment_property', or 'unknown'."
    • addedInput schema / properties / product_family / description
      Added value: +"'heloc' (DEFAULT: open-end lines of credit that are not reverse mortgages), 'closed_end_mortgage' (ordinary first and second mortgages), 'reverse_mortgage', 'unclassified_or_exempt', or 'all' (every HMDA origination). Set this explicitly; the default is not the whole market."
    • addedInput schema / properties / reverse_mortgage_status / description
      Added value: +"'all' (default), 'reverse', 'not_reverse', or 'exempt_unknown'. Usually leave 'all'; product_family already implies it."
    • addedInput schema / properties / state / description
      Added value: +"Two-letter USPS code of the property state, e.g. 'TX' (not the lender HQ). Empty (default) = nationwide."
    • addedInput schema / properties / year / description
      Added value: +"HMDA activity year, 2018 or later. Default: latest published Snapshot year (see data.selected_year)."
  2. Added

TDQS

A5/5.0
Behavior5/5

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

Beyond the read-only and idempotent hints in annotations, the description adds significant behavioral detail: no auth or API key, no PII, rate limits (60 req/min, 250 calls/day), the exact result shape ({data, meta}), and semantics for meta.available including cache warming and retry advice. This far exceeds the annotation baseline.

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 well-structured with clear sections: summary, use cases, do-not-use cases, important caveats, return format, and behavior. Each sentence serves a purpose and the content is front-loaded with the primary function. Despite its length, it remains efficient given the tool's complexity.

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?

The description covers all necessary operational context: data source (FFIEC/CFPB HMDA Snapshot), time range (2018 onward), output fields and their units (USD, percentages), special HELOC semantics, rate limits, error handling (meta.available false), and retry behavior. The output schema is present, but the description clarifies field meanings and edge cases, making it fully complete for a caller.

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?

Although the schema already covers 100% of parameters with descriptions, the description adds critical context that the schema cannot convey, such as the default product_family being 'heloc', lender names needing to match search_lenders results exactly, and state meaning property state not lender HQ. This additional guidance is essential for correct usage.

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 clearly states the tool returns HMDA origination counts, dollar amounts, averages, and YoY growth for a product family, optionally filtered by state or lender. It also explicitly distinguishes it from siblings by listing what it is not for, such as lender rankings or GSE performance.

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 'Use for' and 'Do not use for' sections provide explicit when-to-use and when-not-to-use guidance, including references to sibling tools. The 'Important' section further clarifies the product_family default and the distinction between property state and lender headquarters, leaving no ambiguity about appropriate contexts.

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