> ## 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.

# Consultar contabilidad y modelo 200 — accounting_read MCP

> MCP accounting_read: journal, trial balance, annual accounts and corporate tax. Live for an empresa.

Read-only actions. A company's books as its adviser reads them. journal: the libro diario in date order; account lists an account's ledger (libro mayor), each entry with only that account's lines. trial\_balance: the year's sumas y saldos from 1 January to `to`, by account the opening balance, debit, credit and closing balance (debit positive); groups 6 and 7 start the year at zero and earlier results not yet applied show where the books reopened them (129 or 120); it leaves out the regularization, closing and reopening entries, so `to` 31 December (the default) gives the year's results before the closing, and an earlier day drops that day's ordinary entries; without prefix it groups by 4 digits, and at most 400 accounts are listed (accounts\_omitted counts the rest: narrow with prefix). statements: the annual accounts in the PGC's normal model (pérdidas y ganancias, balance) beside the year before; detail adds each line's accounts. corporate\_tax: the year's Impuesto sobre Sociedades (modelo 200) from the books and the saved inputs, the 202 instalments it sets with their deadlines, and review codes to check; its rate's kind is general (25 %), small\_company (empresa de reducida dimensión: the year before's turnover under 10 M€, art. 101 LIS: 24 % in 2025, 23 % in 2026), micro\_company (under 1 M€) or new\_entity (15 %). Each 202 instalment's amount is what the company pays, by its method: 40.2 is 18 % of the last return's cuota (on\_last\_return); 40.3 is the year's base so far at period\_rate, 5/7 of the year's rate rounded down: 16 % for 23 %, 17 % for 24 % or 25 % (on\_period\_base), and is compulsory above 6 M€ of turnover (compulsory\_period\_base). Its version is the expected\_version of corporate\_tax\_update and corporate\_tax\_filed. corporate\_tax\_update saves only the fields supplied and answers the recalculated tax; a year whose 200 was filed (filed) changes only with rectification, when the person asks to rectify that return. corporate\_tax\_filed records a 200 filed outside Melso (the day and the result filed, which must equal Melso's calculation): the 202 instalments then build on the return filed (art. 40.2), whatever the year's books or inputs say later. subaccounts lists the names the company gave its subaccounts (customers, suppliers, banks...) with their tax IDs, which the journal, the trial balance and the ledgers show; subaccount\_set names one, adding or correcting it, and subaccount\_delete forgets one: they move no amount. assets is the register of fixed assets: a purchase booked to an asset account is an asset by itself, depreciated straight-line from the day it entered service at a coefficient of the official table (art. 12.1.a LIS) on its cost less land and residual value, one entry a year; asset adds its table and entries; asset\_preview shows the table a change would give without saving; asset\_update changes how one is depreciated at expected\_version (a year whose corporate tax was filed keeps what it booked); asset\_create records an asset the imported books carry, with the depreciation they hold (opening); asset\_dispose records the day one left the books, written off or sold by one of the company's invoices, and asset\_disposal\_undo puts it back; asset\_delete forgets an asset recorded from the books. entry\_create prepares an editable manual proposal for what no document says (result application, an accrual, provision, stock count or correction): balanced lines, never VAT (472, 477), after imported books and outside locked periods or a year whose 200 was filed. entry reads a proposal by its id, or the source\_id of its posted journal entry; entry\_update changes an unposted proposal at expected\_version and entry\_delete removes an unposted proposal. A professional reviews and explicitly posts exact journal proposals in the app. VAT settlements, corporate tax and year-end closing also require explicit posting. Posted entries remain unchanged; corrections require explicit reversals and new postings in the app. Asset updates, disposal and deletion recalculate proposals and never replace posted history. opening\_balance saves confirmed balances as one posted import up to its day (opening\_balance\_preview checks them first). Posted journals and opening balances cannot be deleted through book\_imports; correct them through explicit reversals in the app. Amounts are EUR decimal strings. No action approves, files or pays a return. Each action accepts only its own fields (\* required): journal(account, cursor, from, limit, to); trial\_balance(year\*, digits, prefix, to); statements(year\*, detail); corporate\_tax(year\*); subaccounts(cursor, limit, prefix, q); assets; asset(id\*); asset\_preview(account, accumulated\_account, acquired\_on, concept, cost, depreciation\_account, free\_depreciation, id, in\_service\_on, land, name, opening, rate, residual); entry(id\*); opening\_balance\_preview(date\*, lines\*).

**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 `accounting_read` for `asset`, `asset_preview`, `assets`, `corporate_tax`, `entry`, `journal`, `opening_balance_preview`, `statements`, `subaccounts`, `trial_balance`. Use [`accounting`](https://docs.melso.ai/mcp/tools/accounting) for the companion actions. The live tool list determines availability.

## Input

```json theme={null}
{
  "additionalProperties": false,
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "account": {
          "description": "Only entries that move an account starting with these digits, e.g. 551 or 47300000.",
          "type": "string"
        },
        "action": {
          "const": "journal"
        },
        "cursor": {
          "description": "next_cursor of the previous page.",
          "type": "string"
        },
        "from": {
          "description": "First day YYYY-MM-DD.",
          "type": "string"
        },
        "limit": {
          "description": "Entries per page, 50 by default.",
          "maximum": 200,
          "minimum": 1,
          "type": "integer"
        },
        "to": {
          "description": "Last day YYYY-MM-DD.",
          "type": "string"
        }
      },
      "required": [
        "action"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "trial_balance"
        },
        "digits": {
          "description": "Group accounts by their first digits (3 for the plan's accounts); 0 keeps the books' subaccounts.",
          "maximum": 12,
          "minimum": 0,
          "type": "integer"
        },
        "prefix": {
          "description": "Only accounts starting with these digits, e.g. 47 for the tax accounts.",
          "type": "string"
        },
        "to": {
          "description": "Last day YYYY-MM-DD within the year; the year's end by default.",
          "type": "string"
        },
        "year": {
          "description": "The fiscal year, such as 2025.",
          "maximum": 2100,
          "minimum": 2000,
          "type": "integer"
        }
      },
      "required": [
        "action",
        "year"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "statements"
        },
        "detail": {
          "description": "Include the accounts behind each line.",
          "type": "boolean"
        },
        "year": {
          "description": "The fiscal year, such as 2025.",
          "maximum": 2100,
          "minimum": 2000,
          "type": "integer"
        }
      },
      "required": [
        "action",
        "year"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "corporate_tax"
        },
        "year": {
          "description": "The fiscal year, such as 2025.",
          "maximum": 2100,
          "minimum": 2000,
          "type": "integer"
        }
      },
      "required": [
        "action",
        "year"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "subaccounts"
        },
        "cursor": {
          "description": "next_cursor of the previous page.",
          "type": "string"
        },
        "limit": {
          "description": "Subaccounts per page, 100 by default.",
          "maximum": 500,
          "minimum": 1,
          "type": "integer"
        },
        "prefix": {
          "description": "Only subaccounts starting with these digits, e.g. 430 for the customers.",
          "type": "string"
        },
        "q": {
          "description": "A code's first digits, or words of a name or a tax ID.",
          "type": "string"
        }
      },
      "required": [
        "action"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "assets"
        }
      },
      "required": [
        "action"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "asset"
        },
        "id": {
          "description": "The asset's id, from assets.",
          "type": "string"
        }
      },
      "required": [
        "action",
        "id"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account": {
          "description": "The asset's account: 200 to 206 or 211 to 219, or a subaccount of one, e.g. 21800001.",
          "type": "string"
        },
        "accumulated_account": {
          "description": "Where its depreciation accumulates: 280 for an intangible, 281 for a tangible asset, or a subaccount of them; empty is 28 and the account's digits (217 to 2817).",
          "type": "string"
        },
        "acquired_on": {
          "description": "YYYY-MM-DD it was acquired, within the imported books.",
          "type": "string"
        },
        "action": {
          "const": "asset_preview"
        },
        "concept": {
          "description": "The line of the official table of coefficients (art. 12.1.a LIS) by its code from assets concepts, e.g. computer_equipment or external_transport; empty follows the asset's account.",
          "type": "string"
        },
        "cost": {
          "description": "EUR decimal string: what the asset cost.",
          "type": "string"
        },
        "depreciation_account": {
          "description": "Where the year's depreciation is charged: 680 for an intangible, 681 for a tangible asset, or a subaccount of them.",
          "type": "string"
        },
        "free_depreciation": {
          "description": "Depreciate a new tangible item of up to 300 € whole the year it entered service (art. 12.3.e LIS), while the year's 25.000 € last.",
          "type": "boolean"
        },
        "id": {
          "description": "The asset's id, from assets.",
          "type": "string"
        },
        "in_service_on": {
          "description": "YYYY-MM-DD the asset entered service (puesta en funcionamiento), when its depreciation starts; empty is the day it was acquired.",
          "type": "string"
        },
        "land": {
          "description": "EUR decimal string: the land under a building (211), booked to 210 and never depreciated.",
          "type": "string"
        },
        "name": {
          "description": "The asset's name, at most 200 characters; empty gives a purchase's asset its purchase's name back.",
          "type": "string"
        },
        "opening": {
          "additionalProperties": false,
          "description": "What books kept elsewhere (the imported journal) depreciated for it by the end of on; Melso depreciates from the day after.",
          "properties": {
            "amount": {
              "description": "EUR decimal string.",
              "type": "string"
            },
            "on": {
              "description": "YYYY-MM-DD.",
              "type": "string"
            }
          },
          "required": [
            "on",
            "amount"
          ],
          "type": "object"
        },
        "rate": {
          "description": "The coefficient, percent a year with up to two decimals, within the concept's rate_min and rate_max; empty takes the concept's own.",
          "type": "string"
        },
        "residual": {
          "description": "EUR decimal string: its residual value, which is not depreciated.",
          "type": "string"
        }
      },
      "required": [
        "action"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "entry"
        },
        "id": {
          "description": "The manual entry's id: the source_id of a journal entry whose source_type is manual.",
          "type": "string"
        }
      },
      "required": [
        "action",
        "id"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "opening_balance_preview"
        },
        "date": {
          "description": "YYYY-MM-DD: the balances are those at the end of this day, usually 31 December of the year before Melso keeps the books.",
          "type": "string"
        },
        "lines": {
          "description": "Each account's balance, debit or credit, up to 2000 lines that balance.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "account": {
                "description": "The account of the plan or its subaccount, 3 to 12 digits in groups 1 to 7.",
                "type": "string"
              },
              "concept": {
                "description": "The line's own concept, at most 300 characters.",
                "type": "string"
              },
              "credit": {
                "description": "EUR decimal string.",
                "type": "string"
              },
              "debit": {
                "description": "EUR decimal string; a line debits or credits, not both.",
                "type": "string"
              }
            },
            "required": [
              "account"
            ],
            "type": "object"
          },
          "maxItems": 2000,
          "minItems": 2,
          "type": "array"
        }
      },
      "required": [
        "action",
        "date",
        "lines"
      ],
      "type": "object"
    }
  ],
  "properties": {
    "account": {
      "anyOf": [
        {
          "description": "Only entries that move an account starting with these digits, e.g. 551 or 47300000.",
          "type": "string"
        },
        {
          "description": "The asset's account: 200 to 206 or 211 to 219, or a subaccount of one, e.g. 21800001.",
          "type": "string"
        }
      ],
      "description": "journal: only entries that move an account starting with these digits; subaccount_set and subaccount_delete: the subaccount's code; asset_create and asset_preview: the asset's account, 200 to 206 or 211 to 219 or a subaccount of one."
    },
    "accumulated_account": {
      "description": "Where its depreciation accumulates: 280 for an intangible, 281 for a tangible asset, or a subaccount of them; empty is 28 and the account's digits (217 to 2817).",
      "type": "string"
    },
    "acquired_on": {
      "description": "YYYY-MM-DD it was acquired, within the imported books.",
      "type": "string"
    },
    "action": {
      "enum": [
        "journal",
        "trial_balance",
        "statements",
        "corporate_tax",
        "subaccounts",
        "assets",
        "asset",
        "asset_preview",
        "entry",
        "opening_balance_preview"
      ],
      "type": "string"
    },
    "concept": {
      "description": "asset_preview, asset_create and asset_update: the line of the official table of coefficients by its code from assets concepts, e.g. computer_equipment; entry_create and entry_update: what the entry is, at most 300 characters.",
      "type": "string"
    },
    "cost": {
      "description": "EUR decimal string: what the asset cost.",
      "type": "string"
    },
    "cursor": {
      "description": "next_cursor of the previous page.",
      "type": "string"
    },
    "date": {
      "description": "asset_dispose: the day a write-off left the books; entry_create and entry_update: the entry's day; opening_balance: the day whose end the balances are at. YYYY-MM-DD.",
      "type": "string"
    },
    "depreciation_account": {
      "description": "Where the year's depreciation is charged: 680 for an intangible, 681 for a tangible asset, or a subaccount of them.",
      "type": "string"
    },
    "detail": {
      "description": "Include the accounts behind each line.",
      "type": "boolean"
    },
    "digits": {
      "description": "Group accounts by their first digits (3 for the plan's accounts); 0 keeps the books' subaccounts.",
      "maximum": 12,
      "minimum": 0,
      "type": "integer"
    },
    "free_depreciation": {
      "description": "Depreciate a new tangible item of up to 300 € whole the year it entered service (art. 12.3.e LIS), while the year's 25.000 € last.",
      "type": "boolean"
    },
    "from": {
      "description": "First day YYYY-MM-DD.",
      "type": "string"
    },
    "id": {
      "anyOf": [
        {
          "description": "The asset's id, from assets.",
          "type": "string"
        },
        {
          "description": "The manual entry's id: the source_id of a journal entry whose source_type is manual.",
          "type": "string"
        }
      ],
      "description": "asset actions: the asset's id, from assets; entry actions: the manual entry's id, the source_id of a journal entry whose source_type is manual."
    },
    "in_service_on": {
      "description": "YYYY-MM-DD the asset entered service (puesta en funcionamiento), when its depreciation starts; empty is the day it was acquired.",
      "type": "string"
    },
    "land": {
      "description": "EUR decimal string: the land under a building (211), booked to 210 and never depreciated.",
      "type": "string"
    },
    "limit": {
      "anyOf": [
        {
          "description": "Entries per page, 50 by default.",
          "maximum": 200,
          "minimum": 1,
          "type": "integer"
        },
        {
          "description": "Subaccounts per page, 100 by default.",
          "maximum": 500,
          "minimum": 1,
          "type": "integer"
        }
      ]
    },
    "lines": {
      "description": "entry_create and entry_update: from 2 to 200 lines; opening_balance: each account's balance, up to 2000 lines. Each line {account, debit or credit (EUR decimal string), concept}; together they balance.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "account": {
            "description": "The account of the plan or its subaccount, 3 to 12 digits in groups 1 to 7.",
            "type": "string"
          },
          "concept": {
            "description": "The line's own concept, at most 300 characters.",
            "type": "string"
          },
          "credit": {
            "description": "EUR decimal string.",
            "type": "string"
          },
          "debit": {
            "description": "EUR decimal string; a line debits or credits, not both.",
            "type": "string"
          }
        },
        "required": [
          "account"
        ],
        "type": "object"
      },
      "maxItems": 2000,
      "minItems": 2,
      "type": "array"
    },
    "name": {
      "description": "subaccount_set: whom the subaccount keeps, at most 120 characters; asset_create, asset_update and asset_preview: the asset's name, at most 200.",
      "type": "string"
    },
    "opening": {
      "additionalProperties": false,
      "description": "What books kept elsewhere (the imported journal) depreciated for it by the end of on; Melso depreciates from the day after.",
      "properties": {
        "amount": {
          "description": "EUR decimal string.",
          "type": "string"
        },
        "on": {
          "description": "YYYY-MM-DD.",
          "type": "string"
        }
      },
      "required": [
        "on",
        "amount"
      ],
      "type": "object"
    },
    "prefix": {
      "anyOf": [
        {
          "description": "Only accounts starting with these digits, e.g. 47 for the tax accounts.",
          "type": "string"
        },
        {
          "description": "Only subaccounts starting with these digits, e.g. 430 for the customers.",
          "type": "string"
        }
      ]
    },
    "q": {
      "description": "A code's first digits, or words of a name or a tax ID.",
      "type": "string"
    },
    "rate": {
      "description": "The coefficient, percent a year with up to two decimals, within the concept's rate_min and rate_max; empty takes the concept's own.",
      "type": "string"
    },
    "residual": {
      "description": "EUR decimal string: its residual value, which is not depreciated.",
      "type": "string"
    },
    "to": {
      "anyOf": [
        {
          "description": "Last day YYYY-MM-DD.",
          "type": "string"
        },
        {
          "description": "Last day YYYY-MM-DD within the year; the year's end by default.",
          "type": "string"
        }
      ]
    },
    "year": {
      "description": "The fiscal year, such as 2025.",
      "maximum": 2100,
      "minimum": 2000,
      "type": "integer"
    }
  },
  "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] asset
>
> One asset as assets lists it, with its depreciation table year by year (amount, what the books hold of it so far, accumulated and net book value) and the sources of its entries (its purchase, each year's depreciation, its write-off or the invoice that sold it), which journal does not filter by.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "id": {
>       "description": "The asset's id, from assets.",
>       "type": "string"
>     }
>   },
>   "required": [
>     "id"
>   ],
>   "type": "object"
> }
> ```

> [accordion] asset\_preview
>
> The table an asset would have with the fields given, without saving anything: an asset's (id) or a new asset of the books (name, account, cost and acquired\_on). Use it to show the person a change before asset\_update.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "account": {
>       "description": "The asset's account: 200 to 206 or 211 to 219, or a subaccount of one, e.g. 21800001.",
>       "type": "string"
>     },
>     "accumulated_account": {
>       "description": "Where its depreciation accumulates: 280 for an intangible, 281 for a tangible asset, or a subaccount of them; empty is 28 and the account's digits (217 to 2817).",
>       "type": "string"
>     },
>     "acquired_on": {
>       "description": "YYYY-MM-DD it was acquired, within the imported books.",
>       "type": "string"
>     },
>     "concept": {
>       "description": "The line of the official table of coefficients (art. 12.1.a LIS) by its code from assets concepts, e.g. computer_equipment or external_transport; empty follows the asset's account.",
>       "type": "string"
>     },
>     "cost": {
>       "description": "EUR decimal string: what the asset cost.",
>       "type": "string"
>     },
>     "depreciation_account": {
>       "description": "Where the year's depreciation is charged: 680 for an intangible, 681 for a tangible asset, or a subaccount of them.",
>       "type": "string"
>     },
>     "free_depreciation": {
>       "description": "Depreciate a new tangible item of up to 300 € whole the year it entered service (art. 12.3.e LIS), while the year's 25.000 € last.",
>       "type": "boolean"
>     },
>     "id": {
>       "description": "The asset's id, from assets.",
>       "type": "string"
>     },
>     "in_service_on": {
>       "description": "YYYY-MM-DD the asset entered service (puesta en funcionamiento), when its depreciation starts; empty is the day it was acquired.",
>       "type": "string"
>     },
>     "land": {
>       "description": "EUR decimal string: the land under a building (211), booked to 210 and never depreciated.",
>       "type": "string"
>     },
>     "name": {
>       "description": "The asset's name, at most 200 characters; empty gives a purchase's asset its purchase's name back.",
>       "type": "string"
>     },
>     "opening": {
>       "additionalProperties": false,
>       "description": "What books kept elsewhere (the imported journal) depreciated for it by the end of on; Melso depreciates from the day after.",
>       "properties": {
>         "amount": {
>           "description": "EUR decimal string.",
>           "type": "string"
>         },
>         "on": {
>           "description": "YYYY-MM-DD.",
>           "type": "string"
>         }
>       },
>       "required": [
>         "on",
>         "amount"
>       ],
>       "type": "object"
>     },
>     "rate": {
>       "description": "The coefficient, percent a year with up to two decimals, within the concept's rate_min and rate_max; empty takes the concept's own.",
>       "type": "string"
>     },
>     "residual": {
>       "description": "EUR decimal string: its residual value, which is not depreciated.",
>       "type": "string"
>     }
>   },
>   "type": "object"
> }
> ```

> [accordion] assets
>
> The company's register of fixed assets (inmovilizado), the most recently acquired first: a purchase booked to an asset account (source purchase) or an asset its imported books carry (source books). Each with its account, concept of the official table and coefficient (rate, rate\_min, rate\_max, percent a year), the day it was acquired and entered service, cost, land, residual value, the depreciation imported books hold for it (opening), what the books have depreciated by depreciated\_through (the last month that has ended, or the day it left), its net book value, the year's depreciation, its status (in\_use, fully\_depreciated, disposed), the day it left (disposal: write\_off or sale, with its result), review codes to check and its version. totals add up the assets still in the books; concepts lists the official table (art. 12.1.a LIS); books\_until is the last day the imported books cover.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {},
>   "type": "object"
> }
> ```

> [accordion] corporate\_tax
>
> The year's corporate tax (Impuesto sobre Sociedades, modelo 200) as Melso calculates it from the books and the saved inputs: result before tax, adjustments, capitalization reserve available and applied, negative bases, taxable base, rate, cuota íntegra and líquida, withholdings, instalments paid and what is left to pay, deferred tax and the books' charge; plus the 202 instalments that build on it, with deadlines. filed is the 200 filed for the year (null until it is recorded or Melso files it; differs when Melso's calculation no longer gives it), and once it is there the instalments build on it (last\_return\_filed). deadline\_passed: the 200's deadline is over, so the year was most likely filed. review lists what to check. version is the expected\_version for corporate\_tax\_update and corporate\_tax\_filed.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "year": {
>       "description": "The fiscal year, such as 2025.",
>       "maximum": 2100,
>       "minimum": 2000,
>       "type": "integer"
>     }
>   },
>   "required": [
>     "year"
>   ],
>   "type": "object"
> }
> ```

> [accordion] entry
>
> A manual entry proposal by its id, or the source\_id of its posted journal entry: its day, concept, lines and version.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "id": {
>       "description": "The manual entry's id: the source_id of a journal entry whose source_type is manual.",
>       "type": "string"
>     }
>   },
>   "required": [
>     "id"
>   ],
>   "type": "object"
> }
> ```

> [accordion] journal
>
> The company's libro diario in date order: each entry's number, kind (opening, normal, regularization, closing), source and lines with account, name, concept, debit and credit. account lists an account's ledger (libro mayor): only the entries that move an account starting with those digits, each with only that account's lines (other\_lines counts the rest). A full page carries next\_cursor.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "account": {
>       "description": "Only entries that move an account starting with these digits, e.g. 551 or 47300000.",
>       "type": "string"
>     },
>     "cursor": {
>       "description": "next_cursor of the previous page.",
>       "type": "string"
>     },
>     "from": {
>       "description": "First day YYYY-MM-DD.",
>       "type": "string"
>     },
>     "limit": {
>       "description": "Entries per page, 50 by default.",
>       "maximum": 200,
>       "minimum": 1,
>       "type": "integer"
>     },
>     "to": {
>       "description": "Last day YYYY-MM-DD.",
>       "type": "string"
>     }
>   },
>   "type": "object"
> }
> ```

> [accordion] opening\_balance\_preview
>
> Check an opening balance without saving it: the balances a company's books carry at the end of date (debit or credit by account, together balanced; VAT and the year's income and expenses included when the day is within a year), for a company whose earlier books are not imported. Answers what opening\_balance would save, how many of Melso's own entries it takes the place of (replaced) and what keeps it from being saved (problems).
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "date": {
>       "description": "YYYY-MM-DD: the balances are those at the end of this day, usually 31 December of the year before Melso keeps the books.",
>       "type": "string"
>     },
>     "lines": {
>       "description": "Each account's balance, debit or credit, up to 2000 lines that balance.",
>       "items": {
>         "additionalProperties": false,
>         "properties": {
>           "account": {
>             "description": "The account of the plan or its subaccount, 3 to 12 digits in groups 1 to 7.",
>             "type": "string"
>           },
>           "concept": {
>             "description": "The line's own concept, at most 300 characters.",
>             "type": "string"
>           },
>           "credit": {
>             "description": "EUR decimal string.",
>             "type": "string"
>           },
>           "debit": {
>             "description": "EUR decimal string; a line debits or credits, not both.",
>             "type": "string"
>           }
>         },
>         "required": [
>           "account"
>         ],
>         "type": "object"
>       },
>       "maxItems": 2000,
>       "minItems": 2,
>       "type": "array"
>     }
>   },
>   "required": [
>     "date",
>     "lines"
>   ],
>   "type": "object"
> }
> ```

> [accordion] statements
>
> The year's annual accounts in the PGC's normal model: the profit and loss account (cuenta de pérdidas y ganancias) and the balance sheet at the year's end, each line keyed as the modelo 200 files it, beside the year before. detail adds the accounts behind each line.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "detail": {
>       "description": "Include the accounts behind each line.",
>       "type": "boolean"
>     },
>     "year": {
>       "description": "The fiscal year, such as 2025.",
>       "maximum": 2100,
>       "minimum": 2000,
>       "type": "integer"
>     }
>   },
>   "required": [
>     "year"
>   ],
>   "type": "object"
> }
> ```

> [accordion] subaccounts
>
> The names the company gave its subaccounts (its customers, suppliers, banks, leasings...) in code order, each with its tax ID and source: import, from the list its accounting program exports, or manual. The journal, the trial balance and the ledgers name each subaccount so, before the name an imported journal carries. q finds a code by its first digits, or a name or tax ID by words; prefix keeps the subaccounts starting with it. total counts the matches; a full page carries next\_cursor.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "cursor": {
>       "description": "next_cursor of the previous page.",
>       "type": "string"
>     },
>     "limit": {
>       "description": "Subaccounts per page, 100 by default.",
>       "maximum": 500,
>       "minimum": 1,
>       "type": "integer"
>     },
>     "prefix": {
>       "description": "Only subaccounts starting with these digits, e.g. 430 for the customers.",
>       "type": "string"
>     },
>     "q": {
>       "description": "A code's first digits, or words of a name or a tax ID.",
>       "type": "string"
>     }
>   },
>   "type": "object"
> }
> ```

> [accordion] trial\_balance
>
> The year's trial balance (balance de sumas y saldos) from 1 January to to: by account, the balance carried into the year, the year's debit and credit and the balance at the end (debit positive, credit negative). Groups 6 and 7 start the year at zero; earlier results not yet applied show where the books reopened them (129 or 120). It leaves out the regularization, closing and reopening entries, so to 31 December (the default) gives the year's results before the closing; an earlier day drops that day's ordinary entries. Without prefix it groups by 4 digits; with prefix it shows the full subaccounts that start with it. At most 400 accounts are listed; accounts\_omitted counts the rest.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "digits": {
>       "description": "Group accounts by their first digits (3 for the plan's accounts); 0 keeps the books' subaccounts.",
>       "maximum": 12,
>       "minimum": 0,
>       "type": "integer"
>     },
>     "prefix": {
>       "description": "Only accounts starting with these digits, e.g. 47 for the tax accounts.",
>       "type": "string"
>     },
>     "to": {
>       "description": "Last day YYYY-MM-DD within the year; the year's end by default.",
>       "type": "string"
>     },
>     "year": {
>       "description": "The fiscal year, such as 2025.",
>       "maximum": 2100,
>       "minimum": 2000,
>       "type": "integer"
>     }
>   },
>   "required": [
>     "year"
>   ],
>   "type": "object"
> }
> ```

## Output

Read actions return the journal and ledgers, trial balance, annual accounts, corporate tax calculation, subaccounts, assets and their previews, or a saved journal proposal. Preview actions do not post entries. Use the action contract below and the returned schema for the selected result.

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. Check the tax accounts in the trial balance**

```json theme={null}
{
  "action": "trial_balance",
  "year": 2025,
  "prefix": "47"
}
```

**2. Read the corporate tax and note its version**

```json theme={null}
{
  "action": "corporate_tax",
  "year": 2025
}
```

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": "accounting_read",
    "arguments": {
      "action": "trial_balance",
      "year": 2025,
      "prefix": "47"
    }
  }
}
JSON
```


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