Skip to main content
Glama

Convert quote to invoice

convert_quote_to_invoice

Create a new Draft invoice from an Accepted quote (line items copied, source_quote_id set for traceability). The invoice then follows the normal lifecycle (issue_invoice to make it legally binding). Call with confirm:true to apply; without it, returns a preview.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoMust be true to convert. Omit/false to preview only.
quote_idYesThe Accepted quote UUID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoQuote UUID.
noteNoNext-step guidance, present on preview responses.
typeNoDocument type: invoice, credit_note, provision or quote.
statusNoDocument status: Draft, Sent, Paid, Overdue, Cancelled, Rectified, Accepted, Rejected or Expired.
previewNoTrue when the call was a preview (confirm omitted or false): nothing was changed.
currencyNoISO 4217 currency code (EUR, USD, GBP or CHF).
due_dateNoDue date, YYYY-MM-DD.
net_totalNoTotal excl. VAT, in the document currency.
tax_totalNoVAT amount, in the document currency.
issue_dateNoIssue date, YYYY-MM-DD.
gross_totalNoTotal incl. VAT, in the document currency.
valid_untilNoValidity limit, YYYY-MM-DD.
would_convertNoQuote that would be converted (preview only).
invoice_numberNoQuote number (own series).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "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": "Quote UUID.",
      +      "type": "string"
      +    },
      +    "invoice_number": {
      +      "description": "Quote number (own series).",
      +      "type": "string"
      +    },
      +    "issue_date": {
      +      "description": "Issue date, YYYY-MM-DD.",
      +      "type": "string"
      +    },
      +    "net_total": {
      +      "description": "Total excl. VAT, in the document currency.",
      +      "type": "number"
      +    },
      +    "note": {
      +      "description": "Next-step guidance, present on preview responses.",
      +      "type": "string"
      +    },
      +    "preview": {
      +      "description": "True when the call was a preview (confirm omitted or false): nothing was changed.",
      +      "type": "boolean"
      +    },
      +    "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"
      +    },
      +    "valid_until": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Validity limit, YYYY-MM-DD."
      +    },
      +    "would_convert": {
      +      "additionalProperties": false,
      +      "description": "Quote that would be converted (preview only).",
      +      "properties": {
      +        "gross_total": {
      +          "description": "Total incl. VAT, in the document currency.",
      +          "type": "number"
      +        },
      +        "id": {
      +          "description": "Document UUID.",
      +          "type": "string"
      +        },
      +        "invoice_number": {
      +          "description": "Human-readable document number.",
      +          "type": "string"
      +        },
      +        "status": {
      +          "description": "Document status: Draft, Sent, Paid, Overdue, Cancelled, Rectified, Accepted, Rejected or Expired.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "invoice_number",
      +        "status",
      +        "gross_total"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses the write effect of creating an invoice, the preview mode when confirm is false, and the lifecycle context. This goes well beyond the minimal annotations and provides clear expectations.

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?

The description is concise and well-structured, with three short sentences that front-load the core purpose and then add necessary usage nuance. No unnecessary words or redundancy.

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 simple two-parameter schema and the presence of an output schema, the description covers the necessary context: source state, conversion behavior, preview/apply distinction, and the follow-up lifecycle step.

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?

The input schema already describes both parameters well, including the Accepted quote UUID and the confirm behavior. The description largely repeats these details rather than adding new parameter-specific meaning.

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 tool creates a new Draft invoice from an Accepted quote, with line items copied and source_quote_id set for traceability. This distinguishes it from related tools like create_invoice or accept_quote.

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?

It specifies the prerequisite of an Accepted quote and explains the confirm:true behavior for applying vs previewing. It also points to issue_invoice for the next lifecycle step, though it does not explicitly contrast with create_invoice or reject_quote.

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.