Skip to main content
Glama

usaspending-mcp-server

Spending by Category

usaspending_spending_by_category
Read-onlyIdempotent

Aggregate federal spending grouped by a specific dimension: NAICS industry code, PSC product/service code, awarding agency, funding agency, CFDA assistance program, or recipient. Returns top items with obligation amounts — useful for trend and breakdown analysis. Chain NAICS codes into usaspending_search_awards filters or usaspending_autocomplete_filters lookups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (1-based)
limitNoMaximum items to return (1–100)
filtersNoOptional filters to scope the aggregation
categoryYesBreakdown dimension: naics (industry), psc (product/service code), awarding_agency, awarding_subagency, funding_agency, funding_subagency, cfda (assistance programs), recipient_duns, or recipient_parent_duns

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoCurrent page returned
errorNoPresent when the call failed. Absent on success.
noticeNoRecovery hint when results are empty — suggests how to broaden filters. Absent when results are present.
resultsNoTop items in this category by obligation amount
categoryNoBreakdown dimension used
has_nextNoWhether there are more pages
totalCountNoTotal number of items in this category (when available)
page_metadataNoPagination metadata
applied_keywordsNoKeyword filters applied (comma-separated)
applied_agency_nameNoAwarding agency name filter applied
applied_naics_codesNoNAICS code filters applied (comma-separated)
applied_time_period_endNoEnd date filter applied (YYYY-MM-DD)
applied_time_period_startNoStart date filter applied (YYYY-MM-DD)

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds that it returns 'top items with obligation amounts', which informs the agent of the output nature beyond just the schema. It does not contradict annotations.

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?

Three sentences with zero fluff. The primary purpose is stated first, followed by a usage hint, and a practical chaining example. Every sentence earns its place.

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 tool has an output schema and rich param schema. The description explains the return type (top items with obligation amounts) and gives a chaining workflow. It doesn't mention edge cases like empty results or specific filters, but these are covered by schema and are not critical for basic invocation.

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%, so all parameters are documented in the schema. The description does not elaborate on parameter formats or constraints beyond what the schema provides. The only added value is the chaining hint, but that is not parameter-specific. 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?

The description states a specific verb ('Aggregate'), a resource ('federal spending'), and the grouping dimensions explicitly (NAICS, PSC, agency, CFDA, recipient). It clearly distinguishes this from sibling tools like search or time-series tools by focusing on category breakdowns.

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?

It states it is 'useful for trend and breakdown analysis' and gives a concrete chaining example (NAICS codes into usaspending_search_awards or autocomplete_filters). It doesn't explicitly contrast with spending_over_time or by_geography, but the category focus and chaining hint make when-to-use clear enough.

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

A4.3/5.0
Disambiguation5/5

Each tool targets a distinct entity or operation: agency, award, subaward, transaction, federal account, recipient, and various spending breakdowns. Even similar-sounding tools like get_award_federal_accounts vs get_federal_account are clearly separated by their core purpose (award funding sources vs account budget details).

Naming Consistency4/5

Almost all tools follow the usaspending_<verb>_<object> pattern (e.g., get_award, search_recipients). The spending_* series breaks the verb-noun convention but is internally consistent. Minor deviation lowers the score slightly.

Tool Count4/5

At 18 tools, this is on the higher end of reasonable but each tool maps to a distinct USAspending API endpoint and covers a different aspect of federal spending. The count is justified by the breadth of the domain, though it feels slightly heavy.

Completeness5/5

The surface covers award search/detail, agency navigation, federal accounts, recipients, subawards, transactions, IDVs, and multiple spending aggregations (category, geography, time, disaster). No obvious dead ends: all ID-producing tools have corresponding lookup tools, and common workflows like award→federal account→breakdown are fully supported.