usa_spending_by_agency

Pack: usaspending · Endpoint: https://gateway.pipeworx.io/usaspending/mcp

Break down federal spending by agency for a fiscal year (optionally by quarter). Returns spending amounts per agency. Use when analyzing budget distribution across government.

Parameters

NameTypeRequiredDescription
fiscal_yearstringnoFour-digit fiscal year (e.g., “2025”). Defaults to current year.
quarternumbernoFiscal quarter (1-4). Omit for full year.

Example call

Arguments

{
  "fiscal_year": "2024"
}

curl

curl -X POST https://gateway.pipeworx.io/usaspending/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"usa_spending_by_agency","arguments":{"fiscal_year":"2024"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('usa_spending_by_agency', {
  "fiscal_year": "2024"
});

More examples

{
  "fiscal_year": "2023",
  "quarter": 2
}

Response shape

Always returns: fiscal_year, quarter, total, agencies

FieldTypeDescription
fiscal_yearstringFiscal year used for the query
quarternumber | nullFiscal quarter if specified, otherwise null
totalnumber | nullTotal federal spending for the period
agenciesarrayBreakdown of spending by agency
Full JSON Schema
{
  "type": "object",
  "properties": {
    "fiscal_year": {
      "type": "string",
      "description": "Fiscal year used for the query"
    },
    "quarter": {
      "type": [
        "number",
        "null"
      ],
      "description": "Fiscal quarter if specified, otherwise null"
    },
    "total": {
      "type": [
        "number",
        "null"
      ],
      "description": "Total federal spending for the period"
    },
    "agencies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Agency name"
          },
          "amount": {
            "type": "number",
            "description": "Spending amount for this agency"
          },
          "abbreviation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agency abbreviation if available"
          }
        },
        "required": [
          "name",
          "amount",
          "abbreviation"
        ]
      },
      "description": "Breakdown of spending by agency"
    }
  },
  "required": [
    "fiscal_year",
    "quarter",
    "total",
    "agencies"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "usaspending": {
      "url": "https://gateway.pipeworx.io/usaspending/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026