Skip to main content
Record the company’s invoices and receipts. from_document reads one, issued or received, and records it as income when the company issued it or as an expense otherwise, keeping its file in Documents: give a file attached in ChatGPT as file, a link as url, or upload_id after upload and a PUT to its upload_url; in Claude and ChatGPT, upload_files opens Melso’s upload box instead. create records one by hand; update needs expected_version from get. Ask the person only whether an undecided expense belongs to their activity, and save just id, expected_version and deductible. Amounts are EUR decimal strings. An expense a return Melso approved or filed covers cannot be deleted; a return recorded as filed outside Melso does not stop that. Actions (* required): create(date*, total*, …); from_document(…); update(id*, expected_version*, …); upload(filename*, content_type*, size_bytes*); delete(id*, reason). Availability: Self-employed / Company. The live tool list is authoritative: the company’s plan and your role can narrow this contract. Understand access.

When to use

Use expenses for create, delete, from_document, update, upload. Use expenses_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 data. The server lists them only with a plan that includes the tools.
Record an expense from explicit evidence. A document needs its supplier and commercial amounts, or vat_lines. A without_invoice fiscal record keeps its signed income-tax measure separate, with fiscal_only effects and no invented supplier or payment. For a photo or PDF use from_document instead.
Delete an expense recorded by mistake, such as a duplicate, after the person confirms. Its file stays in Documents. Refused when a tax return Melso approved or filed covers its date: change it in the web app and file a correction. A return recorded as filed outside Melso does not stop it.
Read an invoice or receipt (PDF or photo) and record it: as income when the company issued it (its tax ID is the issuer’s), as an expense when anyone else did. The server reads it, checks the amounts, judges deductibility and stores it in Documents; each read is billed to the company’s credit. Give exactly one source. attachment_id (a file sent in this chat) is read now and answers the record and review codes. direction_unknown means the issuer reads like the company but its tax ID is not on the document: ask whether they issued or received it and retry with direction. country_unknown means ask the supplier/customer country and retry with counterparty_country and the direction from the answer. billed_to_another (source gmail) means a document read from mail bills another company: it stays out of these books. duplicate true means the document is a record already there: an expense with its supplier and number, or income with its number, customer, date and total. number_taken means another invoice is recorded as income under this invoice’s number (existing): two invoices cannot share a number, so tell the person this one must be issued again under a new number. url (an HTTPS download link, such as a file-sharing link) or file_id (a file already in Documents) is read in the background: the call answers a job_id at once and records nothing yet; call document_status to see what each became. Several documents can be queued one call each. upload_id (a file you uploaded with upload) is read in the background too. In ChatGPT, which cannot upload, pass a PDF or photo the person attached as file: it is read in the background like a url. In the Melso chat, an invoice attached to an email in the person’s connected mail is given by mail_message_id instead of a download link: Melso fetches it from the mail, reads it in the background, and in Gmail confirms in that email’s conversation with a note only the person receives.
Edit supplied fields at expected_version. A customer activity answer sends only deductible and preserves technical review codes, even when totals need review. Changed activity clears VAT entitlement; yes preserves professional allocations, no clears expense and VAT deduction overrides. Other edits recheck amounts and file access. Customer edits preserve internal review codes for Melso’s professionals; changed VAT evidence needs fresh fiscal review. Never ask the customer to settle VAT or technical warnings.
Get a link to upload a local PDF or photo (at most 15 MB) when you can run commands: PUT the file to upload_url, then call from_document with upload_id. In ChatGPT, pass a file the person attached to from_document as file instead. Without a shell, give the person web_upload_url to drop the files there.

Output

create, update and from_document return the saved record. upload returns the upload link and a web upload link. delete returns a deletion receipt. 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.

Declared output schema

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

Read the uploaded file

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.