usaspending-mcp-server

v0.4.2 pre-1.0

Access US federal award, recipient, agency, and spending analytics data from USAspending.gov via MCP. STDIO or Streamable HTTP.

usaspending.caseyjhand.com/mcp
claude mcp add --transport http usaspending-mcp-server https://usaspending.caseyjhand.com/mcp
codex mcp add usaspending-mcp-server --url https://usaspending.caseyjhand.com/mcp
{
  "mcpServers": {
    "usaspending-mcp-server": {
      "url": "https://usaspending.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http usaspending-mcp-server https://usaspending.caseyjhand.com/mcp
{
  "mcpServers": {
    "usaspending-mcp-server": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://usaspending.caseyjhand.com/mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "usaspending-mcp-server": {
      "type": "http",
      "url": "https://usaspending.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://usaspending.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2026-07-28" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2026-07-28","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

18

usaspending_list_agencies

List all top-tier federal agencies with toptier codes, agency slugs, budget authority amounts, and obligation totals for the current fiscal year. Use this as the entry point for agency navigation — toptier codes and agency slugs are required inputs for usaspending_get_agency and agency-based filters on spending analysis tools.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_list_agencies",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "sort": {
      "default": "agency_name",
      "description": "Sort field: agency_name (alphabetical), budget_authority_amount, obligated_amount, or outlay_amount",
      "type": "string",
      "enum": [
        "agency_name",
        "budget_authority_amount",
        "obligated_amount",
        "outlay_amount"
      ]
    },
    "order": {
      "default": "asc",
      "description": "Sort direction: asc or desc",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    }
  },
  "required": [
    "sort",
    "order"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_autocomplete_filters

open-world

Look up valid code values for filter fields by searching free-text descriptions. Use the type parameter to select the lookup table: naics (NAICS industry codes), psc (product/service codes), cfda (CFDA/Assistance Listing program numbers), awarding_agency (agency names and IDs), or recipient (recipient names with UEI/DUNS). Call this before filtering awards when you know a description but not the exact code. Returns matching codes and names for use in other tool filters.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_autocomplete_filters",
    "arguments": {
      "type": "<type>",
      "search_text": "<search_text>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "naics",
        "psc",
        "cfda",
        "awarding_agency",
        "recipient"
      ],
      "description": "Lookup table to search: naics (industry codes), psc (product/service codes), cfda (assistance programs), awarding_agency (agency names), recipient (recipient names)"
    },
    "search_text": {
      "type": "string",
      "minLength": 1,
      "description": "Free-text search string — use a description, keyword, or partial code to find matches"
    },
    "limit": {
      "default": 10,
      "description": "Maximum number of results to return (1–500), enforced client-side. The recipient lookup unions three upstream match buckets (name, UEI, DUNS) and can return up to 3x this value, so its results are capped to this limit before returning — the cap keeps them in bucket order, so name matches fill the page first and identifier matches appear only in whatever room is left. To resolve a specific UEI or DUNS, pass the identifier itself as search_text. naics/psc/cfda/awarding_agency honor this limit exactly.",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    }
  },
  "required": [
    "type",
    "search_text",
    "limit"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_search_awards

open-world

Search federal awards by keyword, recipient, agency, award type, NAICS code, location, or date range. Returns ranked award summaries including recipient names, amounts, awarding agencies, and generated award IDs for use with usaspending_get_award. Award types: A/B/C/D = contracts, 02/03/04/05 = grants, 06/10 = direct payments, 07/08 = loans, IDV_A/IDV_B/IDV_C/IDV_D/IDV_E = IDVs. Dates must be ISO 8601 (YYYY-MM-DD). Earliest data: 2007-10-01 via search API. DoD contracts have a 90-day publication lag.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_search_awards",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "keyword": {
      "description": "Full-text search across award descriptions, recipient names, and place names",
      "type": "string"
    },
    "award_type_codes": {
      "default": [
        "A",
        "B",
        "C",
        "D"
      ],
      "description": "Filter by award type codes. All codes must belong to a single group: A/B/C/D (contracts), 02/03/04/05 (grants), 06/10 (direct payments), 07/08 (loans), IDV_A–IDV_E (IDVs). Defaults to contracts. Mixing groups across categories causes a 422 error.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "agency_name": {
      "description": "Filter to a specific awarding agency by name (e.g., \"Department of Defense\"). Use usaspending_autocomplete_filters type=awarding_agency to find exact names.",
      "type": "string"
    },
    "recipient_name": {
      "description": "Filter by recipient name (partial match); maps to this endpoint's recipient_search_text. This endpoint has no recipient_id filter — use usaspending_search_recipients to look up a recipient by name.",
      "type": "string"
    },
    "naics_codes": {
      "description": "Filter by NAICS industry codes (e.g., [\"541512\"]). Use usaspending_autocomplete_filters type=naics to look up codes.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "time_period": {
      "description": "Filter awards by date range (action date)",
      "type": "object",
      "properties": {
        "start_date": {
          "type": "string",
          "description": "Start date in ISO 8601 format (YYYY-MM-DD); earliest valid: 2007-10-01"
        },
        "end_date": {
          "type": "string",
          "description": "End date in ISO 8601 format (YYYY-MM-DD)"
        }
      },
      "required": [
        "start_date",
        "end_date"
      ],
      "additionalProperties": false
    },
    "location_filter": {
      "description": "Filter by place of performance location. Uses FIPS codes and 2-letter state abbreviations, not place names — use a geocoding server to resolve names to codes first.",
      "type": "object",
      "properties": {
        "country": {
          "description": "ISO 3166-1 alpha-3 country code (e.g., USA)",
          "type": "string"
        },
        "state": {
          "description": "Two-letter US state abbreviation (e.g., CA)",
          "type": "string"
        },
        "county": {
          "description": "FIPS county code (e.g., 06037 for Los Angeles County)",
          "type": "string"
        },
        "city": {
          "description": "City name",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "sort": {
      "default": "Award Amount",
      "description": "Sort field for results",
      "type": "string",
      "enum": [
        "Award Amount",
        "Total Outlays",
        "Start Date",
        "End Date",
        "Recipient Name",
        "Awarding Agency"
      ]
    },
    "order": {
      "default": "desc",
      "description": "Sort direction",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "limit": {
      "default": 10,
      "description": "Maximum results per page (1–100)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page": {
      "default": 1,
      "description": "Page number (1-based). Page-number pagination caps at a 50,000-result offset (page × limit), but the keyset cursor below is only returned while the offset stays under 10,000 — capture the cursor pair before paging past that, or the only way forward is page numbers.",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "last_record_sort_value": {
      "description": "Keyset-pagination cursor: the last_record_sort_value from a prior response page_metadata. Provide together with last_record_unique_id to fetch the next page past the 50,000-result page-number cap. The upstream stops emitting the pair once page × limit reaches 10,000, so take it from a page below that offset. When both cursor fields are supplied, page is ignored.",
      "type": "string"
    },
    "last_record_unique_id": {
      "description": "Keyset-pagination cursor: the last_record_unique_id from a prior response page_metadata. Provide together with last_record_sort_value.",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "filters": {
      "description": "Optional analytics-style filter object mirroring the shape the spending analytics tools accept, for reusing one filter set across tools. When both this object and the equivalent top-level flat filters are given, this object wins per-field. recipient_id is intentionally not accepted — this endpoint silently ignores it; filter by recipient via recipient_name.",
      "type": "object",
      "properties": {
        "keywords": {
          "description": "Full-text search terms across award descriptions, recipient names, and places",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "award_type_codes": {
          "description": "Award type codes; all must belong to one group (A/B/C/D, 02/03/04/05, 06/10, 07/08, IDV_A–IDV_E)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "agency_name": {
          "description": "Awarding agency name (toptier), e.g., \"Department of Defense\"",
          "type": "string"
        },
        "recipient_name": {
          "description": "Recipient name search (partial match); maps to recipient_search_text. Use instead of recipient_id, which this endpoint ignores.",
          "type": "string"
        },
        "naics_codes": {
          "description": "NAICS industry codes to require, e.g., [\"541512\"]",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "time_period_start": {
          "description": "Start date (YYYY-MM-DD); earliest valid 2007-10-01. Requires time_period_end.",
          "type": "string"
        },
        "time_period_end": {
          "description": "End date (YYYY-MM-DD). Requires time_period_start.",
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "award_type_codes",
    "sort",
    "order",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_get_award

Fetch full details of a federal award by its generated unique award ID. Returns contract or assistance award data including recipient info, agency hierarchy, period of performance, place of performance, funding account linkages (account_obligations_by_defc), parent IDV information, and subaward count. Use generated_internal_id values from usaspending_search_awards as input. Recipient hashes can be passed to usaspending_get_recipient; NAICS codes can be used in usaspending_search_awards filters. For IDV-category awards (category="idv"), use usaspending_get_idv_awards to list the child contracts and task/delivery orders placed under them.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_get_award",
    "arguments": {
      "award_id": "<award_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "award_id": {
      "type": "string",
      "minLength": 1,
      "description": "Generated unique award ID (e.g., CONT_AWD_FA862118F6251_9700_FA862115D6276_9700) — use generated_internal_id from usaspending_search_awards"
    }
  },
  "required": [
    "award_id"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_get_award_transactions

List individual transactions (contract modifications, grant amendments) on a federal award. Each transaction represents a change event — obligation modifications, performance period extensions, scope changes, etc. Use this to trace the spending history and obligation changes over the life of an award. Award IDs come from usaspending_search_awards (generated_internal_id field).

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_get_award_transactions",
    "arguments": {
      "award_id": "<award_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "award_id": {
      "type": "string",
      "minLength": 1,
      "description": "Generated unique award ID (generated_internal_id from usaspending_search_awards)"
    },
    "sort": {
      "default": "action_date",
      "description": "Sort field for transactions",
      "type": "string",
      "enum": [
        "action_date",
        "federal_action_obligation",
        "modification_number"
      ]
    },
    "order": {
      "default": "desc",
      "description": "Sort direction",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "limit": {
      "default": 10,
      "description": "Maximum transactions per page (1–100)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page": {
      "default": 1,
      "description": "Page number (1-based)",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "award_id",
    "sort",
    "order",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_get_award_subawards

List subaward contracts or grants under a prime federal award. Reveals the sub-contractor or sub-grantee layer — the organizations that actually perform the work. Each row shows the subaward number, amount, description, action date, and recipient. Check subaward_count on usaspending_get_award first to confirm subawards exist before calling this tool.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_get_award_subawards",
    "arguments": {
      "award_id": "<award_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "award_id": {
      "type": "string",
      "minLength": 1,
      "description": "Generated unique award ID (generated_internal_id from usaspending_search_awards)"
    },
    "sort": {
      "default": "action_date",
      "description": "Sort field for subawards",
      "type": "string",
      "enum": [
        "subaward_number",
        "description",
        "action_date",
        "amount",
        "recipient_name"
      ]
    },
    "order": {
      "default": "desc",
      "description": "Sort direction",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "limit": {
      "default": 10,
      "description": "Maximum subawards per page (1–100)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page": {
      "default": 1,
      "description": "Page number (1-based)",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "award_id",
    "sort",
    "order",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_get_award_federal_accounts

List the Treasury federal accounts that funded an award, with the amount obligated from each and the funding agency behind it. This is the award → appropriation link: each row returns federal_account (AGENCY-MAIN format, e.g. 080-0120) to chain into usaspending_get_federal_account for the account budget detail. The award_id must be a generated_unique_award_id — from usaspending_search_awards (generated_internal_id field) or usaspending_get_award. Distinct from usaspending_get_award account_obligations_by_defc, which breaks funding down by Disaster/Emergency Funding code rather than by account. An award_id that does not exist returns an empty list rather than an error.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_get_award_federal_accounts",
    "arguments": {
      "award_id": "<award_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "award_id": {
      "type": "string",
      "minLength": 1,
      "description": "Award generated_unique_award_id (e.g., CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-) — use generated_internal_id from usaspending_search_awards or generated_unique_award_id from usaspending_get_award"
    },
    "limit": {
      "default": 10,
      "description": "Maximum results per page (1–100)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page": {
      "default": 1,
      "description": "Page number (1-based)",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "award_id",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_get_idv_awards

List child contracts and task/delivery orders placed under an IDV (Indefinite Delivery Vehicle) award. Each row includes the generated_unique_award_id to chain into usaspending_get_award for full detail. The award_id must be the generated_unique_award_id of the parent IDV — obtainable from usaspending_search_awards (generated_internal_id field) or from usaspending_get_award. IDV category awards returned by usaspending_get_award have child orders accessible via this tool.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_get_idv_awards",
    "arguments": {
      "award_id": "<award_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "award_id": {
      "type": "string",
      "minLength": 1,
      "description": "Parent IDV generated_unique_award_id (e.g., CONT_IDV_NNK14MA74C_8000) — use generated_internal_id from usaspending_search_awards or generated_unique_award_id from usaspending_get_award"
    },
    "type": {
      "default": "child_awards",
      "description": "Type of child awards to list: child_awards = task/delivery orders, child_idvs = sub-IDVs, grandchild_awards = orders under sub-IDVs",
      "type": "string",
      "enum": [
        "child_awards",
        "child_idvs",
        "grandchild_awards"
      ]
    },
    "sort": {
      "default": "obligated_amount",
      "description": "Field to sort child awards by (e.g., obligated_amount, period_of_performance_start_date)",
      "type": "string"
    },
    "order": {
      "default": "desc",
      "description": "Sort direction",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "limit": {
      "default": 10,
      "description": "Maximum results per page (1–100)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page": {
      "default": 1,
      "description": "Page number (1-based)",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "award_id",
    "type",
    "sort",
    "order",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_search_recipients

open-world

Search for organizations or individuals receiving federal funds by name, UEI (Unique Entity Identifier), or DUNS. Returns recipient hash IDs, UEI/DUNS identifiers, total award amounts, and hierarchy level. Results are paginated — use page to retrieve matches beyond the first page; page_metadata.total reports the full match count. Recipient hash IDs from this tool can be passed to usaspending_get_recipient for full profiles. Recipient level: P = parent organization, C = child entity, R = standalone.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_search_recipients",
    "arguments": {
      "keyword": "<keyword>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "keyword": {
      "type": "string",
      "minLength": 1,
      "description": "Name, UEI, DUNS, or keyword to search for — partial matches are supported"
    },
    "award_type": {
      "description": "Filter by award type category to scope the total amounts returned",
      "type": "string",
      "enum": [
        "contracts",
        "grants",
        "direct_payments",
        "loans",
        "other_financial_assistance"
      ]
    },
    "limit": {
      "default": 10,
      "description": "Maximum results per page (1–100)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page": {
      "default": 1,
      "description": "Page number (1-based) — request the next page to retrieve matches beyond the first",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "keyword",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_get_recipient

Fetch a recipient's full profile including address, business type codes, parent organization, alternate names, and total transaction and loan amounts. Recipient IDs are UUID hashes with a level suffix (-P parent, -C child, -R standalone) from usaspending_search_recipients or usaspending_get_award. Optionally scope the totals to a specific fiscal year and award type. UEI and DUNS values can be used to cross-reference with SAM.gov and SEC EDGAR.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_get_recipient",
    "arguments": {
      "recipient_id": "<recipient_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "recipient_id": {
      "type": "string",
      "minLength": 1,
      "description": "Recipient hash ID (UUID with level suffix, e.g., b97d19b0-833c-8d8f-3a2c-157d04ea55ef-P) — from usaspending_search_recipients or usaspending_get_award"
    },
    "fiscal_year": {
      "description": "Fiscal year to scope award totals (e.g., 2024)",
      "type": "integer",
      "minimum": 2001,
      "maximum": 2030
    },
    "award_type": {
      "description": "Award type category to scope award totals",
      "type": "string",
      "enum": [
        "contracts",
        "grants",
        "direct_payments",
        "loans",
        "other_financial_assistance"
      ]
    }
  },
  "required": [
    "recipient_id"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_get_agency

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.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_get_agency",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "toptier_code": {
      "description": "3-digit toptier agency code (e.g., 097, 012) — from usaspending_list_agencies. Use either toptier_code or agency_slug, not both.",
      "type": "string"
    },
    "agency_slug": {
      "description": "URL-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.",
      "type": "string"
    },
    "page": {
      "default": 1,
      "description": "Sub-agency breakdown page (1-based, 10 per page). Use with sub_agency_page_metadata.has_next to page through the full list.",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "page"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_spending_by_geography

open-world

Aggregate federal spending by state, county, or congressional district. Useful for per-capita analysis, regional comparisons, and mapping federal investment patterns. Geographic filters accept FIPS codes and 2-letter state abbreviations — NOT place names. Resolve place names to FIPS codes using a geocoding server (Census or OpenStreetMap) before applying location filters. Chain per-capita results with Census population data for meaningful comparisons.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_spending_by_geography",
    "arguments": {
      "scope": "<scope>",
      "geo_layer": "<geo_layer>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "scope": {
      "type": "string",
      "enum": [
        "place_of_performance",
        "recipient_location"
      ],
      "description": "Which location to aggregate by: place_of_performance (where work is done) or recipient_location (where the recipient is based)"
    },
    "geo_layer": {
      "type": "string",
      "enum": [
        "state",
        "county",
        "district"
      ],
      "description": "Geographic granularity: state (50 states), county (county-level), or district (congressional district)"
    },
    "filters": {
      "description": "Optional filters to scope the spending aggregation",
      "type": "object",
      "properties": {
        "keywords": {
          "description": "Full-text keyword filter (e.g., [\"cybersecurity\", \"cloud\"])",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "award_type_codes": {
          "description": "Award type codes: A/B/C/D (contracts), IDV_A–IDV_E (IDVs), 02–05 (grants), 06/10 (direct payments), 07/08 (loans), 09/11 (insurance and other assistance), -1 (unspecified). Groups may be mixed here. Omit to aggregate every type.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "agency_name": {
          "description": "Awarding agency name filter",
          "type": "string"
        },
        "recipient_id": {
          "description": "Exact recipient hash ID to filter awards",
          "type": "string"
        },
        "naics_codes": {
          "description": "NAICS industry codes to include",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "time_period_start": {
          "description": "Start of time period in ISO 8601 format (YYYY-MM-DD)",
          "type": "string"
        },
        "time_period_end": {
          "description": "End of time period in ISO 8601 format (YYYY-MM-DD)",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "limit": {
      "default": 50,
      "description": "Maximum geographic areas to return, ranked by aggregated_amount descending (1–500). The upstream endpoint is not paginated — it returns every matching area in one response — so this caps client-side. A nationwide county query matches over 3,000 areas.",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "subawards": {
      "default": false,
      "description": "Include subaward data instead of prime award data",
      "type": "boolean"
    }
  },
  "required": [
    "scope",
    "geo_layer",
    "limit",
    "subawards"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_spending_by_category

open-world

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.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_spending_by_category",
    "arguments": {
      "category": "<category>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "category": {
      "type": "string",
      "enum": [
        "naics",
        "psc",
        "awarding_agency",
        "awarding_subagency",
        "funding_agency",
        "funding_subagency",
        "cfda",
        "recipient_duns",
        "recipient_parent_duns"
      ],
      "description": "Breakdown dimension: naics (industry), psc (product/service code), awarding_agency, awarding_subagency, funding_agency, funding_subagency, cfda (assistance programs), recipient_duns, or recipient_parent_duns"
    },
    "filters": {
      "description": "Optional filters to scope the aggregation",
      "type": "object",
      "properties": {
        "keywords": {
          "description": "Full-text keyword filters",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "award_type_codes": {
          "description": "Award type code filters (A/B/C/D, 02–05, etc.)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "agency_name": {
          "description": "Awarding agency name filter",
          "type": "string"
        },
        "recipient_id": {
          "description": "Exact recipient hash ID filter",
          "type": "string"
        },
        "naics_codes": {
          "description": "NAICS code filters",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "time_period_start": {
          "description": "Start date (YYYY-MM-DD)",
          "type": "string"
        },
        "time_period_end": {
          "description": "End date (YYYY-MM-DD)",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "limit": {
      "default": 10,
      "description": "Maximum items to return (1–100)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page": {
      "default": 1,
      "description": "Page number (1-based)",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "category",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_spending_over_time

open-world

Fetch aggregated federal obligation amounts grouped by fiscal year, fiscal quarter, or fiscal month. All grouping is relative to the US government fiscal year (Oct–Sep), so fiscal month 1 is October, not January. Filter by award type, agency, recipient, keyword, or NAICS code to trace spending trends in a specific area. Returns per-period totals and optional breakdowns by award category (contracts, grants, direct payments, IDVs, loans, other).

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_spending_over_time",
    "arguments": {
      "group": "<group>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "group": {
      "type": "string",
      "enum": [
        "fiscal_year",
        "quarter",
        "month"
      ],
      "description": "Time grouping: fiscal_year (annual US govt FY: Oct–Sep), quarter (fiscal quarter), or month (fiscal month — an ordinal within the fiscal year, where 1 = October)"
    },
    "filters": {
      "description": "Filters to scope the time-series aggregation. Defaults to contract awards when omitted.",
      "type": "object",
      "properties": {
        "keywords": {
          "description": "Full-text keyword filters",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "award_type_codes": {
          "description": "Award type code filters (A/B/C/D, 02–05, etc.). All codes must belong to a single group. When omitted, defaults to contracts (A, B, C, D).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "agency_name": {
          "description": "Awarding agency name filter",
          "type": "string"
        },
        "recipient_id": {
          "description": "Exact recipient hash ID filter",
          "type": "string"
        },
        "naics_codes": {
          "description": "NAICS code filters",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "time_period_start": {
          "description": "Start of the time window (YYYY-MM-DD)",
          "type": "string"
        },
        "time_period_end": {
          "description": "End of the time window (YYYY-MM-DD)",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "subawards": {
      "default": false,
      "description": "Aggregate subaward data instead of prime award data",
      "type": "boolean"
    }
  },
  "required": [
    "group",
    "subawards"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_disaster_spending

open-world

Fetch disaster and emergency supplemental spending (COVID-19, hurricanes, infrastructure law, etc.) broken down by agency, CFDA assistance program, recipient, or geography. Use the dimension parameter to select the breakdown axis: overview (top-level totals), agency, cfda, recipient, or geography. Filter by DEF codes (Disaster/Emergency Funding codes) to isolate a specific emergency appropriation. DEF codes appear in usaspending_get_award account_obligations_by_defc and usaspending_get_agency def_codes fields.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_disaster_spending",
    "arguments": {
      "dimension": "<dimension>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "dimension": {
      "type": "string",
      "enum": [
        "overview",
        "agency",
        "cfda",
        "recipient",
        "geography"
      ],
      "description": "Breakdown axis: overview (top-level totals and DEF code funding), agency (by awarding agency), cfda (by assistance program), recipient (by recipient), geography (by state/county)"
    },
    "spending_type": {
      "default": "award",
      "description": "Data type for the agency and recipient dimensions: award (award-level obligations and outlays) or total (includes direct non-award spending). Ignored for cfda and overview; the geography dimension is not user-controllable and always reports obligation-based amounts.",
      "type": "string",
      "enum": [
        "award",
        "total"
      ]
    },
    "filters": {
      "description": "Filters — def_codes is required for all non-overview dimensions (agency, cfda, recipient, geography)",
      "type": "object",
      "properties": {
        "def_codes": {
          "description": "DEF codes to filter by (e.g., [\"L\", \"M\", \"N\", \"O\", \"P\"] for COVID-19). Required for all dimensions except overview — the upstream API returns HTTP 422 when omitted for agency, cfda, recipient, and geography breakdowns. DEF codes appear in usaspending_get_agency def_codes fields.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "award_type_codes": {
          "description": "Award type code filters",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "geo_layer": {
          "description": "Geographic layer for geography dimension (state or county)",
          "type": "string",
          "enum": [
            "state",
            "county"
          ]
        }
      },
      "additionalProperties": false
    },
    "limit": {
      "default": 10,
      "description": "Maximum results per page (1–100). Applies to the agency, cfda, and recipient dimensions; ignored for overview and geography, which are not paginated.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page": {
      "default": 1,
      "description": "Page number (1-based)",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "dimension",
    "spending_type",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_get_federal_account

Fetch a federal account's budget data: total obligations, gross outlays, and budgetary resources, plus the per-Treasury-Account-Symbol (TAS) component breakdown in children. Federal accounts connect appropriations law to actual agency spending. Account codes come from usaspending_search_federal_accounts (its account_number output field) or usaspending_get_award_federal_accounts (its federal_account field), and are formatted as AGENCY-MAIN (e.g., 097-0100 for DoD Operation and Maintenance). For obligations broken down by program activity or object class, use usaspending_get_federal_account_breakdown.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_get_federal_account",
    "arguments": {
      "account_code": "<account_code>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "account_code": {
      "type": "string",
      "minLength": 1,
      "description": "Federal account code in AGENCY-MAIN format (e.g., 097-0100). Returned as account_number by usaspending_search_federal_accounts and as federal_account by usaspending_get_award_federal_accounts."
    }
  },
  "required": [
    "account_code"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_get_federal_account_breakdown

Fetch a federal account's obligations broken down by program activity (what the money funds) or object class (what it buys — personnel, supplies, contracts). Use the dimension parameter to select the axis. Account codes are AGENCY-MAIN format and come from usaspending_search_federal_accounts (its account_number output field), usaspending_get_award_federal_accounts (its federal_account field), or usaspending_get_federal_account. Paginated with an honest total count. For the account's own metadata and top-level totals, use usaspending_get_federal_account.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_get_federal_account_breakdown",
    "arguments": {
      "account_code": "<account_code>",
      "dimension": "<dimension>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "account_code": {
      "type": "string",
      "minLength": 1,
      "description": "Federal account code in AGENCY-MAIN format (e.g., 097-0100). Returned as account_number by usaspending_search_federal_accounts and as federal_account by usaspending_get_award_federal_accounts."
    },
    "dimension": {
      "type": "string",
      "enum": [
        "program_activity",
        "object_class"
      ],
      "description": "Breakdown axis: program_activity (obligations by the program the funds support) or object_class (obligations by the category of goods/services purchased)"
    },
    "limit": {
      "default": 10,
      "description": "Maximum results per page (1–100)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page": {
      "default": 1,
      "description": "Page number (1-based)",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "account_code",
    "dimension",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

usaspending_search_federal_accounts

open-world

List and keyword-search federal accounts by agency identifier or title keyword. Returns account numbers, names, managing agencies, and budgetary resources. Use account_number from results as input to usaspending_get_federal_account for full budget detail. Use usaspending_list_agencies to look up agency_identifier codes (3-digit strings, e.g. "097" for DoD).

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "usaspending_search_federal_accounts",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "keyword": {
      "description": "Filter accounts by name or title keyword (e.g., \"defense\", \"transportation\")",
      "type": "string"
    },
    "agency_identifier": {
      "description": "3-digit agency identifier code (e.g., \"097\" for Department of Defense). Use usaspending_list_agencies to look up codes.",
      "type": "string"
    },
    "sort_field": {
      "default": "budgetary_resources",
      "description": "Field to sort results by",
      "type": "string",
      "enum": [
        "account_name",
        "account_number",
        "budgetary_resources",
        "managing_agency"
      ]
    },
    "sort_direction": {
      "default": "desc",
      "description": "Sort direction",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "limit": {
      "default": 10,
      "description": "Maximum results per page (1–100)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page": {
      "default": 1,
      "description": "Page number (1-based)",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "sort_field",
    "sort_direction",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗