Skip to main content
Glama

update_invoice

Modify existing invoices with status 'posted' or 'requestPayment' by updating customer details, payment information, shipping, line items, and due dates.

Instructions

Update an invoice. PUT /invoices/{invoiceId}. Only invoices with status 'posted' or 'requestPayment' can be updated. All body fields optional. Accepted: companyGatewayId, customerId, customerEmail, customerName, customerPhone (max 45), customerPaymentMethodId, dateDue, dateFrom, dateTo, comments, paymentType (offlinePaymentProvider|thirdPartyPaymentProvider|walletPaymentProvider), paymentMethodId, shippingAddress (when provided: contactName, street1, city, zip, countryCode (ISO 3166-1 alpha-2), type residential|commercial), shippingAmount (cents), shippingServiceId, detail (line items: amount as '41.00' dollars or 4100 cents; tool sends cents). Note: billingAddress is not accepted on update. Invoice must have customer and customerPaymentMethod set to avoid server error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceIdYesInvoice ID (required)
companyGatewayIdNoCompany gateway ID
customerIdNoCustomer ID
customerEmailNoCustomer email (max 45)
customerNameNoCustomer name (max 45)
customerPhoneNoCustomer phone (max 45)
customerPaymentMethodIdNoCustomer payment method ID
dateDueNoDue date (valid date)
dateFromNoPeriod from (valid date)
dateToNoPeriod to (valid date)
commentsNoComments
paymentTypeNoofflinePaymentProvider, thirdPartyPaymentProvider, or walletPaymentProvider
paymentMethodIdNoPayment method ID
shippingAddressNoWhen provided: contactName, street1, city, zip, countryCode (ISO 3166-1 alpha-2 country code, e.g. ES, AR, MX), type (residential|commercial)
shippingAmountNoShipping amount in CENTS
shippingServiceIdNoShipping service ID
detailNoLine items: each { amount: '41.00' (dollars) or 4100 (cents), description?, qty? }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the HTTP method (PUT), status restrictions, field optionality, format details (e.g., cents vs dollars for amounts), and error conditions (server error if customer/payment method not set). It doesn't cover rate limits or authentication needs, but provides substantial operational context.

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?

The description is front-loaded with core purpose and restrictions, but becomes verbose with field listings that duplicate schema information. Sentences like 'All body fields optional' and the detailed field explanations could be more concise, though they do provide useful context beyond the schema in some cases.

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?

Given the complexity (17 parameters, nested objects, no output schema, and no annotations), the description does a good job of providing necessary context. It covers status restrictions, field behaviors, format specifics, and error conditions. The main gap is lack of output information, but overall it's reasonably complete for a mutation tool with many parameters.

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 all 17 parameters thoroughly. The description adds some value by clarifying that all body fields are optional (except invoiceId), noting billingAddress is not accepted, and providing examples for shippingAddress and detail. However, it largely repeats information already in the schema descriptions.

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?

The description clearly states the verb 'update' and resource 'invoice', making the purpose explicit. It distinguishes from siblings like 'create_invoice' and 'delete_invoice' by focusing on modification rather than creation or deletion, though it doesn't explicitly contrast with other update tools like 'update_customer' or 'update_subscription'.

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 description provides clear context for when to use this tool: only for invoices with status 'posted' or 'requestPayment'. It also mentions prerequisites like needing customer and customerPaymentMethod set to avoid errors. However, it doesn't explicitly state when not to use it or name specific alternatives among siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rhinosaas/rebillia-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server