Skip to main content
Glama

update_invoice

Update specific fields of an invoice in 'posted' or 'requestPayment' status. Modify customer details, due date, payment type, shipping address, or line items.

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? }
Behavior5/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 details the HTTP method, conditional update based on invoice status, optional body fields, accepted fields, and specific constraints (e.g., billingAddress not accepted, detail amount format, shipping address sub-fields). No contradictions with annotations exist.

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?

The description is relatively long but each sentence provides essential information. It front-loads the verb and resource, then presents conditions and field details. The structure is logical, though it could be slightly more organized (e.g., grouping constraints together). No unnecessary sentences are present.

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

Completeness5/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), the description is thorough. It covers preconditions, accepted fields, format specifications, and potential errors. It does not explain return values, but that is acceptable without an output schema. The description is complete for an update tool.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds significant meaning beyond the schema. It clarifies the status condition for updates, explains that billingAddress is not accepted (not in schema), details format for detail amounts (dollars vs cents), and provides sub-fields for shippingAddress with country code format. This greatly aids correct parameter usage.

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?

The description clearly states the action ('Update an invoice') and the HTTP endpoint ('PUT /invoices/{invoiceId}'). It distinctly identifies the resource being updated, differentiating it from siblings like create_invoice, delete_invoice, and get_invoice.

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 explicitly states when the tool can be used: only invoices with status 'posted' or 'requestPayment' can be updated. It also notes that billingAddress is not accepted and warns about required customer and customerPaymentMethod to avoid errors. However, it does not explicitly compare with sibling tools for alternative actions like charging or voiding.

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