Skip to main content
Glama
lzinga

US Government Open Data MCP

by lzinga

cfpb_complaint_trends

Read-onlyIdempotent

Analyze CFPB complaint trends over time by month, quarter, or year. Filter by product, issue, company, state, or date range to identify patterns and drill into sub-categories.

Instructions

Get complaint trends over time using the CFPB Trends API. Uses dedicated /trends endpoint with lens-based aggregation. REQUIRED: trend_interval ('month', 'quarter', or 'year') — the API rejects requests without it. Lens options: 'overview' (total counts), 'product' (by product), 'issue' (by issue), 'tags' (by tag). Sub-lens allows drilling into sub-categories within the lens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lensNoTrend lens (default: overview)
focusNoFocus charts on a specific product or company name
issueNoIssue type filter
stateNoTwo-letter state code: 'CA', 'TX', 'NY'
companyNoCompany name: 'Wells Fargo', 'Equifax', etc.
productNoFinancial product: 'Mortgage', 'Debt collection', etc.
sub_lensNoSub-lens drill-down
sub_lens_depthNoTop N sub-aggregations to return (default 10)
trend_intervalYesTime bucket size for trend aggregation: 'month', 'quarter', or 'year'
date_received_maxNoEnd date (YYYY-MM-DD)
date_received_minNoStart date (YYYY-MM-DD)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2026.4.11
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv2026.3.9

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds behavioral context by stating that the API rejects requests without trend_interval, explaining the required parameter's consequence. It also clarifies lens options and sub-lens drilling, which are behavioral aspects of the aggregation model. It does not mention rate limits or response format, but the annotations lower the bar and the added context is valuable.

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 five sentences with zero fluff. It front-loads the primary purpose, then covers the endpoint, required parameter, lens options, and sub-lens in a logical order. Each sentence earns its place, and there is no repetition of schema information. The structure is tight and scannable.

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?

For a tool with 11 parameters and no output schema, the description covers the core aggregation concepts (lens, sub-lens, required interval) and the API's rejection behavior. However, it does not describe the shape of the response (e.g., time series of counts) or the relationship between specific lens and sub_lens values (e.g., which sub_lens are valid for each lens). This is a notable gap, but the schema covers parameter basics and the description provides enough context for an agent to make a reasonable first call.

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 description coverage is 100%, so the baseline is 3. The description adds semantic meaning beyond the schema by explaining lens values (e.g., 'overview' for total counts, 'product' for by product) and sub-lens drill-downs, which the schema only labels generically. It also highlights trend_interval as REQUIRED and explains the API's rejection behavior, which is not in the schema. This enhances the agent's understanding of how to combine parameters.

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 opens with 'Get complaint trends over time using the CFPB Trends API', clearly stating the verb, resource, and domain. It further distinguishes from siblings by emphasizing the dedicated /trends endpoint and lens-based aggregation, which sets it apart from cfpb_complaint_aggregations, cfpb_complaint_detail, and cfpb_state_complaints. The purpose is unambiguous and specific.

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?

The description implies usage for time-based trend analysis and explains the lens and sub-lens concepts, but it does not explicitly contrast with sibling tools or state when not to use this tool. There is no explicit 'use X instead' guidance, but the focus on trends over time provides a clear contextual boundary. This is adequate but not fully explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools