Spiral gives your agent every tool with one account. Browse the tools →

Gemini CLI · Finance

How to Use Treasury monthly budget summary in Gemini CLI

Returns U.S. federal receipts, outlays, and deficit or surplus by month, plus fiscal year totals to date. Use it to compare budget results across fiscal years or separate changes in revenue from changes in spending.

Prompts to try with Treasury monthly budget summary in Gemini CLI

Copy an example into Gemini CLI, or ask in your own words.

Use Treasury monthly budget summary to fetch U.S. federal results for fiscal year 2025 through August. Add a chart to this project showing monthly receipts, outlays, and the budget balance in billions.

Treasury monthly budget summaryGemini CLI
Try asking
  • Use Treasury monthly budget summary for February 2025 and February 2024. Add a comparison table to this project's report with receipts, outlays, and deficit or surplus for each month.

  • Use Treasury monthly budget summary to retrieve fiscal year 2025 results through February. Write a CSV in this project that separates individual months from year-to-date totals.

  • Use Treasury monthly budget summary for the August 2025 statement. Check this project's budget figures against the returned monthly and year-to-date amounts, allowing for published rounding.

  • Use Treasury monthly budget summary to retrieve April 2024 and April 2025. Add a notebook calculation showing the change in receipts, outlays, and the budget balance.

How to set up Treasury monthly budget summary in Gemini CLI

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the server

    Or add it to ~/.gemini/settings.json yourself:

    gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
  2. Sign in

    Start gemini and run:

    /mcp auth spiral
  3. Check it

    In Gemini CLI, run /mcp. From your shell:

    gemini mcp list

Use the Spiral skill

  1. Send Gemini CLI this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Treasury monthly budget summary

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "alexandria",
        "model": "treasury-fiscal-data/monthly-statement/receipts-and-outlays",
        "input": {
          "sort": "<sort>"
        }
      }'

Then paste one of the prompts above: Gemini CLI finds Treasury monthly budget summary on Spiral, shows the price and runs it.

Treasury monthly budget summary providers and prices

Spiral runs Treasury monthly budget summary through Alexandria. Open a card for today's price, with every fee included.

AlexandriaFinance
Treasury Fiscal Data · Receipts, outlays and deficit
treasury-fiscal-data/monthly-statement/receipts-and-outlays

Settings you can ask for

Ask Gemini CLI for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Page[size]a number up to 10000100

Rows per page, 1 to 10,000. The default of 100 is fine for a summary series and far too small for a full auction history.

Page[number]a number1

Page number, 1-indexed. meta.total-pages in the response says how many there are.

Every API field of Treasury Fiscal Data · Receipts, outlays and deficit is on its tool page: open its card above.

What can you do with Treasury monthly budget summary in Gemini CLI?

Build a federal budget chart with monthly receipts, outlays, and deficit or surplus. A coding agent can add Treasury's results to your project while keeping fiscal years and year-to-date totals separate.

Write a monthly budget brief

Summarize the latest month's receipts, outlays, and deficit or surplus, then compare each amount with the same month in the preceding fiscal year.

Compare fiscal year progress

Compare receipts, spending, and the budget balance through the same reporting month in two fiscal years.

Explain a change in the deficit

Calculate how changes in total receipts and total outlays contributed to the difference between two monthly budget balances.

Chart monthly budget patterns

Plot receipts, outlays, and the budget balance across a fiscal year, keeping the year-to-date total outside the monthly series.

Check a published budget claim

Retrieve the relevant month and fiscal year to check a claim about federal revenue, spending, or the deficit against Treasury's summary.

Refresh a federal finance dashboard

Update a dashboard after each monthly statement with the latest monthly results and fiscal year totals to date.

Questions about Treasury monthly budget summary in Gemini CLI

Can Gemini CLI use Treasury monthly budget summary?

Yes. Add Spiral to Gemini CLI as an MCP server, and Gemini CLI can find and run Treasury monthly budget summary like any built-in tool.

How much does Treasury monthly budget summary cost in Gemini CLI?

$0.001746 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Gemini CLI plan is separate.

Do I need an Alexandria account to use Treasury monthly budget summary in Gemini CLI?

No. Spiral runs Treasury monthly budget summary on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up Treasury monthly budget summary in Gemini CLI?

About two minutes: add the server, then sign in, then check it.

Does Gemini CLI wait while Treasury monthly budget summary runs?

Treasury monthly budget summary runs in the background. Gemini CLI starts the run, checks on it and gives you the json when it's ready.

What does the Treasury monthly budget summary cover?

It covers U.S. federal receipts, outlays, and deficit or surplus. The summary presents monthly results for the reporting fiscal year and the preceding fiscal year, with year-to-date rows.

How soon after month-end are results published?

Treasury normally releases the Monthly Treasury Statement on the eighth workday of the following month. That is a publication schedule, not a daily update of budget results.

What units do the amounts use?

Amounts are in millions of U.S. dollars. Multiply by one million to express them in dollars, or divide by 1,000 to express them in billions.

Why can the same month appear more than once?

The summary contains two fiscal years, so a month name can appear under each year. Match the month to its fiscal year before making a comparison.

Can I sum every returned row?

Treasury warns that MTS includes totals and subtotals that should be excluded when aggregating. Keep monthly rows separate from year-to-date rows when calculating a period total.

Get started

Start using Treasury monthly budget summary in Gemini CLI

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Gemini CLI:

Set up Gemini CLI

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options