Skip to main content
Glama

Create invoice

create_invoice
Read-onlyIdempotent

Build a complete invoice as structured data: invoice number, issue and due dates, line items, discount, tax, total and payment terms. Nothing is stored. Use when the user wants an invoice for a client. Do NOT use for totals only (use calculate_totals) or for a printable text version (use render_invoice_text).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesLine items (at least one), each {description, quantity, unit_price}; line amount = quantity x unit_price.
notesNoFree-text notes printed on the invoice, e.g. payment instructions. Default empty.
currencyNoThree-letter currency code, case-insensitive: one of USD, EUR, INR, GBP, AED, SGD, AUD, CAD. Default USD.
client_nameYesName of the client being billed, e.g. "Globex Corp"
due_in_daysNoPayment term in days from today; sets due_date and 'Net N' terms. Default 14.
discount_pctNoDiscount in percent of the subtotal, 0-100, e.g. 10 for 10% off. Default 0.
tax_rate_pctNoTax rate in percent, 0-100, applied after the discount, e.g. 18 for 18% GST. Default 0.
business_nameYesName of the business or freelancer issuing the invoice, e.g. "Acme Design Studio"
invoice_numberNoInvoice number to use, e.g. "INV-2026-042". If omitted, one is generated as INV-YYYYMMDD-NNNN.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
taxYesTax amount = (subtotal - discount) x tax_rate_pct / 100.
dateYesIssue date, today in UTC, YYYY-MM-DD.
itemsYesLine items echoed back as provided.
notesYesNotes text (empty string if none).
totalYesAmount due = subtotal - discount + tax.
symbolYesCurrency symbol used when rendering, e.g. $.
currencyYesUpper-case currency code, e.g. USD.
discountYesDiscount amount = subtotal x discount_pct / 100.
due_dateYesDue date, YYYY-MM-DD (issue date + due_in_days).
subtotalYesSum of quantity x unit_price, rounded to 2 dp.
client_nameYesBilled client name as given.
discount_pctYesDiscount percent that was applied.
tax_rate_pctYesTax rate percent that was applied.
business_nameYesIssuing business name as given.
payment_termsYesPayment terms label, e.g. 'Net 14'.
invoice_numberYesInvoice number (given or generated INV-YYYYMMDD-NNNN).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed23 schema fields changed
    • changedInput schema / properties / business_name / description
      Previous value: -"The name of the business issuing the invoice"New value: +"Name of the business or freelancer issuing the invoice, e.g. \"Acme Design Studio\""
    • addedInput schema / properties / business_name / minLength
      Added value: +1
    • changedInput schema / properties / client_name / description
      Previous value: -"The name of the client receiving the invoice"New value: +"Name of the client being billed, e.g. \"Globex Corp\""
    • addedInput schema / properties / client_name / minLength
      Added value: +1
    • changedInput schema / properties / currency / description
      Previous value: -"Currency code for the invoice, e.g. USD, EUR"New value: +"Three-letter currency code, case-insensitive: one of USD, EUR, INR, GBP, AED, SGD, AUD, CAD. Default USD."
    • changedInput schema / properties / discount_pct / description
      Previous value: -"Discount rate as a percent, e.g. 10 for 10%"New value: +"Discount in percent of the subtotal, 0-100, e.g. 10 for 10% off. Default 0."
    • addedInput schema / properties / discount_pct / maximum
      Added value: +100
    • addedInput schema / properties / discount_pct / minimum
      Added value: +0
    • changedInput schema / properties / due_in_days / description
      Previous value: -"Number of days until the invoice is due"New value: +"Payment term in days from today; sets due_date and 'Net N' terms. Default 14."
    • changedInput schema / properties / invoice_number / description
      Previous value: -"Unique identifier for the invoice"New value: +"Invoice number to use, e.g. \"INV-2026-042\". If omitted, one is generated as INV-YYYYMMDD-NNNN."
    • changedInput schema / properties / items / description
      Previous value: -"Array of objects, each with name, quantity, and unit_price"New value: +"Line items (at least one), each {description, quantity, unit_price}; line amount = quantity x unit_price."
    • addedInput schema / properties / items / items / properties / description / description
      Added value: +"What was sold or done, e.g. \"Logo design\" or \"Consulting hours\""
    • addedInput schema / properties / items / items / properties / description / minLength
      Added value: +1
    • addedInput schema / properties / items / items / properties / quantity / description
      Added value: +"Quantity or hours, must be > 0, e.g. 10"
    • addedInput schema / properties / items / items / properties / quantity / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / items / items / properties / unit_price / description
      Added value: +"Price per unit in the invoice currency, >= 0, e.g. 50"
    • addedInput schema / properties / items / items / properties / unit_price / minimum
      Added value: +0
    • addedInput schema / properties / items / minItems
      Added value: +1
    • changedInput schema / properties / notes / description
      Previous value: -"Any additional notes or comments for the invoice"New value: +"Free-text notes printed on the invoice, e.g. payment instructions. Default empty."
    • changedInput schema / properties / tax_rate_pct / description
      Previous value: -"Tax rate as a percent, e.g. 20 for 20%"New value: +"Tax rate in percent, 0-100, applied after the discount, e.g. 18 for 18% GST. Default 0."
    • addedInput schema / properties / tax_rate_pct / maximum
      Added value: +100
    • addedInput schema / properties / tax_rate_pct / minimum
      Added value: +0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "business_name": {
      +      "description": "Issuing business name as given.",
      +      "type": "string"
      +    },
      +    "client_name": {
      +      "description": "Billed client name as given.",
      +      "type": "string"
      +    },
      +    "currency": {
      +      "description": "Upper-case currency code, e.g. USD.",
      +      "type": "string"
      +    },
      +    "date": {
      +      "description": "Issue date, today in UTC, YYYY-MM-DD.",
      +      "type": "string"
      +    },
      +    "discount": {
      +      "description": "Discount amount = subtotal x discount_pct / 100.",
      +      "type": "number"
      +    },
      +    "discount_pct": {
      +      "description": "Discount percent that was applied.",
      +      "type": "number"
      +    },
      +    "due_date": {
      +      "description": "Due date, YYYY-MM-DD (issue date + due_in_days).",
      +      "type": "string"
      +    },
      +    "invoice_number": {
      +      "description": "Invoice number (given or generated INV-YYYYMMDD-NNNN).",
      +      "type": "string"
      +    },
      +    "items": {
      +      "description": "Line items echoed back as provided.",
      +      "items": {
      +        "properties": {
      +          "description": {
      +            "description": "What was sold or done, e.g. \"Logo design\" or \"Consulting hours\"",
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "quantity": {
      +            "description": "Quantity or hours, must be > 0, e.g. 10",
      +            "exclusiveMinimum": 0,
      +            "type": "number"
      +          },
      +          "unit_price": {
      +            "description": "Price per unit in the invoice currency, >= 0, e.g. 50",
      +            "minimum": 0,
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "description",
      +          "quantity",
      +          "unit_price"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "notes": {
      +      "description": "Notes text (empty string if none).",
      +      "type": "string"
      +    },
      +    "payment_terms": {
      +      "description": "Payment terms label, e.g. 'Net 14'.",
      +      "type": "string"
      +    },
      +    "subtotal": {
      +      "description": "Sum of quantity x unit_price, rounded to 2 dp.",
      +      "type": "number"
      +    },
      +    "symbol": {
      +      "description": "Currency symbol used when rendering, e.g. $.",
      +      "type": "string"
      +    },
      +    "tax": {
      +      "description": "Tax amount = (subtotal - discount) x tax_rate_pct / 100.",
      +      "type": "number"
      +    },
      +    "tax_rate_pct": {
      +      "description": "Tax rate percent that was applied.",
      +      "type": "number"
      +    },
      +    "total": {
      +      "description": "Amount due = subtotal - discount + tax.",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "invoice_number",
      +    "date",
      +    "due_date",
      +    "business_name",
      +    "client_name",
      +    "currency",
      +    "symbol",
      +    "items",
      +    "tax_rate_pct",
      +    "discount_pct",
      +    "subtotal",
      +    "discount",
      +    "tax",
      +    "total",
      +    "notes",
      +    "payment_terms"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "business_name": {
      -      "description": "The name of the business issuing the invoice.",
      -      "type": "string"
      -    },
      -    "client_name": {
      -      "description": "The name of the client receiving the invoice.",
      -      "type": "string"
      -    },
      -    "currency": {
      -      "description": "The currency in which the invoice is denominated.",
      -      "type": "string"
      -    },
      -    "discount_amount": {
      -      "description": "The amount of discount applied to the subtotal.",
      -      "type": "number"
      -    },
      -    "due_date": {
      -      "description": "The date by which the invoice should be paid.",
      -      "format": "date",
      -      "type": "string"
      -    },
      -    "invoice_date": {
      -      "description": "The date when the invoice was created.",
      -      "format": "date",
      -      "type": "string"
      -    },
      -    "invoice_number": {
      -      "description": "The unique identifier for the invoice.",
      -      "type": "string"
      -    },
      -    "items": {
      -      "description": "The list of items included in the invoice.",
      -      "items": {
      -        "properties": {
      -          "description": {
      -            "description": "A brief description of the item.",
      -            "type": "string"
      -          },
      -          "quantity": {
      -            "description": "The quantity of the item.",
      -            "type": "number"
      -          },
      -          "total_price": {
      -            "description": "The total price for the quantity of the item.",
      -            "type": "number"
      -          },
      -          "unit_price": {
      -            "description": "The price per unit of the item.",
      -            "type": "number"
      -          }
      -        },
      -        "required": [
      -          "description",
      -          "quantity",
      -          "unit_price",
      -          "total_price"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "notes": {
      -      "description": "Any additional notes or comments related to the invoice.",
      -      "type": "string"
      -    },
      -    "subtotal": {
      -      "description": "The total amount before tax and discount.",
      -      "type": "number"
      -    },
      -    "tax_amount": {
      -      "description": "The amount of tax applied to the subtotal.",
      -      "type": "number"
      -    },
      -    "total": {
      -      "description": "The final amount to be paid, after tax and discount.",
      -      "type": "number"
      -    }
      -  },
      -  "required": [
      -    "invoice_number",
      -    "business_name",
      -    "client_name",
      -    "invoice_date",
      -    "due_date",
      -    "currency",
      -    "subtotal",
      -    "tax_amount",
      -    "discount_amount",
      -    "total",
      -    "items"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. Changed10 schema fields changed
    • addedInput schema / properties / business_name / description
      Added value: +"The name of the business issuing the invoice"
    • addedInput schema / properties / client_name / description
      Added value: +"The name of the client receiving the invoice"
    • addedInput schema / properties / currency / description
      Added value: +"Currency code for the invoice, e.g. USD, EUR"
    • addedInput schema / properties / discount_pct / description
      Added value: +"Discount rate as a percent, e.g. 10 for 10%"
    • addedInput schema / properties / due_in_days / description
      Added value: +"Number of days until the invoice is due"
    • addedInput schema / properties / invoice_number / description
      Added value: +"Unique identifier for the invoice"
    • addedInput schema / properties / items / description
      Added value: +"Array of objects, each with name, quantity, and unit_price"
    • addedInput schema / properties / notes / description
      Added value: +"Any additional notes or comments for the invoice"
    • addedInput schema / properties / tax_rate_pct / description
      Added value: +"Tax rate as a percent, e.g. 20 for 20%"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "business_name": {
      +      "description": "The name of the business issuing the invoice.",
      +      "type": "string"
      +    },
      +    "client_name": {
      +      "description": "The name of the client receiving the invoice.",
      +      "type": "string"
      +    },
      +    "currency": {
      +      "description": "The currency in which the invoice is denominated.",
      +      "type": "string"
      +    },
      +    "discount_amount": {
      +      "description": "The amount of discount applied to the subtotal.",
      +      "type": "number"
      +    },
      +    "due_date": {
      +      "description": "The date by which the invoice should be paid.",
      +      "format": "date",
      +      "type": "string"
      +    },
      +    "invoice_date": {
      +      "description": "The date when the invoice was created.",
      +      "format": "date",
      +      "type": "string"
      +    },
      +    "invoice_number": {
      +      "description": "The unique identifier for the invoice.",
      +      "type": "string"
      +    },
      +    "items": {
      +      "description": "The list of items included in the invoice.",
      +      "items": {
      +        "properties": {
      +          "description": {
      +            "description": "A brief description of the item.",
      +            "type": "string"
      +          },
      +          "quantity": {
      +            "description": "The quantity of the item.",
      +            "type": "number"
      +          },
      +          "total_price": {
      +            "description": "The total price for the quantity of the item.",
      +            "type": "number"
      +          },
      +          "unit_price": {
      +            "description": "The price per unit of the item.",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "description",
      +          "quantity",
      +          "unit_price",
      +          "total_price"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "notes": {
      +      "description": "Any additional notes or comments related to the invoice.",
      +      "type": "string"
      +    },
      +    "subtotal": {
      +      "description": "The total amount before tax and discount.",
      +      "type": "number"
      +    },
      +    "tax_amount": {
      +      "description": "The amount of tax applied to the subtotal.",
      +      "type": "number"
      +    },
      +    "total": {
      +      "description": "The final amount to be paid, after tax and discount.",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "invoice_number",
      +    "business_name",
      +    "client_name",
      +    "invoice_date",
      +    "due_date",
      +    "currency",
      +    "subtotal",
      +    "tax_amount",
      +    "discount_amount",
      +    "total",
      +    "items"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so the safety profile is covered; the description adds the genuinely useful fact 'Nothing is stored,' clarifying this is pure computation with no persistence. It omits failure behavior (e.g., what happens on invalid line items), which is the only meaningful remaining gap.

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 tight sentences: purpose and output shape first, then positive usage, then exclusions. Nothing is padded and the routing information is front-loaded where an agent will see it.

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?

For a 9-parameter tool with an output schema and full annotation coverage, the description covers purpose, when-to-use, alternatives, and side-effect semantics. Required-parameter and value constraints are correctly left to the schema.

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 every parameter (including nested item fields, currency list, and defaults) is already fully documented. The description's field list largely restates parameter names and adds only the derived outputs (issue date, total, 'Net N' terms), so baseline 3 is appropriate.

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?

States a specific verb and resource ('Build a complete invoice as structured data') and enumerates the artifacts produced: invoice number, dates, line items, discount, tax, total and payment terms. It also names the two siblings it is not, so an agent can discriminate without opening any schema.

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

Usage Guidelines5/5

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

Explicit routing: 'Use when the user wants an invoice for a client. Do NOT use for totals only (use calculate_totals) or for a printable text version (use render_invoice_text).' Both the positive trigger and the two exclusion conditions with named alternatives are present.

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.