Skip to main content
Glama

create_client_invoice

Destructive

Create the exact invoice previously returned by prepare_client_invoice. This is a confirmed write: it revalidates the report snapshot and client identity, creates a private editable Google Doc plus private PDF and DOCX copies, records the issued invoice, and supersedes an older active invoice for the same report. It does not send email or create an Income row. If tax is positive, confirmTax must be true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmTaxNoTrue only after the user confirms the displayed tax label and rate.
operationIdNoOptional retry key. Reuse it after an uncertain response.
preparationIdYesShort-lived ID returned by prepare_client_invoice.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
totalNo
pdfUrlNo
statusNo
docxUrlNo
dueDateNo
successYes
currencyNo
invoiceIdNo
issueDateNo
recoveredNo
clientNameNo
grandTotalNo
documentUrlNo
invoiceNumberNo
advanceAppliedNo
sourceReportIdNo
artifactWarningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "advanceApplied": {
      +      "type": "number"
      +    },
      +    "artifactWarning": {
      +      "type": "string"
      +    },
      +    "clientName": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "currency": {
      +      "type": "string"
      +    },
      +    "documentUrl": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "docxUrl": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "dueDate": {
      +      "format": "date",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "grandTotal": {
      +      "type": "number"
      +    },
      +    "invoiceId": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "invoiceNumber": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "issueDate": {
      +      "format": "date",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "pdfUrl": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "recovered": {
      +      "type": "boolean"
      +    },
      +    "sourceReportId": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    },
      +    "total": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "description": "Standard ExpenseBot tool result envelope. `message` is the human-readable summary the AI cites; `data` is the structured payload (totals, breakdowns, ids, etc.). On failure, `success` is false and `error` carries a code/message/hint triple.",
      -  "properties": {
      -    "data": {
      -      "additionalProperties": true,
      -      "description": "Structured payload. Shape varies per tool — common keys: total, breakdown, comparison, sampleMeta, ids, expenseId, reportId, signupUrl, results.",
      -      "type": "object"
      -    },
      -    "error": {
      -      "additionalProperties": true,
      -      "description": "Present only when success === false.",
      -      "properties": {
      -        "code": {
      -          "type": "string"
      -        },
      -        "hint": {
      -          "type": "string"
      -        },
      -        "message": {
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "message": {
      -      "description": "Human-readable result text. Always present on success; prefer rendering this verbatim before any further reasoning.",
      -      "type": "string"
      -    },
      -    "sampleMeta": {
      -      "additionalProperties": true,
      -      "description": "Set when the underlying dataset was truncated. isTruncated=true means the agent saw a sample of `sampleCount` of `totalCount` rows; aggregate totals are still accurate.",
      -      "properties": {
      -        "isTruncated": {
      -          "type": "boolean"
      -        },
      -        "sampleCount": {
      -          "type": "integer"
      -        },
      -        "totalCount": {
      -          "type": "integer"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "success": {
      -      "description": "False on tool errors; check before reading `data`.",
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. Changed16 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / advanceApplied
      Removed value: -{
      -  "minimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / billToEmail
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / clientAddress
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / clientName
      Removed value: -{
      -  "description": "In in-app chat, the full client name shown on the invoice.",
      -  "type": "string"
      -}
    • removedInput schema / properties / customLineItems
      Removed value: -{
      -  "items": {
      -    "properties": {
      -      "amount": {
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      },
      -      "description": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "description",
      -      "amount"
      -    ],
      -    "type": "object"
      -  },
      -  "maxItems": 25,
      -  "type": "array"
      -}
    • removedInput schema / properties / invoiceNumber
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / issueDate
      Removed value: -{
      -  "description": "In in-app chat, a calendar-valid YYYY-MM-DD invoice date.",
      -  "type": "string"
      -}
    • removedInput schema / properties / markupPct
      Removed value: -{
      -  "maximum": 100,
      -  "minimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / mentionSupportingReceipts
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / paymentTerms
      Removed value: -{
      -  "enum": [
      -    "due_on_receipt",
      -    "net7",
      -    "net14",
      -    "net15",
      -    "net30",
      -    "net45",
      -    "net60"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / receiptIds
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / reportId
      Removed value: -{
      -  "description": "In in-app chat, the saved report ID to prepare and confirm.",
      -  "type": "string"
      -}
    • removedInput schema / properties / taxLabel
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / taxPct
      Removed value: -{
      -  "maximum": 100,
      -  "minimum": 0,
      -  "type": "number"
      -}
    • addedInput schema / required
      Added value: +[
      +  "preparationId"
      +]
  4. Added

TDQS

A4.9/5.0
Behavior5/5

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

The description goes well beyond the destructiveHint annotation by detailing side effects: revalidating snapshot/client identity, creating Google Doc/PDF/DOCX copies, recording the invoice, and superseding an older active invoice. It also explicitly frames the operation as 'a confirmed write,' giving the agent accurate 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?

Four tightly written sentences deliver the core purpose first, then side effects, exclusions, and the key conditional rule. Every sentence earns its place with no filler or repetition of schema fields.

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 this is a destructive write operation with an output schema, the description covers all essential context: preconditions, created artifacts, supersession effect, excluded side effects, and the tax confirmation requirement. An agent has enough information to decide when to invoke it and what to expect.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents all parameters. The description adds useful semantic context on top, such as confirmTax being required only when tax is positive and preparationId being the short-lived ID from prepare_client_invoice.

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: 'Create the exact invoice previously returned by prepare_client_invoice.' This clearly distinguishes it from read-only siblings like get_client_invoice and list_client_invoices, and from related actions like mark_client_invoice_paid.

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?

The description explicitly ties invocation to a prior call to prepare_client_invoice, and clarifies what the tool does not do ('does not send email or create an Income row'). It also gives a concrete conditional rule: 'If tax is positive, confirmTax must be true.'

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.