Skip to main content
Glama

Usa Spending Trends

usa_spending_trends
Read-onlyIdempotent

"How has [agency] contract spending trended over the last N fiscal years?" / "is [agency] spending on X growing?" / "federal spending history for [topic]" — US FEDERAL contract/award spending over time from USAspending.gov, grouped by fiscal year, quarter, or month. Filter by keywords or by federal agency (DHS/Homeland Security, DOD/Defense, HHS, VA, DOE, NASA, State, Treasury). Returns the historical dollar amount per period for trend and budget-forecasting questions. Federal only — for state & county award data use gov_contracts_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupNoTime grouping: fiscal_year, quarter, or month (default fiscal_year)
agencyNoAwarding agency name. Use instead of, or alongside, keywords.
end_dateNoEnd date YYYY-MM-DD. Optional — defaults to today.
keywordsNoKeywords to track spending for (e.g., ["artificial intelligence"])
start_dateNoStart date YYYY-MM-DD. Optional — defaults to five years ago; the window actually used comes back under `period`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupYesTime grouping used (fiscal_year, quarter, or month)
data_pointsYesSpending data points over time

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changed
    • changedInput schema / properties / agency / description
      Previous value: -"Optional awarding agency name"New value: +"Awarding agency name. Use instead of, or alongside, keywords."
    • changedInput schema / properties / end_date / description
      Previous value: -"End date in YYYY-MM-DD format"New value: +"End date YYYY-MM-DD. Optional — defaults to today."
    • changedInput schema / properties / start_date / description
      Previous value: -"Start date in YYYY-MM-DD format"New value: +"Start date YYYY-MM-DD. Optional — defaults to five years ago; the window actually used comes back under `period`."
    • changedInput schema / required
      Previous value: -[
      -  "keywords",
      -  "start_date",
      -  "end_date"
      -]New value: +[]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data_points": {
      +      "description": "Spending data points over time",
      +      "items": {
      +        "properties": {
      +          "amount": {
      +            "description": "Aggregated spending amount for this period",
      +            "type": "number"
      +          },
      +          "fiscal_year": {
      +            "description": "Fiscal year for this data point",
      +            "type": "string"
      +          },
      +          "month": {
      +            "description": "Month if grouped by month",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "quarter": {
      +            "description": "Fiscal quarter if grouped by quarter",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "fiscal_year",
      +          "quarter",
      +          "month",
      +          "amount"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "group": {
      +      "description": "Time grouping used (fiscal_year, quarter, or month)",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "group",
      +    "data_points"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "end_date": "2024-12-31",
      +    "group": "fiscal_year",
      +    "keywords": [
      +      "artificial intelligence"
      +    ],
      +    "start_date": "2020-01-01"
      +  },
      +  {
      +    "agency": "Department of Energy",
      +    "end_date": "2024-12-31",
      +    "group": "quarter",
      +    "keywords": [
      +      "renewable energy"
      +    ],
      +    "start_date": "2023-01-01"
      +  }
      +]
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false. The description adds context beyond these: it specifies that data is grouped by fiscal year/quarter/month and that it returns historical dollar amounts per period. It also clarifies the federal scope. There is no contradiction with annotations, but it doesn't disclose potential limitations like data lag or aggregation details.

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?

The description is moderately sized but well-structured. It front-loads with natural-language example questions, then explains the tool's purpose, filters, grouping, and scope. All sentences contribute value, though the list of agencies adds some length. It is concise enough for an agent to parse quickly.

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?

The description covers the core dimensions: purpose, usage context, filters, time grouping, federal scope, and an alternative tool for non-federal data. With an output schema present, it doesn't need to explain return values. It does not explicitly distinguish from sibling tools like usa_spending_by_agency or usa_spending_by_category, but the emphasis on trends implies the difference.

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 coverage is 100%, so the baseline is 3. The description adds practical meaning by listing example federal agencies (DHS, DOD, HHS, VA, DOE, NASA, State, Treasury) and clarifying that keywords and agency can be used together or separately. It also conveys that start_date defaults to a five-year window, which supports schema semantics.

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's function: tracking US federal contract/award spending over time, grouped by fiscal year, quarter, or month. It uses specific verbs like 'trended', 'growing', and 'history' and identifies the resource (USAspending.gov). It distinguishes from sibling tools by noting 'Federal only' and pointing to gov_contracts_search for state/county data.

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 description provides explicit usage context with example questions and states it's for 'trend and budget-forecasting questions'. It gives a clear when-not-to-use directive: 'Federal only — for state & county award data use gov_contracts_search.' It also explains filter options (keywords or agency) and time grouping.

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.

TDQS

A3.8/5.0
Disambiguation2/5

ask_pipeworx, ask_pipeworx_beta, and ask_pipeworx_grounded are essentially the same router with different output modes, and ask_pipeworx_beta is currently identical to ask_pipeworx. There is also meaningful overlap between entity_profile, compare_entities, recent_changes, validate_claim, and the USAspending profile/search tools.

Naming Consistency3/5

All names are lower_snake_case with useful prefixes like ask_, polymarket_, and usa_, which helps grouping. However, the underlying convention is mixed: some are verb+object, some are noun phrases, and some are bare verbs, so there is no uniform verb_noun pattern.

Tool Count2/5

38 tools is well beyond the heavy range, and most of them are unrelated to USAspending: Polymarket betting, npm dependency checks, AI visibility, memory storage, and meta-tools. The actual USAspending-specific surface is only about seven tools, making the server feel bloated and unfocused.

Completeness3/5

The federal-contract cluster covers award search, recipient/incumbent profiles, expiring awards, and spending by agency/category/trend, which handles the main contracting questions. Missing award-detail retrieval, grants/assistance coverage, and open-solicitation lookup, which usa_expiring_awards explicitly punts to external samgov/govcon tools.