> ## Documentation Index
> Fetch the complete documentation index at: https://docs.affonso.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing tools

> Read Affonso invoices for your team over MCP

Use `list_invoices` with an Affonso API key that has the `billing:read` scope. The tool reads the same invoices and fields as [List invoices](https://docs.affonso.io/api/endpoint/billing/list-invoices.md). OAuth connections cannot use this tool.

| Argument | Type | Default | Description |
| - | - | - | - |
| `limit` | integer | 24 | Number of invoices to return, from 1 to 24 |
| `response_format` | string | `markdown` | Choose `markdown` or `json`. `responseFormat` is accepted as an alias |

```json Example tool arguments theme={null}
{
  "limit": 5,
  "response_format": "json"
}
```

The `structuredContent.data` array contains the invoices, newest first. In `markdown` format, a team without invoices gets `No invoices yet.`

## Errors

* A connection without the `billing:read` scope, including every OAuth connection, gets a tool error saying the `billing:read` scope is required.
* A `limit` that is not an integer from 1 to 24 returns a tool error.
* When billing is unavailable, the tool returns an error with code 503 and the message `Billing not available`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.