Twinkle HubTwinkle Hub
登入

📌 2026-08-17 新增:⚖️ 台灣法條時光機 — 歷史法條原文 · 修法沿革 · 全文檢索 · 條文關聯圖(935 個 dataset · 35,454+ 筆 row)

查看完整 Changelog →

美國聯邦機關年度預算 / 支出

us_get_agency_spending

台灣​專屬MIT

**關鍵字 / Keywords**: 美國聯邦 機關 部會 預算 支出 obligation outlay budget budgetary_resources FY toptier_code agency DOD DOE NASA GSA Treasury USASpending federal spending rollup

Scope: one federal agency's per-FY budgetary rollup — total
budgetary resources · obligated · outlayed · by-period breakdown.

Endpoint:
    GET https://api.usaspending.gov/api/v2/agency/{toptier_code}/budgetary_resources/
    (with fallback resolution via
     GET https://api.usaspending.gov/api/v2/references/toptier_agencies/
     when the caller passes an agency name substring)

Args:
    toptier_code: 3-4-digit federal `toptier_code`
                  (e.g. `"097"` DOD, `"089"` Energy, `"075"` HHS,
                  `"1500"` Justice sub). Also accepts an agency name
                  substring or abbreviation ("Department of Defense",
                  "DOD", "NASA") — resolved via the toptier reference
                  list on first use.
    fiscal_year: restrict to a single FY (default: all FYs since
                 data started ~FY17).

Returns dict `{toptier_code, agency_name, fiscal_year_filter,
agency_data_by_year: [{fiscal_year, agency_budgetary_resources,
agency_total_obligated, agency_total_outlayed,
total_budgetary_resources,
agency_obligation_by_period: [{period, obligated}, ...]}, ...]}`.
License: "Creative Commons Zero v1.0 Universal (CC0-1.0)".
Rate-limited to ~5 req/sec.

輸入 schema

{
  "properties": {
    "toptier_code": {
      "title": "Toptier Code",
      "type": "string"
    },
    "fiscal_year": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Fiscal Year"
    }
  },
  "required": [
    "toptier_code"
  ],
  "title": "us_get_agency_spendingArguments",
  "type": "object"
}

呼叫​方式

配置​好 Twinkle Hub 的 MCP client 後,​agent 會​看到 us_get_agency_spending。直接讓它呼叫​即可,​例如:

# Ask Claude / any MCP client:
請用 us_get_agency_spending 處理 "…"。

# It will call:
us_get_agency_spending(input="…")

尚未​設定 Client?

Claude Desktop 約 3 分鐘即可完成​設定 — 下載 .mcpb 檔案並雙擊​即可,或參閱​文件中的各 Client 安裝​步驟。

查看使用者設定​文件