Skip to main content
Glama

Create invoice

mercoa_create_invoice
Destructive

WRITE — creates a real invoice/bill in Mercoa. Set status (DRAFT to stage, NEW to submit), amount, currency, payer/vendor, dates and line items. POST /invoice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNoTotal invoice amount.
statusNoInvoice status, e.g. DRAFT, NEW, APPROVED, SCHEDULED.
dueDateNoDue date (ISO 8601).
payerIdNoPayer entity ID (who owes).
currencyNoCurrency code, e.g. USD.
metadataNoArbitrary key/value metadata.
vendorIdNoVendor entity ID (who is paid).
lineItemsNoLine items array, e.g. [{ "amount": 100, "currency": "USD", "description": "Product A", "quantity": 1, "unitPrice": 100 }].
noteToSelfNoInternal note.
invoiceDateNoInvoice date (ISO 8601).
creatorUserIdNoUser ID creating the invoice.
deductionDateNoScheduled payment/deduction date (ISO 8601).
invoiceNumberNoHuman-readable invoice number, e.g. INV-123.
creatorEntityIdNoEntity ID on whose behalf the invoice is created.
paymentSourceIdNoPayment method ID to pay from (payer's).
paymentDestinationIdNoPayment method ID to pay to (vendor's).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, signaling a write operation. The description adds 'WRITE' and confirms creation, but does not disclose additional behaviors like required permissions, rate limits, or response details. No contradiction with annotations.

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?

Two sentences, zero waste. Front-loads the core action and key fields, then provides the endpoint. Every sentence earns its place.

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?

While the description covers the basic purpose, the tool has 16 parameters including nested line items and no output schema. The description does not address required vs optional fields, validation constraints, or what happens on success or failure. Schema descriptions fill some gaps, but more holistic guidance would improve 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 description coverage is 100%, so the schema already documents each parameter. The tool description summarizes key parameters (status, amount, currency, payer/vendor, dates, line items) but adds no new meaning beyond the schema.

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?

Description clearly states it creates a real invoice, lists key fields (status, amount, currency, payer/vendor, dates, line items), and distinguishes from sibling tools like mercoa_find_invoices (read) and mercoa_update_invoice (update). The status guidance (DRAFT to stage, NEW to submit) adds specificity.

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?

Implied usage is clear (create new invoice), but no explicit when-not or alternatives. However, the status hints provide context for different creation scenarios (draft vs. submit).

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.