> For the complete documentation index, see [llms.txt](https://docs.espresso.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.espresso.ai/mcp-server/exporting-data.md).

# Exporting Data

The Espresso MCP server returns savings data and savings estimates as CSV files with the same columns: `date`, `warehouse`, `spend`, `savings`, and `pre_onboarding`, one row per day and warehouse. `currency` can be `usd` (the default) or `credits`.

## Pull savings data

> Get the last 7 days of savings for account acme.

The agent calls `get_savings` with the account's slug and a date range covering the last 7 days, and saves the CSV it returns to a local file. This is the same data as the **Savings** page. A range can cover up to 366 days. The agent then totals spend and savings for the period.

## Pull a sales estimate

> List sales estimates for acme.

The agent calls `list_savings_estimates`, which returns the account's published estimates, newest first, with each estimate's slug, name, agent, and product.

> Get estimate acme\_scheduling\_prospect.

The agent calls `get_savings_estimate` with `estimate: "acme_scheduling_prospect"` and saves the CSV it returns to a local file. The CSV covers the estimate's whole simulated period. Without an `estimate`, the tool reads the newest one.

Spark job estimates aren't available through the MCP server yet.
