Skip to main content
Glama

create_invoice

Generate invoices for subscription billing with required details like customer ID, payment method, line items, and due dates. Supports optional billing/shipping addresses and terms.

Instructions

Create an invoice. POST /invoices. Required: companyCurrencyId, companyGatewayId, customerId, paymentMethodId, detail (array, at least one line item), dateDue, dateFrom, dateTo. Optional: billingAddress, shippingAddress (when provided: contactName, street1, city, zip, countryCode (ISO 3166-1 alpha-2), type residential|commercial), customerEmail (max 45), customerName (max 45), customerPhone (max 45), paymentType (offlinePaymentProvider|thirdPartyPaymentProvider|walletPaymentProvider|otherPayment), shippingAmount (CENTS), terms (max 200), comments (max 200). Detail: amount can be '41.00' (dollars) or 4100 (cents). Tool always sends cents to publicAPI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyCurrencyIdYesCompany currency ID (required)
companyGatewayIdYesCompany gateway ID (required)
detailYesLine items (required, at least one). Each: amount as '41.00' (dollars) or 4100 (cents). Tool always sends cents to publicAPI. description (max 255), qty
customerIdYesCustomer ID (required)
customerEmailNoCustomer email (max 45)
customerNameNoCustomer name (max 45)
customerPhoneNoCustomer phone (max 45)
paymentMethodIdYesPayment method ID (required)
customerPaymentMethodIdNoCustomer payment method ID
paymentTypeNoofflinePaymentProvider, thirdPartyPaymentProvider, walletPaymentProvider, or otherPayment
dateDueYesDue date (valid date). Required.
dateFromYesPeriod from (valid date). Required.
dateToYesPeriod to (valid date). Required.
billingAddressNoOptional. If provided: contactName, street1, city, zip, countryCode (ISO 3166-1 alpha-2 country code, e.g. ES, AR, MX), type (residential|commercial)
shippingAddressNoOptional. Same shape as billingAddress
shippingAmountNoShipping amount in CENTS
termsNoTerms (max 200)
commentsNoComments (max 200)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool sends cents to the public API and specifies required fields, but lacks critical behavioral details such as authentication needs, error handling, rate limits, or what happens upon creation (e.g., does it trigger payments?). This is a significant gap for a mutation tool.

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 the core purpose but becomes verbose by listing all parameters, many of which are redundant with the schema. While it avoids fluff, the parameter listing could be trimmed for better conciseness, as it adds little unique information.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (18 parameters, nested objects, no output schema, and no annotations), the description is incomplete. It fails to explain the tool's behavior, output format, or error conditions, leaving the agent with insufficient context for safe and effective use of this mutation tool.

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 parameters thoroughly. The description adds minimal value by repeating some parameter details (e.g., 'amount can be '41.00' (dollars) or 4100 (cents)'), but does not provide additional context beyond what the schema offers, meeting the baseline for high coverage.

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 specific action ('Create an invoice') and distinguishes it from sibling tools like 'update_invoice' or 'delete_invoice' by focusing on creation. It also mentions the HTTP method (POST /invoices), which reinforces the creation purpose.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'charge_invoice' or 'update_invoice'. It lists required and optional parameters but does not explain prerequisites, use cases, or exclusions, leaving the agent without context for tool selection.

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