Skip to main content
Glama

inv.bg MCP by usefulapi

Create invoice

invbg_create_invoice
Destructive

WRITE: create a document (tax invoice by default; proforma, debit/credit note via type). It is saved as a DRAFT unless draft is false: an issued document takes the next legal number and cannot be undone through this tool. Address it to an existing client_id, or give to_name + to_address (+ to_mol and to_bulstat for a company, to_egn for a person) and inv.bg matches or creates the client from those details (an existing client matched by Bulstat or VAT number is UPDATED with the address, MOL and other details you pass). VAT: set vat_percent on the document, or on every item. POST /invoices.

Input Schema

NameRequiredDescriptionDefault
typeNodan = tax invoice (default), prof = proforma, deb = debit note, cred = credit note.
draftNoSave as a draft (default true). Pass false to issue the document and consume its number.
itemsYesLine items.
notesNoNotes printed on the document.
to_egnNoRecipient EGN, 10 digits (individuals), as text so leading zeros survive.
to_molNoRecipient accountable person (MOL); required for companies when no client_id.
to_nameNoRecipient name (when no client_id).
to_townNo
currencyNoDocument currency (default BGN).
client_idNoExisting client id (invbg_list_clients). Then the to_* fields are ignored.
po_numberNoThe buyer's purchase order number.
date_eventNoTax event date (default: issue date).
number_setNoNumber set id to take the number from (invbg_list_number_sets); omit unless you use several series.
to_addressNoRecipient address (required when no client_id).
to_bulstatNoRecipient EIK/Bulstat (companies).
to_countryNoRecipient country, ISO 3166-1 alpha-2.
date_createNoIssue date (default now).
date_matureNoDue date.
vat_percentNoVAT rate for the whole document in percent; ignored where items carry their own vat_percent.
is_to_personNotrue when the recipient is an individual (then to_egn is needed).
currency_rateNoExchange rate to BGN (BGN/XXX). Required when currency is not BGN: take it from invbg_get_exchange_rate.
to_is_reg_vatNoWhether the recipient company is VAT-registered.
to_vat_numberNoRecipient VAT number (needed when to_is_reg_vat is true).
items_with_vatNotrue if item prices already include VAT (default false).
payment_methodNoHow the client pays.
reduction_percentNoDiscount on the whole document in percent.
vat_exemption_reasonNoWhy no VAT is charged (when VAT is 0); see invbg_list_vat_exemption_reasons.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare write, destructive and non-idempotent, and the description adds precisely the missing specifics: saved as DRAFT by default, draft=false consumes the next legal number and 'cannot be undone through this tool'. It also discloses a non-obvious side effect — that inv.bg may match an existing client by Bulstat/VAT and UPDATE that client with the passed details.

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?

Front-loaded with the write/draft/irreversibility facts an agent needs first, then addressing rules, then VAT. Every sentence carries information, though the addressing sentence is a dense parenthetical chain that takes effort to parse.

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 27-parameter destructive tool with no output schema, the description covers draft-vs-issue, numbering, irreversibility and the client-creation side effect — the highest-risk behaviors. It never says what the call returns (invoice id/number), which matters for chaining into get_invoice or record_invoice_payment, and it is silent on duplicate/idempotency behavior.

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

Parameters4/5

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

Schema coverage is 96%, so the fields are already documented; the description adds the higher-order semantics the schema can't express well — the client_id vs to_* precedence, the company-vs-person identifier split, and the document-level vat_percent being overridden by per-item vat_percent. It does not add format details for dates or currency, but it meaningfully clarifies parameter interplay.

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?

Opens with an explicit verb and resource ('WRITE: create a document') and immediately narrows scope to invoice variants via the type field. An agent can distinguish this from invbg_create_client and invbg_create_item without opening any schema.

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

Usage Guidelines4/5

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

Gives concrete conditional branches: use client_id for an existing client, otherwise supply to_name + to_address plus company/person identifiers; VAT can be set per document or per item. It also routes to sibling helpers (invbg_list_item_units, invbg_get_exchange_rate, invbg_list_number_sets) for dependent inputs, though it never states an explicit 'do not use this tool when...' exclusion.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.