Skip to main content
Glama
jaakla

Merit MCP

Merit Write Sales

merit_write_sales
Read-only

Create, delete, and credit sales invoices. Send invoices via email or e-invoice. Returns details and confirmation code for review before executing.

Instructions

Preview-only write tool. Does not execute changes; returns intended operation details and a confirmation_code for merit_write_sales_confirm. Create, delete, and deliver sales invoices. Actions: sales_invoice_create: Create a draft sales invoice through Merit v1 /sendinvoice. The payload is passed through to Merit and must use the create schema, not the invoice_get response shape. Required shape: Customer.Id, DocDate, TransactionDate, and DueDate as YYYYMMDD strings, mandatory string InvoiceNo, CurrencyCode (usually EUR), PriceInclVat (usually false), optional FComment footer note, singular InvoiceRow list, TaxAmount list, and TotalAmount. Each InvoiceRow item must use Item={Code, Description, UOMName}, Quantity, Price, row-level TaxId GUID, and Account. Gotchas: use InvoiceRow (singular), not InvoiceRows; Merit will not auto-assign InvoiceNo, so read merit_read_sales action=invoices_list and use the next integer; UOMName belongs inside Item; use Account, not AccountCode; use TaxId GUID, not TaxName or TaxPct; TaxAmount is required even for zero VAT, e.g. [{'TaxId': '', 'Amount': 0}]; TotalAmount is required and should match the row Price x Quantity total. For Googolplex no-VAT 'Ei ole käive', the known TaxId is 7e170b45-fe96-4048-b824-39733c33e734; verify with merit_read_master_data action=taxes_list if it changes. Do not include DelivNote/delivnote=true in invoice creation payloads; invoices should remain undelivered drafts and delivery is handled manually in Merit.; sales_invoice_delete: Delete a sales invoice by id.; credit_invoice_create: Create a credit invoice.; sales_invoice_send_email: Send a sales invoice by email. This delivers the invoice; do not use it in the normal draft creation flow where delivery is handled manually in Merit. Keep delivnote=false unless the user explicitly asks for delivery note mode without prices.; sales_invoice_send_einvoice: Send a sales invoice as e-invoice. This delivers the invoice; do not use it in the normal draft creation flow where delivery is handled manually in Merit. Keep delivnote=false unless the user explicitly asks for delivery note mode without prices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
idNo
filtersNo
payloadNo
add_attachmentNo
delivnoteNo
bank_idNo
confirmation_codeNo
confirmedNo
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses it is preview-only and does not execute changes, but the annotation readOnlyHint=true contradicts this, as the tool performs write operations (even if only preview). This is a serious inconsistency, lowering the score despite some transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but not wasteful; it front-loads the key preview-only nature then covers actions and gotchas. Some sections are run-on but necessary for the complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with multiple actions and no output schema, the description adequately covers return value (operation details and confirmation_code). It provides gotchas and references sibling tools. However, some parameter descriptions are lacking, and the contradiction with annotations reduces completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must compensate. It does explain the 'action' parameter by listing actions and the 'payload' parameter in great detail for sales_invoice_create. However, other parameters (id, filters, add_attachment, bank_id, confirmation_code, confirmed, delivnote) are not explicitly explained, though some context is given via action descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it's a 'Preview-only write tool' that handles multiple actions (create, delete, deliver, credit, send email/e-invoice). It distinguishes from sibling tools like merit_write_sales_confirm by mentioning confirmation code and preview nature.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use (for preview, not execution) and when not (e.g., not to use send actions in normal draft creation flow). It also references sibling tools (merit_read_sales, merit_read_master_data) for verification and provides conditions for delivnote use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jaakla/merit_api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server