Skip to main content
Glama

Get invoice

get_invoice
Read-only

Fetch a single invoice by id, including its line items, client, and totals. Returns null-shaped error if the invoice is not visible to the caller.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_idYesThe invoice UUID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInvoice UUID.
typeYesDocument type: invoice, credit_note, provision or quote.
itemsYesLine items in display order.
notesYesNotes printed on the invoice.
statusYesDocument status: Draft, Sent, Paid, Overdue, Cancelled, Rectified, Accepted, Rejected or Expired.
companyYesClient company name, null when unknown.
paid_atYesPayment timestamp (ISO 8601), null while unpaid.
currencyYesISO 4217 currency code (EUR, USD, GBP or CHF).
due_dateYesDue date, YYYY-MM-DD.
net_totalYesTotal excl. VAT, in the document currency.
tax_totalYesVAT amount, in the document currency.
issue_dateYesIssue date, YYYY-MM-DD.
gross_totalYesTotal incl. VAT, in the document currency.
payment_termsYesPayment terms: Net-15, Net-30, Net-60, Net-90 or Due on Receipt.
invoice_numberYesHuman-readable invoice number.
certification_errorYesLast certification error message, null when none.
certification_statusYesFiscal certification status (e.g. processing, certified, error), null before issuance.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / items / items / properties / display_order
      Added value: +{
      +  "description": "0-based position of the line on the document.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / items / items / properties / id
      Added value: +{
      +  "description": "Line item UUID, to pass to update_invoice_item, delete_invoice_item or reorder_invoice_items.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / items / items / required
      Previous value: -[
      -  "description",
      -  "line_type",
      -  "quantity",
      -  "unit_price",
      -  "tax_rate",
      -  "line_total"
      -]New value: +[
      +  "id",
      +  "display_order",
      +  "description",
      +  "line_type",
      +  "quantity",
      +  "unit_price",
      +  "tax_rate",
      +  "line_total"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "certification_error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Last certification error message, null when none."
      +    },
      +    "certification_status": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Fiscal certification status (e.g. processing, certified, error), null before issuance."
      +    },
      +    "company": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Client company name, null when unknown."
      +    },
      +    "currency": {
      +      "description": "ISO 4217 currency code (EUR, USD, GBP or CHF).",
      +      "type": "string"
      +    },
      +    "due_date": {
      +      "description": "Due date, YYYY-MM-DD.",
      +      "type": "string"
      +    },
      +    "gross_total": {
      +      "description": "Total incl. VAT, in the document currency.",
      +      "type": "number"
      +    },
      +    "id": {
      +      "description": "Invoice UUID.",
      +      "type": "string"
      +    },
      +    "invoice_number": {
      +      "description": "Human-readable invoice number.",
      +      "type": "string"
      +    },
      +    "issue_date": {
      +      "description": "Issue date, YYYY-MM-DD.",
      +      "type": "string"
      +    },
      +    "items": {
      +      "description": "Line items in display order.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "description": {
      +            "description": "Line text.",
      +            "type": "string"
      +          },
      +          "line_total": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Line total incl. VAT, null for non-item lines."
      +          },
      +          "line_type": {
      +            "description": "Line kind: item, section or description.",
      +            "type": "string"
      +          },
      +          "quantity": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Quantity, null for section/description lines."
      +          },
      +          "tax_rate": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "VAT rate in percent, null for non-item lines."
      +          },
      +          "unit_price": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Unit price excl. VAT, null for non-item lines."
      +          }
      +        },
      +        "required": [
      +          "description",
      +          "line_type",
      +          "quantity",
      +          "unit_price",
      +          "tax_rate",
      +          "line_total"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "net_total": {
      +      "description": "Total excl. VAT, in the document currency.",
      +      "type": "number"
      +    },
      +    "notes": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Notes printed on the invoice."
      +    },
      +    "paid_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Payment timestamp (ISO 8601), null while unpaid."
      +    },
      +    "payment_terms": {
      +      "description": "Payment terms: Net-15, Net-30, Net-60, Net-90 or Due on Receipt.",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "Document status: Draft, Sent, Paid, Overdue, Cancelled, Rectified, Accepted, Rejected or Expired.",
      +      "type": "string"
      +    },
      +    "tax_total": {
      +      "description": "VAT amount, in the document currency.",
      +      "type": "number"
      +    },
      +    "type": {
      +      "description": "Document type: invoice, credit_note, provision or quote.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "invoice_number",
      +    "type",
      +    "status",
      +    "issue_date",
      +    "due_date",
      +    "paid_at",
      +    "currency",
      +    "gross_total",
      +    "company",
      +    "net_total",
      +    "tax_total",
      +    "payment_terms",
      +    "notes",
      +    "certification_status",
      +    "certification_error",
      +    "items"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true. The description adds a useful behavioral detail: it returns a null-shaped error if the invoice is not visible to the caller, and it specifies the returned content (line items, client, totals). This goes beyond annotations without contradicting them.

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?

A single sentence that is front-loaded with the core action and scope, with no wasted words. Every clause earns its place.

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 simple get-by-id operation with an output schema present, the description covers the essential return content and error behavior. Nothing an agent needs to call it correctly is missing.

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% — the only parameter (invoice_id) is fully documented in the schema with its type and description. The tool description adds no additional meaning about the parameter, so baseline 3 applies.

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 states a specific verb (Fetch), resource (a single invoice by id), and scope (including line items, client, and totals). It clearly distinguishes from siblings like list_invoices (plural) and get_invoice_pdf (PDF output).

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

Usage Guidelines3/5

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

The description implies usage when you have an invoice id and want the full invoice object, but it does not explicitly mention alternatives or when not to use it. No sibling routing or exclusionary context is provided.

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.