get_federal_spending
Pack: treasury · Endpoint: https://gateway.pipeworx.io/treasury/mcp
Get federal net cost / spending data. Returns the 20 most recent records, optionally filtered by a specific fiscal year (e.g., “2023”).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
fiscal_year | string | no | Four-digit fiscal year to filter by (e.g., “2023”). Omit for all recent records. |
Example call
Arguments
{}
curl
curl -X POST https://gateway.pipeworx.io/treasury/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_federal_spending","arguments":{}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_federal_spending', {});
More examples
{
"fiscal_year": "2023"
}
Response shape
Always returns: filter_fiscal_year, total_records, spending
| Field | Type | Description |
|---|---|---|
filter_fiscal_year | string | null | Fiscal year filter if provided, otherwise null |
total_records | number | Total number of spending records matching the query |
spending | array | Array of federal spending records by agency |
Full JSON Schema
{
"type": "object",
"properties": {
"filter_fiscal_year": {
"type": [
"string",
"null"
],
"description": "Fiscal year filter if provided, otherwise null"
},
"total_records": {
"type": "number",
"description": "Total number of spending records matching the query"
},
"spending": {
"type": "array",
"description": "Array of federal spending records by agency",
"items": {
"type": "object",
"properties": {
"record_date": {
"type": "string",
"description": "Date of the spending record (YYYY-MM-DD format)"
},
"fiscal_year": {
"type": "string",
"description": "Fiscal year (e.g., 2023)"
},
"fiscal_quarter": {
"type": "string",
"description": "Fiscal quarter number (1-4)"
},
"agency": {
"type": "string",
"description": "Federal agency name"
},
"gross_cost": {
"type": "string",
"description": "Gross cost amount in dollars"
},
"earned_revenue": {
"type": "string",
"description": "Earned revenue amount in dollars"
},
"net_cost": {
"type": "string",
"description": "Net cost amount in dollars"
}
},
"required": [
"record_date",
"fiscal_year",
"fiscal_quarter",
"agency",
"gross_cost",
"earned_revenue",
"net_cost"
]
}
}
},
"required": [
"filter_fiscal_year",
"total_records",
"spending"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"treasury": {
"url": "https://gateway.pipeworx.io/treasury/mcp"
}
}
}
See Getting Started for client-specific install steps.