Skip to main content
Glama
jaakla

Merit MCP

by jaakla

Merit Write Sales Confirm

merit_write_sales_confirm
Destructive

Confirm a previewed sales write operation to create an unsent accounting invoice in Merit. Requires confirmation_code and confirmed=true; not an unposted draft.

Instructions

Confirmed mutating tool. Executes a previously previewed write operation from merit_write_sales when called with confirmation_code and confirmed=true. Create unsent accounting invoices, not unposted drafts. Delivery (email/e-invoice), deletion, and credit invoices are handled manually in Merit and are not exposed by this server. Actions: sales_invoice_create: Create an unsent accounting invoice through Merit v1 /sendinvoice, NOT an unposted draft. Restricted schema: Customer={Id: customer GUID}; DocDate, TransactionDate, DueDate as YYYYMMDD; InvoiceNo (string), CurrencyCode='EUR', PriceInclVat=false, singular InvoiceRow list, TaxAmount, TotalAmount (VAT-exclusive). Optional FComment and HComment text. Each row requires Item={Code, Description, UOMName}, Quantity>0, Price>=0, TaxId GUID, Account. Read items_list first; Code must exactly match an existing non-stock item. The server verifies items again at confirmation and refuses missing, stock, or unrecognized items. Do not supply Item.Type. Use InvoiceRow (singular), not InvoiceRows; UOMName belongs inside Item, not on the row. Resolve company-specific TaxId GUIDs via taxes_list; never invent them. TaxAmount entries are {TaxId, Amount>=0} and must cover exactly the row TaxIds. TotalAmount must be positive and match the sum of row Quantity × Price, rounded per row to cents. Unknown fields are rejected at every level, including Payment, AccountingDoc, DelivNote, discounts, rounding adjustments, and item-creation fields. Negative quantities/prices are not supported. Choose InvoiceNo using the company's numbering convention; no automatic allocation is provided. Confirmation creates a real, unsent accounting invoice in Merit. It can affect the ledger and reports before delivery; this is NOT an unposted draft. Only the preview is non-writing. Review before confirming; send manually in Merit.

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0
    • changedInput schema / properties / filters / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / payload / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "items": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description adds the consequences the annotations cannot convey: the result is a real unsent accounting invoice that affects the ledger and reports before delivery, it is explicitly not an unposted draft, the server re-verifies items at confirmation and refuses missing/stock/unrecognized ones, and unknown fields are rejected at every level.

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

Conciseness3/5

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

Front-loaded with the confirmation contract, but the body is dense and repeats the same point three times ('not unposted drafts', 'NOT an unposted draft', 'NOT an unposted draft'). A single statement of that constraint would free space for the undocumented top-level parameters.

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 destructive, 9-parameter write tool with no output schema, the description covers the mutation's real-world effect, the item re-validation behavior, and most payload constraints. It falls short only on the several top-level parameters left undocumented and the absence of any return/result expectation.

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 the description carries the full burden. It does heavy lifting on the payload shape (InvoiceRow singular, Item={Code,Description,UOMName}, Quantity>0, Price>=0, TaxId, TaxAmount, TotalAmount rules) and on confirmation_code/confirmed, but the top-level id, bank_id, filters, and delivnote parameters are never explained. Partial compensation, not full.

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?

States a specific verb and resource ('executes a previously previewed write operation from merit_write_sales') and pins the trigger condition (confirmation_code plus confirmed=true). It explicitly separates itself from the sibling merit_write_sales, which only previews, so an agent can distinguish the two without opening either schema.

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?

Gives explicit sequencing ('Read items_list first', 'Resolve company-specific TaxId GUIDs via taxes_list'), states the preview-vs-confirm relationship with merit_write_sales, and names what is out of scope (delivery, deletion, credit invoices handled manually in Merit). When-not-to-use guidance is effectively present via 'Review before confirming; send manually in Merit.'

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