Skip to main content
Glama
iseppo

e-arveldaja MCP Server

by iseppo

Create Purchase Invoice

create_purchase_invoice

Create a draft purchase invoice with exact VAT and gross amounts, supplier details, line items, and currency or exchange rate data for accurate payment matching.

Instructions

Create a draft purchase invoice. Direct-call contract: pass exact invoice vat_price/gross_price; non-EUR requires cl_currencies_id + currency_rate (foreign units per 1 EUR, e.g. USD 1.08); base_* may lock actual EUR settlement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesItems [{custom_title, cl_purchase_articles_id, purchase_accounts_id, purchase_accounts_dimensions_id?, total_net_price, amount, vat_rate_dropdown?, vat_accounts_id?, vat_accounts_dimensions_id?, cl_vat_articles_id?, project_no_vat_gross_price?, cl_fringe_benefits_id?}]. purchase_accounts_dimensions_id is REQUIRED when the expense account has dimensions; same for vat_accounts_dimensions_id on dimensioned VAT accounts. Non-VAT EUR invoices may post VAT to the same cost account/dimension with article 11 and one document rate.
notesNoNotes
numberYesInvoice number
term_daysYesPayment term in days
vat_priceYesTotal VAT amount from original invoice (EXACT, for payment matching). Required — confirm_purchase_invoice fails without it.
clients_idYesSupplier client ID
client_nameYesSupplier name
create_dateYesInvoice date (YYYY-MM-DD)
gross_priceYesTotal gross amount from original invoice (EXACT, for payment matching). Required — confirm_purchase_invoice fails without it.
journal_dateYesTurnover date (YYYY-MM-DD)
currency_rateNoExchange rate as foreign currency units per 1 EUR (ECB convention, e.g. USD 1.08; EUR = amount / rate). Required when cl_currencies_id != EUR.
base_net_priceNoEUR equivalent of net_price; auto-derived from currency_rate when omitted.
base_vat_priceNoEUR equivalent of vat_price; auto-derived from currency_rate when omitted.
bank_account_noNoSupplier bank account
bank_ref_numberNoPayment reference number
base_gross_priceNoActual settled EUR gross total; auto-derived from currency_rate when omitted.
cl_currencies_idNoCurrency (default EUR)
liability_accounts_idNoLiability account (default 2310)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.32.1
    • changedInput schema / properties / items / description
      Previous value: -"Items [{custom_title, cl_purchase_articles_id, purchase_accounts_id, purchase_accounts_dimensions_id?, total_net_price, amount, vat_rate_dropdown?, vat_accounts_id?, vat_accounts_dimensions_id?, cl_vat_articles_id?, project_no_vat_gross_price?, cl_fringe_benefits_id?}]. purchase_accounts_dimensions_id is REQUIRED when the expense account has dimensions; same for vat_accounts_dimensions_id on dimensioned VAT accounts."New value: +"Items [{custom_title, cl_purchase_articles_id, purchase_accounts_id, purchase_accounts_dimensions_id?, total_net_price, amount, vat_rate_dropdown?, vat_accounts_id?, vat_accounts_dimensions_id?, cl_vat_articles_id?, project_no_vat_gross_price?, cl_fringe_benefits_id?}]. purchase_accounts_dimensions_id is REQUIRED when the expense account has dimensions; same for vat_accounts_dimensions_id on dimensioned VAT accounts. Non-VAT EUR invoices may post VAT to the same cost account/dimension with article 11 and one document rate."
  2. Changed2 schema fields changedv0.29.2
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / currency_rate / description
      Previous value: -"Exchange rate as EUR per 1 foreign currency unit. Required when cl_currencies_id != EUR."New value: +"Exchange rate as foreign currency units per 1 EUR (ECB convention, e.g. USD 1.08; EUR = amount / rate). Required when cl_currencies_id != EUR."
  3. First observedv0.18.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare this is a non-readonly, non-destructive, non-idempotent write. The description adds genuinely useful context beyond that: the result is a DRAFT, and confirm_purchase_invoice will fail without exact vat_price/gross_price. It still says nothing about permissions, auth, or side effects like duplicate drafts, keeping it short of a 5.

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?

Two compact sentences, front-loaded with the core action before the contract details. Dense but every clause carries meaning; no filler or restatement of the title.

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

Completeness3/5

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

For an 18-parameter invoice-creation tool with no output schema, the description covers the critical numeric and currency contract but omits what the call returns (e.g., the new invoice ID) and how errors beyond currency/VAT manifest. Adequate given the rich schema and annotations, but not fully complete.

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 100%, so the schema already documents all 18 parameters, and much of the description (currency_rate convention, base_* derivation) duplicates schema text verbatim. The one marginal addition is that base_* "may lock actual EUR settlement", which is not in the schema, but the rest is largely redundant.

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

Purpose4/5

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

States a specific verb and resource ("Create a draft purchase invoice") and signals the draft state, which meaningfully separates it from confirm_purchase_invoice and create_purchase_invoice_from_pdf. It does not name a sibling explicitly, so the differentiation is implied rather than spelled out.

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

Usage Guidelines3/5

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

The description gives a "direct-call contract" with prerequisites (exact vat_price/gross_price, currency requirements), which is useful setup context. However, it never states when to prefer this tool over create_purchase_invoice_from_pdf or when to use confirm_purchase_invoice instead, so alternative routing is only implied.

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

Deploy Server

Other Tools