Skip to main content
automate posts what evidence settles in open periods, again while has_more; post, a prepared manual entry (retry: same operation_key). Entries balance, never VAT. stock_count_set: stock at cost the person states, never estimated. Rectify a filed 200 only if asked. Amounts: EUR decimal strings. Required fields: post(source_type, source_id, expected_fingerprint, operation_key); corporate_tax_update(year, expected_version); corporate_tax_filed(year, expected_version, filed_on, payable); legalisation_prepare(year); stock_count_set(year, expected_version, stock); subaccount_set(account, name); subaccount_delete(account); reverse(id, reason); close/reopen(year, reason); asset_create(name, account, cost, acquired_on, opening); asset_update/entry_update(id, expected_version); asset_dispose(id, expected_version, kind); asset_disposal_undo/asset_delete/entry_delete/cost_center_delete(id); entry_create(date, concept, lines); opening_balance(date, lines); cost_center_assign(sources, cost_centers). Availability: Company / Gestoría. Gestoría: every action, in the client the call names: add client, the client’s id from clients_read list. Melso for gestorías explains what a firm’s connection does. The live tool list is authoritative: the company’s plan and your role can narrow this contract. Understand access.

When to use

Use accounting for asset_create, asset_delete, asset_disposal_undo, asset_dispose, asset_update, automate, close, corporate_tax_filed, corporate_tax_update, cost_center_assign, cost_center_delete, cost_center_set, entry_create, entry_delete, entry_update, legalisation_prepare, opening_balance, post, reopen, reverse, stock_count_set, subaccount_delete, subaccount_set. Use accounting_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.

Write actions

These actions change the books: they save the corporate tax’s inputs, post and reverse entries, and close or reopen a year. None approves or files the 200.
Record an asset the company’s imported books carry, which Melso depreciates from the day after the opening: its name, account, cost, acquisition day within those books and what they depreciated (opening). A new purchase becomes an asset by itself when it is booked to an asset account (expenses update account): never record it here. Only when the person asks.
Delete an asset recorded from imported books and its unposted depreciation proposals. Posted history stays; automate appends eligible reversals/corrections in open periods. A purchase’s asset goes with its purchase. Only when the person asks for it.
Undo an asset disposal in its register and recalculate its journal proposals. Posted entries remain unchanged and need explicit reversal and correction in the app. Not for a year whose corporate tax was filed.
Record an asset disposal in its register: written off on date, or sold by an income or issued invoice on its day. Recalculate depreciation and loss or sale proposals without changing posted entries. Run automate to post or correct eligible sources in open periods. Only when the person asks.
Change how an asset is named and depreciated, at expected_version from asset or assets: only the fields supplied change, and an empty one goes back to what the asset follows. A year whose corporate tax was filed keeps the depreciation it was booked with; the change applies from the year after. A purchase’s account, cost and day follow the purchase. Answers the asset with its new table.
Run a bounded pass of the company’s automatic bookkeeping: assign safe bank subaccounts, reconcile unambiguous evidenced document matches, post eligible source entries and correct changed or deleted sources with dated reversals and replacement entries in open periods. The server validates amounts, source fingerprints, imported coverage and period ordering; it never guesses missing facts or alters closed periods. No paid manual tools or per-entry confirmation is needed. Omit year or send 0 for all history. Counts report actual effects of this pass; already_posted counts sources already in the books and unchanged, so posted 0 with already_posted above 0 means they were posted earlier (usually automatically when registered), not that nothing is posted. blocked identifies unresolved sources. Repeat while has_more is true to finish eligible work; repeated passes converge without duplicate source effects, rather than replaying an identical response. No action approves, files or pays a tax return.
Close a finished year: post its regularization (129), closing and next year’s opening entries and lock its periods. Again it answers already_closed. Only when the person asks.
Record that the year’s 200 was filed outside Melso, as by the company’s previous adviser: the day and the result filed (casilla 01586 of the return, negative for a refund), which must equal what Melso calculates for the year (corporate_tax_get); when it does not, the answer refuses with Melso’s figure, and the adjustments or inputs need correcting first. The 202 instalments then build on the return filed and a later change to the year is a rectification. Record a rectification filed later the same way. It files and pays nothing.
Save what the year’s corporate tax needs beyond the books, at expected_version from corporate_tax_get: only the fields supplied change. Answers the recalculated tax. It does not approve or file the 200: a member of the company approves the return in the app and Melso’s professionals file it.
Share records among cost centres, replacing how each was shared: one centre at 100, or several by percentage (a shared expense, 60 and 40), adding up to at most 100; what they leave is the record’s without a centre. An empty cost_centers takes the records out of every centre. Up to 200 records at once, all shared the same way. It is analytic: it changes no record, journal entry, review or tax return, so it applies to issued invoices and closed periods too. A corrective invoice starts with its original’s centres.
Delete a cost centre nothing names. One a record, a journal line or a manual entry names is refused (cost_center_in_use): archive it instead. Only when the person asks.
Add a cost centre (without id) or change one (with id): its name, its code as another program writes it (an imported journal’s analytic column matches it; empty removes it) and whether it is archived. Only fields supplied change. Use it when the person names a new obra, shop or business line.
Prepare a manual entry proposal for an accrual, provision, stock count, result application, loan reclassification or correction. Its lines balance, each debits or credits one account, and none is VAT (472, 477). Its day is after imported books, up to today and outside locked periods or a year whose corporate tax was filed. This action saves a draft. To finish a deliberately prepared adjustment, read its current proposal and post its exact source fingerprint with accounting post. Bulk automation never posts saved manual drafts. Year-end closing remains a separate reviewed operation. Use verified business facts.
Delete an unposted manual proposal. An active posted entry must first be reversed in the app. Only when the person asks for it.
Change an unposted manual proposal at expected_version from entry: only supplied fields change, and lines replaces them all. Refused while its posted entry remains active, or for a locked day. Reverse the posted entry in the app before correcting its proposal.
Generate a closed year’s books for the Registro Mercantil and their package (anexo I of the Instrucción DGRN de 12 de febrero de 2015: a ZIP with NOMBRES.TXT, DATOS.TXT and DIARIO_001.XLSX and INV_CUEN_001.XLSX) and record the generation: the books’ fingerprints and who generated it. Answers legalisation_get with the new generation first, and package: the ZIP as content_base64 (above 256 KB a person’s own AI client gets download_url, a link for 5 minutes, instead). A draft: the person adds what to_complete lists and the Registro’s details (code, tomo, folio, hoja), signs and sends it. Melso presents nothing. Refused for a year not closed (legalisation_year_open) or without the company’s legal name and tax ID (legalisation_profile_required).
Save confirmed opening balances as one posted import up to their day. book_imports list shows it; posted imports cannot be deleted. Journal-import corrections use book_imports read/import with explicit replacement options, the reviewed books fingerprint, reason, stable operation_key and the person’s authorization, preserving original evidence. Opening-balance adjustments require explicit reversals in the app. Later documents are processed by automatic bookkeeping, and an earlier asset can be recorded with asset_create. Only once the person confirmed the balances from their last balance de sumas y saldos or adviser.
Post one exact saved manual adjustment deliberately prepared from verified facts. Read its source_id and fingerprint from proposals, and send source_type manual and fingerprint as expected_fingerprint with a replay-stable operation_key. The server derives and validates all lines; no raw lines, date or concept may be supplied. A changed fingerprint, active posting, imported coverage or closed period is refused. All other sources must use automate and its complete readiness checks; never create a duplicate manual adjustment for a document. This does not reverse entries, close a year, approve, file or pay a tax return.
Reopen a closed year: its year-end entries are reversed at their dates and its periods unlocked. A later closed year is reopened first. Only when the person asks.
Post a dated reversal of a posted journal entry, by its id from journal: the entry stays and the reversal cancels it, on a day not before it and outside a closed period. Correct a source afterwards and automate posts it again. Only when the person asks.
Save the year’s stock count at expected_version from stock_count_get: what the person says was left on 31 December, valued at cost (NRV 10ª: purchase price, never the selling price), by stock account. The whole count is replaced; an empty stock says there was none. Its entry is proposed like any other and automatic bookkeeping posts it, then the corporate tax and the year’s closing read the result. Never invent or estimate the figures: ask the person for them. Refused for a year not ended yet, a closed month or year, the imported books’ days, or a year whose stock the person’s own entries book.
Forget the name and tax ID the company gave a subaccount: its lines stay in the books, named as an imported journal or the plan names them. Only when the person asks for it.
Name one of the company’s subaccounts, adding it or correcting it: its code as the books keep it, the name of whom it keeps and their tax ID. It names the books’ lines and moves no amount. Omitting tax_id keeps the saved one; an empty tax_id removes it. A whole list from the person’s program is imported with book_imports (book subaccounts).

Output

Write actions save corporate tax inputs or an externally filed return, subaccount names, assets or journal proposals. Opening balances create a posted import. Journal proposals require explicit posting in the app; posted history changes through explicit reversals. No action approves, files or pays a return. 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

Save a non-deductible fine at that version

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.