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

> ## Agent Instructions
> Melso MCP: https://mcp.melso.ai/mcp (OAuth; one company per connection). Documentation-search MCP: https://docs.melso.ai/mcp; it does not act on customer accounts.
>
> Use the live tool list and respect company membership. Ask the person to approve the exact invoice or tax return version in the signed-in app. Melso's professionals prepare and file included returns after approval; an AI assistant does not file. A prepared file or an approval is not evidence of filing: only the AEAT's reference and receipt are. Keep credentials out of chat and logs.

# Leer extractos bancarios — bank_statements_read MCP

> MCP bank_statements_read: inspect a statement before saving its movements. Live for an empresa.

Read-only actions. Import a bank statement the person gave as the company's bank movements: Norma 43, CSV, Excel or PDF, as the bank exports it, sent in the Melso chat (attachment\_id) or uploaded from another client with upload (upload\_id). read shows what it holds and what is missing; import saves it only when it adds up. A refused statement is never fixed by hand: the person downloads it again. Then reconcile its movements with bank. Each action accepts only its own fields (\* required): read(account\_name, attachment\_id, bank\_account\_id, closing\_balance, opening\_balance, upload\_id).

**Availability:** Empresa.

**Access:** Live in the Melso app and over MCP for a signed-in person. Where the partner REST API covers the same area, that path is private beta until Melso enables your account. See [Access and pricing](https://docs.melso.ai/api/access.md).

The live tool list is authoritative: the company's plan and your role can narrow this contract. [Understand access](https://docs.melso.ai/mcp/permissions.md).

## When to use

Use `bank_statements_read` for `read`. Use [`bank_statements`](https://docs.melso.ai/mcp/tools/bank-statements) for the companion actions. The live tool list determines availability.

## Input

```json theme={null}
{
  "additionalProperties": false,
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "account_name": {
          "description": "Only when read asks for the account: the name the person gives a new account.",
          "type": "string"
        },
        "action": {
          "const": "read"
        },
        "attachment_id": {
          "description": "In the Melso chat: the attachment_id of the statement the person sent, at most 5 MB.",
          "type": "string"
        },
        "bank_account_id": {
          "description": "Only when read asks for the account: the saved bank account the person chose, by its id from bank accounts.",
          "type": "string"
        },
        "closing_balance": {
          "description": "Only when read asks for balances: the closing balance the person copies from their bank, as a decimal string.",
          "type": "string"
        },
        "opening_balance": {
          "description": "Only when read asks for balances: the opening balance the person copies from their bank, as a decimal string.",
          "type": "string"
        },
        "upload_id": {
          "description": "From another client: the upload_id from upload, once the statement was PUT to its upload_url.",
          "type": "string"
        }
      },
      "required": [
        "action"
      ],
      "type": "object"
    }
  ],
  "properties": {
    "account_name": {
      "description": "Only when read asks for the account: the name the person gives a new account.",
      "type": "string"
    },
    "action": {
      "enum": [
        "read"
      ],
      "type": "string"
    },
    "attachment_id": {
      "description": "In the Melso chat: the attachment_id of the statement the person sent, at most 5 MB.",
      "type": "string"
    },
    "bank_account_id": {
      "description": "Only when read asks for the account: the saved bank account the person chose, by its id from bank accounts.",
      "type": "string"
    },
    "closing_balance": {
      "description": "Only when read asks for balances: the closing balance the person copies from their bank, as a decimal string.",
      "type": "string"
    },
    "opening_balance": {
      "description": "Only when read asks for balances: the opening balance the person copies from their bank, as a decimal string.",
      "type": "string"
    },
    "upload_id": {
      "description": "From another client: the upload_id from upload, once the statement was PUT to its upload_url.",
      "type": "string"
    }
  },
  "required": [
    "action"
  ],
  "type": "object"
}
```

## Actions

The tool's schema combines the fields of every action. Each action accepts only its own fields below; send `action` with them.

### Read actions

These actions only read. They change nothing.

> [accordion] read
>
> Read a bank statement the person gave without saving it: its account, period, balances, money in and out, its movements, whether it adds up (difference, balance\_break), the movements already saved and what the person still has to answer (questions: account or balances). A PDF is read by Melso and billed to the company's credit. Name the file with attachment\_id or upload\_id.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "account_name": {
>       "description": "Only when read asks for the account: the name the person gives a new account.",
>       "type": "string"
>     },
>     "attachment_id": {
>       "description": "In the Melso chat: the attachment_id of the statement the person sent, at most 5 MB.",
>       "type": "string"
>     },
>     "bank_account_id": {
>       "description": "Only when read asks for the account: the saved bank account the person chose, by its id from bank accounts.",
>       "type": "string"
>     },
>     "closing_balance": {
>       "description": "Only when read asks for balances: the closing balance the person copies from their bank, as a decimal string.",
>       "type": "string"
>     },
>     "opening_balance": {
>       "description": "Only when read asks for balances: the opening balance the person copies from their bank, as a decimal string.",
>       "type": "string"
>     },
>     "upload_id": {
>       "description": "From another client: the upload_id from upload, once the statement was PUT to its upload_url.",
>       "type": "string"
>     }
>   },
>   "type": "object"
> }
> ```

## Output

`read` returns the statement's account, period, balances, movements, balance checks, duplicates and questions without saving its movements. A PDF reading uses the company's credit.

The result uses MCP `content` blocks; JSON payloads are encoded in text and may also appear in `structuredContent`. Check `isError` before reading a success payload. When the server declares an `outputSchema`, it is reproduced below. Check the action result and its declared fields before reporting success.

## Example

Use the actions of this tool in the order shown; its companion tool covers the other actions. These are the `arguments` of each call, in order.

**1. Read it and check that it adds up**

```json theme={null}
{
  "action": "read",
  "upload_id": "11111111-1111-4111-8111-111111111111"
}
```

The first call as a request. Use an OAuth access token issued for this MCP resource and replace the example identifiers with values from your own company.

```bash theme={null}
curl --fail-with-body https://mcp.melso.ai/mcp \
  -H "Authorization: Bearer $MELSO_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  --data-binary @- <<'JSON'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "bank_statements_read",
    "arguments": {
      "action": "read",
      "upload_id": "11111111-1111-4111-8111-111111111111"
    }
  }
}
JSON
```


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