Skip to main content
Glama

mtgmon Mortgage Analytics

Compare HMDA lenders

compare_lenders
Read-onlyIdempotent

Side-by-side HMDA comparison of two lender groups: yearly volume, loans, rank, and market share for both; loan type / purpose / occupancy mix; and the top states with each lender's volume and the volume multiple between them.

Requires canonical keys for both lenders: call search_lenders and pass each result's exact name. For a single lender use get_lender_profile.

Returns data.lenders, data.current_year, data.previous_year, data.yearly (both lenders per HMDA year), data.loan_type_mix, data.loan_purpose_mix, data.occupancy_mix, and data.top_state_comparison (top_n rows with lender_1_volume, lender_2_volume, multiple). Volumes are USD; shares are percent.

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, never report it as zero: retry after a few seconds only when meta.cache_status is 'miss' (warming); otherwise report the data as unavailable.

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": {
      "lender_a": "<lender_a>",
      "lender_b": "<lender_b>"
    },
    "name": "compare_lenders"
  }
}

Input Schema

NameRequiredDescriptionDefault
top_nNoMaximum states in top_state_comparison, 1-50 (default 10).
lender_aYesFirst lender. 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.
lender_bYesSecond lender, different from lender_a. 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.

Output Schema

NameRequiredDescriptionDefault
dataNo
metaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / $defs / ResultMeta / properties / cache_status / description
      Added value: +"Server cache state: hit; stale (older than its TTL, still served); stale-refresh; miss (warming, retry after a few seconds); failed or required-miss (not available now, a retry soon will not help); none; unknown."
  2. Changed3 schema fields changed
    • addedInput schema / properties / lender_a / description
      Added value: +"First lender. 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."
    • addedInput schema / properties / lender_b / description
      Added value: +"Second lender, different from lender_a. 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."
    • addedInput schema / properties / top_n / description
      Added value: +"Maximum states in top_state_comparison, 1-50 (default 10)."
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations, which only declare read-only/idempotent/non-destructive. It discloses no auth or API key, no PII, rate limits (~60 req/min, 250 tool calls/day per client IP), the {data, meta} envelope with its meta fields, and a non-obvious failure mode: meta.available=false must never be reported as zero, with a retry rule tied to cache_status='miss'. That is exactly the behavioral context annotations cannot carry.

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 what is compared, then prerequisites, then return shape, then behavior and limits - a sensible ordering. It runs long and the rate-limit/retry paragraph could be tightened, but nearly every sentence carries operational value rather than filler.

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?

Complete for a two-entity comparison tool: it covers input prerequisites, the full output shape, units (USD volumes, percent shares), truncation, and the unavailable/retry edge case. With rich annotations and an output schema already present, nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already documents top_n's 1-50 range, both lender keys, and the warning that legal names return meta.available=false. The description restates the canonical-key requirement and the search_lenders workflow but adds little field-level meaning beyond the schema, so the baseline 3 applies.

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 specific verb and resource ('side-by-side HMDA comparison of two lender groups') and enumerates exactly what is compared: yearly volume, loans, rank, market share, loan type/purpose/occupancy mix, and top states with the volume multiple. It also distinguishes itself from get_lender_profile for the single-lender case, so an agent can route without opening a schema.

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?

Gives explicit prerequisites ('Requires canonical keys... call search_lenders and pass each result's exact `name`') and names the alternative for a different need ('For a single lender use get_lender_profile'). The when-to-use condition is clear from the comparison scope, and the prerequisite chain is spelled out rather than inferred.

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