Skip to main content
The company’s contacts: its customers and suppliers, one per counterparty, with the fiscal details the person, you or a document gave once (tax ID, address, email, phone, a supplier’s IBAN). Look one up before asking for its details, and save what the person tells you. Reading an invoice or receipt with expenses from_document saves its supplier or customer too, never over what a contact already holds. Changing a contact never changes an issued invoice’s frozen customer. Each action accepts only its own fields (* required): upsert(address, city, country, email, iban, id, is_customer, is_supplier, kind, name, notes, phone, postal_code, province, tax_id); merge(source_id*, target_id*); delete(id*). Availability: Autónomo / 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 contacts for delete, merge, upsert. Use contacts_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.
Delete a contact the person asks to remove. Refused if an invoice names it: merge duplicates instead. Existing income, expenses and their evidence are retained.
Merge duplicate contacts when the person asks. Read both first and choose which id to keep as target_id. Keeps the target’s populated fields, fills missing data, combines customer/supplier roles and notes, moves invoice associations and remembers the source’s identity for income, expenses and future document intake. Fiscal documents and posted history stay unchanged. Different nonempty fiscal identities are refused. Retrying the same source and target is safe.
Save what the person tells you about a customer or supplier, so it is there next time. With id, only the fields given change (an empty string clears one). Without id, name is required and a contact with the same tax ID is completed instead of duplicated: the fields given replace its own, empty ones keep them and is_customer or is_supplier true adds that role. Never invent a value.

Output

upsert returns the saved contact. merge returns the kept contact after combining compatible duplicate identities; fiscal documents remain unchanged. delete returns a deletion receipt and refuses a contact named by an invoice. 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

Save a new customer

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.