Skip to main content
Glama

usaspending-mcp-server

Get Agency Overview

usaspending_get_agency
Read-onlyIdempotent

Fetch an agency's fiscal-year overview including mission, budgetary resources, obligation and outlay totals (for the most recent fiscal year), sub-agency count, and DEF codes for disaster/emergency funding. Also returns a paginated sub-agency breakdown with obligation and transaction counts. Accepts either a 3-digit toptier_code (e.g., 097 for DoD, 012 for Agriculture) or an agency_slug (e.g., department-of-defense) — both appear in usaspending_list_agencies results and award search results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoSub-agency breakdown page (1-based, 10 per page). Use with sub_agency_page_metadata.has_next to page through the full list.
agency_slugNoURL-friendly agency slug (e.g., department-of-defense) — from usaspending_list_agencies or award search results. Use either toptier_code or agency_slug, not both.
toptier_codeNo3-digit toptier agency code (e.g., 097, 012) — from usaspending_list_agencies. Use either toptier_code or agency_slug, not both.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoAgency full name
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when the sub-agency breakdown is truncated — how to page for the rest. Absent when the last page is shown.
missionNoAgency mission statement
websiteNoAgency website URL
agency_idNoInternal agency ID
def_codesNoDisaster/Emergency Funding (DEF) codes applicable to this agency
fiscal_yearNoFiscal year the budgetary totals below reflect (most recent available)
abbreviationNoAgency abbreviation
sub_agenciesNoSub-agency breakdown within this toptier agency (one page)
toptier_codeNo3-digit toptier agency code
outlay_amountNoTotal outlays in USD for the fiscal year
sub_agency_pageNoCurrent sub-agency page returned
obligated_amountNoTotal amount obligated in USD for the fiscal year
sub_agency_totalNoTotal sub-agencies across all pages (when available)
subtier_agency_countNoNumber of sub-agencies within this toptier agency
has_more_sub_agenciesNoWhether more sub-agency pages are available
sub_agency_page_metadataNoPagination metadata for the sub-agency breakdown
budgetary_resources_amountNoTotal budgetary resources in USD for the fiscal year

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already convey readOnlyHint=true and idempotentHint=true, so the agent knows this is safe. The description adds behavioral context by specifying that it returns a paginated breakdown, includes DEF codes for disaster/emergency funding, and provides example codes/slugs. It does not contradict annotations and adds helpful detail about the data scope without over-explaining.

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 two sentences but packs substantial detail: the first sentence lists the core data returned, the second explains the identifier options and sources. It is front-loaded with the main purpose and uses examples efficiently. It is appropriately sized for a moderately complex tool, though it could be slightly trimmed without loss.

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?

Given that an output schema exists, return values are already specified, so the description need not restate them. It covers how to obtain the identifiers (from usaspending_list_agencies or award results), the mutual exclusivity rule, and the pagination behavior via sub_agency_page_metadata. The description is sufficient for an agent to call this tool correctly without additional introspection.

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% (every parameter has a description), but the tool description adds crucial semantics beyond the schema: it explains that toptier_code and agency_slug are mutually exclusive alternatives and provides concrete examples (097, 012; department-of-defense). It also clarifies that the page parameter is for sub-agency pagination. This extra guidance helps the agent select and format parameters correctly.

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 uses a specific verb ('Fetch') and a precise resource ('an agency's fiscal-year overview') and enumerates the returned data (mission, budgetary resources, obligation/outlay totals, DEF codes, sub-agency breakdown). It clearly differentiates itself from sibling tools like usaspending_list_agencies, which lists agencies, while this fetches details for one agency.

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 states that it accepts either toptier_code or agency_slug and explicitly says 'both appear in usaspending_list_agencies results and award search results,' guiding the agent on where to obtain inputs. It also instructs 'Use either toptier_code or agency_slug, not both,' which is a clear constraint. However, it does not explicitly describe scenarios where a sibling tool (e.g., usaspending_get_federal_account) would be more appropriate, but the purpose is clear enough that this is minimal.

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.