Skip to main content
Payroll: employees (contract, modelo 145), contracts, labour settings; contract_submit sends one to Contrat@. run_create opens a draft; payslip_update records changes. approve, reopen, paid, unpaid only when the person asks. siltra_file_generate writes a SILTRA file. red_response_import, fie_import take no file: share web_upload_url. Melso sends nothing to SILTRA or banks. Required fields: employee_create(name, start_date); employee_update/run_delete/contract_delete/contract_submit/siltra_file_generate/red_response_import/strike_delete(id); run_create(period); payslip_update(id, payslip_id, expected_version, incidents); recalculate/approve/reopen/paid/unpaid(id, expected_version); contract_create(employee_id, contract); contract_update(id, contract); settings_update(expected_version, settings); document_record(id, kind); strike_record(strike). Availability: Self-employed / Company / Gestoría. Listed to a company and to a self-employed person on Pro or Plus, unless the company switched Nóminas off in Settings → Modules. Melso sends nothing to SILTRA or a bank: the company or its gestoría sends the files. 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 payroll for approve, contract_create, contract_delete, contract_submit, contract_update, document_record, employee_create, employee_update, fie_import, paid, payslip_update, recalculate, red_response_import, reopen, run_create, run_delete, settings_update, siltra_file_generate, strike_delete, strike_record, unpaid. Use payroll_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.

Payroll actions

These actions change employees, contracts, labour settings or a month. approve, reopen, paid and unpaid take the version the person reviewed, only when they ask. Melso sends nothing to SILTRA or a bank; contract_submit sends a contract to Contrat@ when the person asks.
Approve a draft month at the version the person reviewed, when they ask for it: its payslips freeze and feed the 111, the 190 and the books’ journal proposal. Refused while an employee has no payslip (payroll_issues), an earlier month of the year is a draft (previous_run_not_approved), or a 111 or 190 already approved or filed covers its pay date (fiscal_period_locked).
Register an employee’s contract, extension or conversion, with what Contrat@, the affiliation files and the written contract need. Only what the person confirmed; ask for what you do not know (the clave, the CNO-11 occupation, the group).
Delete a registered contract; the employee’s terms follow the contracts left. Only when the person asks for it. A contract sent to Contrat@ and not rejected (a send pending, received or unknown) is refused with contract_sent_to_contrata: a change is a correction, made in Contrat@. One whose alta was recorded as done in Sistema RED is refused with contract_alta_in_red while RED still lets that alta be deleted: the person deletes it in RED and undoes its record in the Seguridad Social tab first.
Send a registered contract, extension or conversion to the SEPE’s Contrat@ as the company’s own Contrat@ user, which Melso keeps sealed (its CIF, NIF or NIE and the clave personal of its SEPE authorization for Contrat@), within the 10 days art. 8.3 ET gives, when the person asks: the answer is the shipment’s number, or the error the SEPE refused the file with (fix the data and send it again). A contract the SEPE received is not sent twice. A pending send blocks a repeat; contrata_outcome_unknown requires checking Contrat@, never an automatic resend. Only an explicit rejection permits a corrected retry. contrata_credentials_missing means the company has not saved that user: whoever manages its payroll saves it in the payroll settings of the Melso web app, and never tells you the key; a company with no authorization for Contrat@ asks the SEPE for it first. contrata_unavailable means this deployment sends nothing. In both cases the person may upload the contrata file (file, scope contract) in Contrat@ themselves.
Replace a registered contract whole: read it with contracts and send every key with your change (without document, its written terms stay as they are). The drafts of the months it reaches are calculated again. Only what the person confirmed.
Record what the person says happened, replacing a contract’s earlier record of the kind: information_notice (requested_on; delivered_on with channel; file_id, the copy received, needs delivered_on; the law asks for proof, not a signature) or signed_contract (file_id, to contract_id or the employee). Keep the file first with documents save. Answers documents
Add an employee with their contract and modelo 145 (profile). Without a profile the employee is saved and each month’s payroll lists them as incomplete. Only what the person confirmed.
Change an employee: only the fields supplied change, and in profile only the keys supplied (tax replaces the whole modelo 145). An employee with contracts registered in the web app keeps their terms and dates: contract, group, the hours, category, start_date and end_date follow those contracts, and a start_date or end_date none of them gives is refused (payroll_dates_from_contract). end_date is only the agreed end of a fixed-term contract, never a baja: a resignation, dismissal or end of contract is the termination of that month’s payroll (payslip_update), and active stays true until that month is approved, since an inactive employee is left out of the month. Draft months take the change on recalculate; approved ones keep what they were calculated with. Only what the person confirmed.
Import an FIE file the person downloaded from SILTRA (the INSS’s Mensaje de I.N.S.S. Empresa, version 5.0): each sick leave it reports is kept for its employee, matched by NAF or NIF, and a later file brings its confirmations, its discharge or its annulment; a newer file that gives a kept leave another Fecha baja IT (the employee’s leave whose days it overlaps) corrects it, the newest file’s date prevailing (corrected: each leave’s from and to); the same file again changes nothing (duplicate). The draft months the leaves touch are calculated again (recalculated); approved months stay as they were. Answers created, updated, unchanged, the leaves, and unmatched (the NAF or NIF of workers who are no employee: add them and import the file again). In the Melso chat, name the file the person sent with attachment_id. Another client cannot send it: the answer carries web_upload_url, the payroll’s Bajas page, where the person imports it with Importar FIE.
Record what changed in a draft month for one employee and calculate the month again: incidents replaces the payslip’s incidents whole, so read them with payslip and send the full set. An employee’s baja (resignation, dismissal, end of contract) is recorded here, as the termination of the month it happens in (its date and cause): the payslip becomes the finiquito, employees lists it as leaving_on, and approving the month sets settled_on and leaves the employee out of later months. Only what the person confirmed.
Calculate a draft month again with the employees’ contracts as they are now, keeping each payslip’s incidents.
Import a file the person downloaded from SILTRA into its month, an approved one: a Fichero de Respuesta (to any file sent) or the month’s Fichero de Cálculos, told by its content, never by its name. Answers the file read (duplicate: the same file was imported before, and its first import stands) and the month as red_responses reads it. In the Melso chat, name the file the person sent with attachment_id. Another client cannot send it: the answer carries web_upload_url, the month’s page, where the person imports it with Importar respuesta de SILTRA. Melso sends nothing to SILTRA.
Take an approved or paid month back to draft at its version, when the person asks for it, to change it: its payment record goes too. Refused for a draft (payroll_not_approved), while a later month of the year is approved or its journal entry is posted, or when a 111 or 190 already approved or filed covers its pay date (fiscal_period_locked).
Open a month’s payroll as a draft: a payslip for each employee employed in it, with the leaves still open the month before carried over. A month missing before later ones is added too: the year’s later drafts are calculated again and the next one regularizes the withholding. Refused while an earlier month of the year is a draft (previous_run_not_approved), or when a 111 or 190 already approved or filed covers its pay date (fiscal_period_locked).
Delete a draft month and its payslips. Only when the person asks for it.
Change the company’s labour data at its version: only the keys supplied change (accounts replaces the whole list, so send every account). Only what the person confirmed.
Generate a new attempt of an approved month’s file for SILTRA, when the person asks. kind is the cycle’s next_kind by default: the Fichero de Bases first, the file red_responses’ proposal names to mend the month, and once SILTRA says the L00 is confirmed (R9566), its rectification within the term: its bases are refused (siltra_liquidation_confirmed). Written in the background from the approved payslips and employees’ data as they are now, so correct what the TGSS refused first (employee_update, or reopen, fix and approve the month). Answers the attempt queued. Refused for a draft (payroll_not_approved) or while another is queued (siltra_file_pending). Melso sends nothing to SILTRA: the person sends the file and, once it cuadra, confirms the liquidation there.
Delete a strike recorded by mistake; the draft months it touched are calculated again and approved_months keep it until reopened. What was sent to SILTRA stays there: an inactivity already communicated is removed in SILTRA. Only when the person asks for it.
Record that an employee went on strike, with employee_id and the strike, or correct a recorded one with its id (the strike whole: its end once it is over). The person says the days and whether they stopped the whole day or part of it; for a partial one ask the part of the day worked. Never record a strike as unpaid days: this is what the payroll and the AFI read. The draft months it touches are calculated again; approved_months are the approved ones it touches, which keep what they were approved with until the person reopens them; unpaid_days_months are draft months whose payslip also has unpaid days: if one was this strike, as the chat recorded strikes before, remove it with payslip_update, or the day is taken off twice. Refused when it overlaps another of the employee’s strikes (strike_overlaps), starts or ends outside the employment (strike_outside_employment) or is a partner in the RETA’s (payroll_strike_reta). Then give the person the strike’s AFI file (file or file_attach with scope strike) to send through SILTRA, by the term the guides’ strike rule gives (fiscal_reference); Melso sends nothing. Only what the person confirmed.
Undo a month’s payment record at its version, when the person says it was not paid: the month is approved again. Refused unless the month is paid (payroll_not_paid).

Output

Each action returns the saved employee, contract, settings or month. run_create returns a draft month; payslip_update and recalculate the month calculated again. approve, reopen, paid and unpaid return the month at its new status and version, or a refusal code such as previous_run_not_approved or fiscal_period_locked. contract_submit returns the Contrat@ shipment number or the SEPE’s error. siltra_file_generate returns the attempt queued. red_response_import and fie_import return a web_upload_url where the person imports the file in the web app. Melso sends nothing to SILTRA or a bank. 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

Open October as a draft

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.