---
title: "Get Tool Spend"
method: GET
path: "/v1/tool/spend"
tags: ["tools"]
---

# Get Tool Spend

`GET /v1/tool/spend`

Spend attributed to each tool over a date range, for the Cost Optimization dashboard.

Reads the ``LiteLLM_DailyToolSpend`` rollup, written at request time from invoked
tools only (MCP tool calls and response tool_calls; declaring a tool without
invoking it does not count). A request that invoked multiple tools counts its
full spend toward each of them, so per-tool numbers are attributions and do not
sum to a deduplicated total.

``by_tool`` is the top ``TOOL_SPEND_TOP_TOOLS`` tools by spend, aggregated in
SQL, and ``daily`` covers only those tools, so the response is bounded by
days x TOOL_SPEND_TOP_TOOLS regardless of the requested range or how many
distinct tool names exist.

## Query parameters

- `start_date` string, nullable — YYYY-MM-DD (defaults to 30 days ago)
- `end_date` string, nullable — YYYY-MM-DD (defaults to today)

## Response `200`

Successful Response

- ToolSpendResponse
  - `by_tool` ToolSpendEntry[]
    - `call_count` integer
    - `spend` number — Attributed spend: a request that used several tools counts its full spend toward each of them
    - `tool_name` string, required
    - `total_tokens` integer
  - `daily` ToolSpendDailyEntry[]
    - `call_count` integer
    - `date` string, required
    - `spend` number
    - `tool_name` string, required
  - `end_date` string, nullable
  - `start_date` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-22** `c71315002afa` — 2 info
  - api tag `tools` added
  - api tag `tool management` removed
- **2026-09-21** `6246f8d427b7` — 2 info
  - api tag `tool management` added
  - api tag `tools` removed
- **2026-09-19** `c357baf422ab` — 2 info
  - api tag `tools` added
  - api tag `tool management` removed
- **2026-09-18** `082b5fabd909` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/flock/apis/litellm-api/changes/v1/tool/spend/get.md)

---

[API](https://skmtc.dev/flock/apis/litellm-api.md) · [All operations](https://skmtc.dev/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flock/apis/litellm-api/revisions/7ed45f30a5f0?raw)
