Skip to main content
Read-only actions. Import the books a company kept in another accounting program (ContaPlus, A3, Sage…) from the person’s files, sent in the Melso chat (attachment_id) or uploaded from another client with upload (upload_id), as the program exports them: its libro diario (book journal), its VAT books (book issued: facturas expedidas, saved as income; book received: facturas recibidas, saved as expenses), which the 303, 390, 347 and 349 then count, and its list of subaccounts (book subaccounts: each one’s name and NIF), which names the books’ subaccounts. read shows what a file holds and what keeps it from being saved; import saves it whole or not at all. Import journals oldest first: a year’s opening then reopens the year before’s books. list shows the imports, opening balances included; delete can remove an unposted VAT book, but posted journals and opening balances stay immutable and require explicit reversals in the app. A refused file is never fixed by hand: the person exports it again. Books with no journal to import open with accounting opening_balance. Each action accepts only its own fields (* required): read(book*, attachment_id, upload_id); list. 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. The live tool list is authoritative: the company’s plan and your role can narrow this contract. Understand access.

When to use

Use book_imports_read for list, read. Use book_imports for the companion actions. The live tool list determines availability.

Input

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.
The journals and VAT books the company imported, the latest first: each with its id, file name, period and counts.
Read a journal or VAT book the person gave without saving it, named with attachment_id or upload_id. A journal answers its period, entries, lines and debit total, its kinds (opening, reopening, regularization, closing), how many of Melso’s own entries it replaces, and opening_differences when its opening does not carry the balances the imported books end with. A VAT book answers its period, invoices, those already in Melso (duplicates), the new ones, their totals by kind and rate as the 303 counts them, and the invoices to review. problems and can_save say what keeps it from being saved. A list of subaccounts answers how many it names and with a tax ID, those Melso has no name for yet (new), those it renames (changed), how many the books move (in_books), a sample and the rows it skips (the plan’s own accounts, groups 8 and 9, rows without a name).

Output

read returns what a journal, VAT book or subaccount list holds and the checks that determine whether it can be saved. list returns prior imports, latest first. 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 the journal without saving it

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.