Skip to main content
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): import(book*, attachment_id, upload_id); upload(filename*, content_type*, size_bytes*); delete(id*). Availability: Empresa. Access: Live for an empresa, in the app and over MCP when the connection lists book_imports. Journal and VAT-book REST imports are private beta. Posted journals cannot be deleted here. Correct them with reversals in the app. 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 for delete, import, upload. Use book_imports_read 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.

Import actions

upload returns a link, import saves a file whole or not at all and delete removes an unposted VAT book. They need a plan with the tools. Posted journals stay immutable.
Delete an unposted VAT book by its id from list, removing its imported income or expenses. Posted journals remain immutable and return posted_journal_immutable; correct them with reversal entries in the web app. A VAT book is refused (period_filed) while a 303 that counts its invoices is approved or filed. Only when the person asks for it.
Save a journal, VAT book or list of subaccounts the person gave, whole or not at all. A journal’s entries become the company’s books up to its last day; a VAT book’s new invoices become income (issued) or expenses (received), leaving out those already in Melso; a list of subaccounts names each one it gives, and sets its tax ID when the list has one, keeping the company’s other subaccounts. A refusal names its code (already_imported, overlaps_import, later_import, opening_differs, future_entries, nothing_new, or the row of an unreadable or unbalanced file): explain it to the person and never retry with a file you edited.
Get a link to upload the journal, VAT book or list of subaccounts as the accounting program exports it (at most 10 MB) when you can run commands: PUT the file to upload_url, then call read and then import with book with upload_id. Without a shell, give the person web_upload_url to upload it in Contabilidad instead.

Output

upload returns an upload link and its upload_id. import saves the file whole or refuses it with a code. delete removes an unposted VAT book; posted journals stay immutable. 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

Ask for an upload link

2

Save it whole

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. Write actions change data.