usaspending-mcp-server

v0.5.0 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 "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","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 and sub-agency names, each with its tier and top-tier parent — the agency_name filters take the top-tier name), 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, for the psc_codes filter), cfda (Assistance Listing program numbers, for the assistance_listings filter), awarding_agency (agency and sub-agency names), recipient (recipient names). Both filters are taken by usaspending_search_awards and by the filters object of usaspending_spending_by_category, usaspending_spending_by_geography, and usaspending_spending_over_time."
    },
    "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, assistance listing (CFDA) number, PSC, DEF 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; loan rows carry loan value, subsidy cost, and issue date in place of award amount and dates. Award types: A/B/C/D = contracts, IDV_A–IDV_E = IDVs, 02/03/04/05/F001/F002 = grants, 06/10/F006/F007 = direct payments, 07/08/F003/F004 = loans, 09/11/-1/F005/F008/F009/F010 = other assistance. 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), IDV_A/IDV_B/IDV_B_A/IDV_B_B/IDV_B_C/IDV_C/IDV_D/IDV_E (IDVs), 02/03/04/05/F001/F002 (grants), 06/10/F006/F007 (direct payments), 07/08/F003/F004 (loans), 09/11/-1/F005/F008/F009/F010 (other assistance). Defaults to contracts. Mixing groups causes a 422 error. The group decides which sort values apply.",
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "agency_name": {
      "description": "Filter to one awarding agency by its top-tier name (e.g., \"Department of Defense\"). Top-tier only: a sub-agency name matches no awards. Take the value from toptier_name in usaspending_autocomplete_filters type=awarding_agency — for a sub-agency that is its parent, so results cover the whole department.",
      "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"
      }
    },
    "assistance_listings": {
      "description": "Filter by Assistance Listing (CFDA) program numbers, e.g. [\"15.507\"]: two digits, a dot, then three digits or capital letters (11.67A). Matches an award when any of its listings equals one of these exactly; several values match any of them. A matching award's primary listing can differ from the one requested, and amounts cover the whole award, not that listing's share. Only assistance awards (grants, direct payments, loans, other assistance) carry listings, so a call whose award types are all contracts or IDVs — including a contract default — is rejected as assistance_listings_type_mismatch. Use usaspending_autocomplete_filters type=cfda to look up numbers.",
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^\\d{2}\\.[0-9A-Z]{3}$",
        "description": "Assistance Listing number, e.g. 15.507"
      }
    },
    "psc_codes": {
      "description": "Filter by Product and Service Codes (PSC), e.g. [\"Y1NE\"]: 1–4 letters or digits, sent uppercased. A shorter code covers every code under it (\"Y1\" covers \"Y1NE\"); several values match any of them. Only contracts and IDVs carry a PSC, so a call whose award types are all assistance types is rejected as psc_codes_type_mismatch, and pairing psc_codes with assistance_listings matches nothing, since no award carries both. Use usaspending_autocomplete_filters type=psc to look up codes.",
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[0-9A-Za-z]{1,4}$",
        "description": "Product and Service Code or prefix, e.g. Y1NE or Y1"
      }
    },
    "def_codes": {
      "description": "Filter by Disaster Emergency Fund Codes (DEF), e.g. [\"Z\"], or [\"L\", \"M\", \"N\", \"O\", \"P\"] for COVID-19: 1–3 letters or digits, sent uppercased — the codes usaspending_disaster_spending takes and usaspending_get_agency lists. Matches awards of any type funded under any of these codes. Amounts cover the whole matching award, not the share funded by the code, and DEF-filtered totals can be negative. An unknown code is rejected with the list of codes USAspending accepts.",
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[0-9A-Za-z]{1,3}$",
        "description": "Disaster Emergency Fund Code, e.g. Z or L"
      }
    },
    "time_period": {
      "description": "Filter awards by date range (action date). Both blank means no date filter; one blank end is filled and named in the notice.",
      "type": "object",
      "properties": {
        "start_date": {
          "description": "Start date in ISO 8601 format (YYYY-MM-DD); earliest valid: 2007-10-01. Blank (\"\") leaves the start open, filled with 2007-10-01.",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{1,2}-\\d{1,2}$",
              "description": "Date as YYYY-MM-DD; month and day may be unpadded"
            }
          ]
        },
        "end_date": {
          "description": "End date in ISO 8601 format (YYYY-MM-DD). Blank (\"\") leaves the end open, filled with today (UTC).",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{1,2}-\\d{1,2}$",
              "description": "Date as YYYY-MM-DD; month and day may be unpadded"
            }
          ]
        }
      },
      "required": [
        "start_date",
        "end_date"
      ],
      "additionalProperties": false
    },
    "location_filter": {
      "description": "Filter by place of performance. Takes codes, not place names — use a geocoding server to resolve names to codes first. Blank fields are ignored, and an all-blank object is no location filter. The location sent is echoed as applied_location.",
      "type": "object",
      "properties": {
        "country": {
          "description": "ISO 3166-1 alpha-3 country code (e.g., USA); USA when omitted. A US territory code — PRI, GUM, VIR, ASM, MNP — is sent as USA with the territory as state.",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$"
            }
          ]
        },
        "state": {
          "description": "Under USA (the default): a US state, DC, territory, freely associated state, or armed-forces code as a 2-letter postal code (NM, PR, FM, AE) or 2-digit FIPS code (35). Under another country: that country's own 2-letter subdivision code (ON with CAN).",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^(?:[A-Za-z]{2}|\\d{2})$"
            }
          ]
        },
        "county": {
          "description": "US county FIPS code: 3 digits with state (049 with state NM), or the 5-digit state + county code (35049, Santa Fe County, NM), whose first two digits set the state — the form usaspending_spending_by_geography county rows carry as shape_code.",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^(?:\\d{3}|\\d{5})$"
            }
          ]
        },
        "city": {
          "description": "City name",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "sort": {
      "description": "Sort field for results. Loans (07/08/F003/F004) sort by Loan Value, Subsidy Cost, Issued Date, Recipient Name, or Awarding Agency, defaulting to Loan Value. Every other group sorts by Award Amount, Total Outlays, Start Date, End Date, Recipient Name, or Awarding Agency, defaulting to Award Amount — except IDVs, which have no End Date. A sort the group does not support is rejected before the search runs.",
      "type": "string",
      "enum": [
        "Award Amount",
        "Total Outlays",
        "Start Date",
        "End Date",
        "Loan Value",
        "Subsidy Cost",
        "Issued 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 rejected — 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 contracts, IDV_A–IDV_E IDVs, 02/03/04/05/F001/F002 grants, 06/10/F006/F007 direct payments, 07/08/F003/F004 loans, 09/11/-1/F005/F008/F009/F010 other assistance). When non-empty, overrides the top-level award_type_codes and decides which sort values apply; an empty array falls back to the top-level value.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "agency_name": {
          "description": "Awarding agency name, top-tier only (e.g., \"Department of Defense\") — the toptier_name from usaspending_autocomplete_filters type=awarding_agency; a sub-agency name matches no awards",
          "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"
          }
        },
        "assistance_listings": {
          "description": "Filter by Assistance Listing (CFDA) program numbers, e.g. [\"15.507\"]: two digits, a dot, then three digits or capital letters (11.67A). Matches an award when any of its listings equals one of these exactly; several values match any of them. A matching award's primary listing can differ from the one requested, and amounts cover the whole award, not that listing's share. Only assistance awards (grants, direct payments, loans, other assistance) carry listings, so a call whose award types are all contracts or IDVs — including a contract default — is rejected as assistance_listings_type_mismatch. Use usaspending_autocomplete_filters type=cfda to look up numbers.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^\\d{2}\\.[0-9A-Z]{3}$",
            "description": "Assistance Listing number, e.g. 15.507"
          }
        },
        "psc_codes": {
          "description": "Filter by Product and Service Codes (PSC), e.g. [\"Y1NE\"]: 1–4 letters or digits, sent uppercased. A shorter code covers every code under it (\"Y1\" covers \"Y1NE\"); several values match any of them. Only contracts and IDVs carry a PSC, so a call whose award types are all assistance types is rejected as psc_codes_type_mismatch, and pairing psc_codes with assistance_listings matches nothing, since no award carries both. Use usaspending_autocomplete_filters type=psc to look up codes.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-9A-Za-z]{1,4}$",
            "description": "Product and Service Code or prefix, e.g. Y1NE or Y1"
          }
        },
        "def_codes": {
          "description": "Filter by Disaster Emergency Fund Codes (DEF), e.g. [\"Z\"], or [\"L\", \"M\", \"N\", \"O\", \"P\"] for COVID-19: 1–3 letters or digits, sent uppercased — the codes usaspending_disaster_spending takes and usaspending_get_agency lists. Matches awards of any type funded under any of these codes. Amounts cover the whole matching award, not the share funded by the code, and DEF-filtered totals can be negative. An unknown code is rejected with the list of codes USAspending accepts.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-9A-Za-z]{1,3}$",
            "description": "Disaster Emergency Fund Code, e.g. Z or L"
          }
        },
        "time_period_start": {
          "description": "Start date (YYYY-MM-DD); earliest valid 2007-10-01. Given alone, the range runs through today (UTC).",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{1,2}-\\d{1,2}$",
              "description": "Date as YYYY-MM-DD; month and day may be unpadded"
            }
          ]
        },
        "time_period_end": {
          "description": "End date (YYYY-MM-DD). Given alone, the range starts at 2007-10-01, the earliest searchable date.",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{1,2}-\\d{1,2}$",
              "description": "Date as YYYY-MM-DD; month and day may be unpadded"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "award_type_codes",
    "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 identity (UEI, parent organization, business categories), agency hierarchy, period of performance, place of performance, Assistance Listings with the obligation under each, loan face value and subsidy cost for loans, 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 and parent recipient hashes can be passed to usaspending_get_recipient; NAICS codes can be used in usaspending_search_awards filters, and Assistance Listing numbers in its assistance_listings filter. 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. Totals cover the trailing 12 months unless fiscal_year selects one fiscal year, and period names the window. For a recipient's totals by award type, use usaspending_spending_over_time with filters.recipient_id and award_type_codes. 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 the totals to (e.g., 2024, which runs October 2023 through September 2024). Omit for the trailing 12 months.",
      "type": "integer",
      "minimum": 2001,
      "maximum": 2030
    }
  },
  "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 with reported budget data), sub-agency count, and DEF codes for disaster/emergency funding. Also returns a paginated sub-agency breakdown with obligation and transaction counts for the same fiscal year as the budget totals (the current fiscal year when no budget year is available within 5 seconds); sub_agency_fiscal_year names the year it covers. Accepts exactly one of 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. When the budget or sub-agency request fails, the overview is still returned and unavailable_sections names each missing section with its reason.

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. Filter by keyword, award type, agency, recipient, NAICS code, Assistance Listing, PSC, DEF code, or date range. Areas are ranked by obligation and capped at limit; to retrieve specific areas, including ones ranked past the cap, list their codes in shape_codes — a 2-letter postal code for state, a 5-digit state + county FIPS code for county, or a 4-digit state FIPS + district number for district — NOT place names. Resolve place names to these codes using a geocoding server (Census or OpenStreetMap) first. 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 (states, DC, and territories), 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, top-tier only (e.g., \"Department of Defense\") — the toptier_name from usaspending_autocomplete_filters type=awarding_agency; a sub-agency name matches nothing",
          "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"
          }
        },
        "assistance_listings": {
          "description": "Filter by Assistance Listing (CFDA) program numbers, e.g. [\"15.507\"]: two digits, a dot, then three digits or capital letters (11.67A). Matches an award when any of its listings equals one of these exactly; several values match any of them. A matching award's primary listing can differ from the one requested, and amounts cover the whole award, not that listing's share. Only assistance awards (grants, direct payments, loans, other assistance) carry listings, so a call whose award types are all contracts or IDVs — including a contract default — is rejected as assistance_listings_type_mismatch. Use usaspending_autocomplete_filters type=cfda to look up numbers.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^\\d{2}\\.[0-9A-Z]{3}$",
            "description": "Assistance Listing number, e.g. 15.507"
          }
        },
        "psc_codes": {
          "description": "Filter by Product and Service Codes (PSC), e.g. [\"Y1NE\"]: 1–4 letters or digits, sent uppercased. A shorter code covers every code under it (\"Y1\" covers \"Y1NE\"); several values match any of them. Only contracts and IDVs carry a PSC, so a call whose award types are all assistance types is rejected as psc_codes_type_mismatch, and pairing psc_codes with assistance_listings matches nothing, since no award carries both. Use usaspending_autocomplete_filters type=psc to look up codes.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-9A-Za-z]{1,4}$",
            "description": "Product and Service Code or prefix, e.g. Y1NE or Y1"
          }
        },
        "def_codes": {
          "description": "Filter by Disaster Emergency Fund Codes (DEF), e.g. [\"Z\"], or [\"L\", \"M\", \"N\", \"O\", \"P\"] for COVID-19: 1–3 letters or digits, sent uppercased — the codes usaspending_disaster_spending takes and usaspending_get_agency lists. Matches awards of any type funded under any of these codes. Amounts cover the whole matching award, not the share funded by the code, and DEF-filtered totals can be negative. An unknown code is rejected with the list of codes USAspending accepts.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-9A-Za-z]{1,3}$",
            "description": "Disaster Emergency Fund Code, e.g. Z or L"
          }
        },
        "time_period_start": {
          "description": "Start of time period (YYYY-MM-DD), 2007-10-01 or later. Given alone, the period runs through today (UTC).",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{1,2}-\\d{1,2}$",
              "description": "Date as YYYY-MM-DD; month and day may be unpadded"
            }
          ]
        },
        "time_period_end": {
          "description": "End of time period (YYYY-MM-DD). Given alone, the period starts at 2007-10-01, the earliest searchable date.",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{1,2}-\\d{1,2}$",
              "description": "Date as YYYY-MM-DD; month and day may be unpadded"
            }
          ]
        }
      },
      "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; use shape_codes to retrieve one ranked past the cap.",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "shape_codes": {
      "description": "Return only these areas (1–500 codes), in the shape_code form this tool returns for geo_layer: 2-letter postal code for state (\"NY\"), 5-digit state + county FIPS for county (\"36117\" is Wayne County, NY), or 4-digit state FIPS + 2-digit district number for district (\"3623\" is NY-23, \"5600\" is Wyoming's at-large seat). Selection runs over every area the filters matched, so it reaches areas ranked past limit; selected areas stay ranked by aggregated_amount and capped at limit. A code that matches no area is named in the notice.",
      "minItems": 1,
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^(?:[A-Za-z]{2}|\\d{4,5})$",
        "description": "One area code: 2-letter postal code (e.g. \"NY\"), 5-digit county FIPS (e.g. \"36117\"), or 4-digit district code (e.g. \"3623\")"
      }
    },
    "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. Filter by keyword, award type, agency, recipient, NAICS code, Assistance Listing, PSC, DEF code, or date range. Chain NAICS, PSC, and CFDA codes back into these filters, into usaspending_search_awards filters, or into usaspending_autocomplete_filters lookups. recipient_duns rows carry recipient_id, which opens the recipient profile in usaspending_get_recipient, and uei.

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"
      ],
      "description": "Breakdown dimension: naics (industry), psc (product/service code), awarding_agency, awarding_subagency, funding_agency, funding_subagency, cfda (assistance programs), or recipient_duns (recipients)"
    },
    "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, top-tier only (e.g., \"Department of Defense\") — the toptier_name from usaspending_autocomplete_filters type=awarding_agency; a sub-agency name matches nothing",
          "type": "string"
        },
        "recipient_id": {
          "description": "Exact recipient hash ID filter",
          "type": "string"
        },
        "naics_codes": {
          "description": "NAICS code filters",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "assistance_listings": {
          "description": "Filter by Assistance Listing (CFDA) program numbers, e.g. [\"15.507\"]: two digits, a dot, then three digits or capital letters (11.67A). Matches an award when any of its listings equals one of these exactly; several values match any of them. A matching award's primary listing can differ from the one requested, and amounts cover the whole award, not that listing's share. Only assistance awards (grants, direct payments, loans, other assistance) carry listings, so a call whose award types are all contracts or IDVs — including a contract default — is rejected as assistance_listings_type_mismatch. Use usaspending_autocomplete_filters type=cfda to look up numbers.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^\\d{2}\\.[0-9A-Z]{3}$",
            "description": "Assistance Listing number, e.g. 15.507"
          }
        },
        "psc_codes": {
          "description": "Filter by Product and Service Codes (PSC), e.g. [\"Y1NE\"]: 1–4 letters or digits, sent uppercased. A shorter code covers every code under it (\"Y1\" covers \"Y1NE\"); several values match any of them. Only contracts and IDVs carry a PSC, so a call whose award types are all assistance types is rejected as psc_codes_type_mismatch, and pairing psc_codes with assistance_listings matches nothing, since no award carries both. Use usaspending_autocomplete_filters type=psc to look up codes.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-9A-Za-z]{1,4}$",
            "description": "Product and Service Code or prefix, e.g. Y1NE or Y1"
          }
        },
        "def_codes": {
          "description": "Filter by Disaster Emergency Fund Codes (DEF), e.g. [\"Z\"], or [\"L\", \"M\", \"N\", \"O\", \"P\"] for COVID-19: 1–3 letters or digits, sent uppercased — the codes usaspending_disaster_spending takes and usaspending_get_agency lists. Matches awards of any type funded under any of these codes. Amounts cover the whole matching award, not the share funded by the code, and DEF-filtered totals can be negative. An unknown code is rejected with the list of codes USAspending accepts.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-9A-Za-z]{1,3}$",
            "description": "Disaster Emergency Fund Code, e.g. Z or L"
          }
        },
        "time_period_start": {
          "description": "Start date (YYYY-MM-DD), 2007-10-01 or later. Given alone, the window runs through today (UTC).",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{1,2}-\\d{1,2}$",
              "description": "Date as YYYY-MM-DD; month and day may be unpadded"
            }
          ]
        },
        "time_period_end": {
          "description": "End date (YYYY-MM-DD). Given alone, the window starts at 2007-10-01, the earliest searchable date.",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{1,2}-\\d{1,2}$",
              "description": "Date as YYYY-MM-DD; month and day may be unpadded"
            }
          ]
        }
      },
      "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, NAICS code, Assistance Listing, PSC, or DEF code to trace spending trends in a specific area; award types default to contracts. 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.); groups may be mixed. When omitted, defaults to contracts (A, B, C, D).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "agency_name": {
          "description": "Awarding agency name filter, top-tier only (e.g., \"Department of Defense\") — the toptier_name from usaspending_autocomplete_filters type=awarding_agency; a sub-agency name matches nothing",
          "type": "string"
        },
        "recipient_id": {
          "description": "Exact recipient hash ID filter",
          "type": "string"
        },
        "naics_codes": {
          "description": "NAICS code filters",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "assistance_listings": {
          "description": "Filter by Assistance Listing (CFDA) program numbers, e.g. [\"15.507\"]: two digits, a dot, then three digits or capital letters (11.67A). Matches an award when any of its listings equals one of these exactly; several values match any of them. A matching award's primary listing can differ from the one requested, and amounts cover the whole award, not that listing's share. Only assistance awards (grants, direct payments, loans, other assistance) carry listings, so a call whose award types are all contracts or IDVs — including a contract default — is rejected as assistance_listings_type_mismatch. Use usaspending_autocomplete_filters type=cfda to look up numbers.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^\\d{2}\\.[0-9A-Z]{3}$",
            "description": "Assistance Listing number, e.g. 15.507"
          }
        },
        "psc_codes": {
          "description": "Filter by Product and Service Codes (PSC), e.g. [\"Y1NE\"]: 1–4 letters or digits, sent uppercased. A shorter code covers every code under it (\"Y1\" covers \"Y1NE\"); several values match any of them. Only contracts and IDVs carry a PSC, so a call whose award types are all assistance types is rejected as psc_codes_type_mismatch, and pairing psc_codes with assistance_listings matches nothing, since no award carries both. Use usaspending_autocomplete_filters type=psc to look up codes.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-9A-Za-z]{1,4}$",
            "description": "Product and Service Code or prefix, e.g. Y1NE or Y1"
          }
        },
        "def_codes": {
          "description": "Filter by Disaster Emergency Fund Codes (DEF), e.g. [\"Z\"], or [\"L\", \"M\", \"N\", \"O\", \"P\"] for COVID-19: 1–3 letters or digits, sent uppercased — the codes usaspending_disaster_spending takes and usaspending_get_agency lists. Matches awards of any type funded under any of these codes. Amounts cover the whole matching award, not the share funded by the code, and DEF-filtered totals can be negative. An unknown code is rejected with the list of codes USAspending accepts.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-9A-Za-z]{1,3}$",
            "description": "Disaster Emergency Fund Code, e.g. Z or L"
          }
        },
        "time_period_start": {
          "description": "Start of the time window (YYYY-MM-DD), 2007-10-01 or later. Given alone, the window runs through today (UTC).",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{1,2}-\\d{1,2}$",
              "description": "Date as YYYY-MM-DD; month and day may be unpadded"
            }
          ]
        },
        "time_period_end": {
          "description": "End of the time window (YYYY-MM-DD). Given alone, the window starts at 2007-10-01, the earliest searchable date.",
          "anyOf": [
            {
              "type": "string",
              "const": ""
            },
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{1,2}-\\d{1,2}$",
              "description": "Date as YYYY-MM-DD; month and day may be unpadded"
            }
          ]
        }
      },
      "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 dimension: award (award-level obligations and outlays) or total (includes direct non-award spending, plus total budgetary resources). Ignored for cfda, recipient, and overview, which report award-level amounts either way; 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, recipient, and geography dimensions; geography pages through its areas ranked by aggregated_amount, highest first. Ignored for overview.",
      "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 ↗