Skip to main content
Glama

inv.bg MCP by usefulapi

Record invoice payment

invbg_record_invoice_payment

WRITE: record a payment received for a document and allocate it, which updates the document's balance_paid/balance_due and payment status. Two calls: POST /payments, then POST /payments/{id}/invoices. If the allocation fails the payment stays recorded: the error names its id (see invbg_get_payment).

Input Schema

NameRequiredDescriptionDefault
noteNoNote stored on the payment.
amountYesAmount received and allocated to this document.
paid_atNoWhen it was paid (default now).
currencyYesCurrency of the payment (required by inv.bg), e.g. BGN or EUR.
invoice_idYesinv.bg document id the payment is for.
contragent_idNoThe paying client's id.
currency_rateYesExchange rate to BGN (required by inv.bg): 1 for BGN; otherwise the rate from invbg_get_exchange_rate.
payment_processorYesHow the money was received.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag a non-idempotent, non-readonly, open-world write; the description adds the part that annotations cannot express: the operation is two sequential API calls and can leave a payment recorded while the allocation fails. That partial-state disclosure is the critical behavioral detail, though auth/permission requirements and what a success returns are still unstated.

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

Conciseness5/5

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

Three sentences, front-loaded with the operation class and effect, then the call sequence, then the failure mode. No sentence is redundant and nothing is buried.

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 write tool with no output schema, the description covers the side effects, the two-step mechanism, and the failure state, which is what an agent needs to invoke it safely. The remaining gap is that a successful return value (e.g., payment id) is only implied via the error case.

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 description coverage is 100% across all 8 parameters, including the currency_rate/BGN explanation and the payment_processor enum, so the schema carries this dimension. The description adds no parameter-level guidance of its own, which is the correct baseline of 3 when the schema is complete.

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?

"WRITE: record a payment received for a document and allocate it" gives a specific verb, resource, and scope. The stated effect on balance_paid/balance_due and payment status distinguishes it from any read sibling like invbg_get_payment or invbg_list_payments.

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?

The "WRITE" prefix plus the partial-failure advice make the intended use clear, and it routes to invbg_get_payment when the allocation step fails. It does not name any competing alternative for recording payments, so the routing is only addressed for the recovery path, not the primary selection.

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.