Skip to main content
Glama

business_invoice_totals

Read-onlyIdempotent

Invoice totals

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "lines": "<lines>"
    },
    "name": "business_invoice_totals"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYesInvoice lines as [{description, qty, unitPrice}].
notesNoNotes printed at the bottom of the document.
termsNoPayment terms line, for example 'Net 30. Pay by bank transfer.'
taxPctNoTax rate in percent, for example: 8.25 for 8.25%.
dueDateNoYYYY-MM-DD, a real date on or after invoiceDate (422 otherwise).
clientNameNoWho the invoice is for. Needed with businessName for the document.
discountPctNoDiscount in percent, for example: 10 for 10%.
includeDocxNotrue also returns the invoice as a Word file in result.docx (filename, contentType, base64). Needs businessName and clientName.
invoiceDateNoYYYY-MM-DD, a real date (422 otherwise).
businessNameNoYour business name. Sending businessName and clientName also returns the invoice as a document: result.document, result.text and, with includeDocx, a Word file.
invoiceNumberNoInvoice number printed on the document.
currencySymbolNoSymbol printed before amounts in the document. Default $. The totals themselves are plain numbers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / discountPct / description
      Added value: +"Discount in percent, for example: 10 for 10%."
    • addedInput schema / properties / lines / description
      Added value: +"Invoice lines as [{description, qty, unitPrice}]."
    • removedInput schema / properties / lines / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / lines / items / properties / description / description
      Added value: +"A short plain-text description."
    • addedInput schema / properties / lines / items / properties / qty / description
      Added value: +"Quantity as a whole number, for example: 2."
    • addedInput schema / properties / lines / items / properties / unitPrice / description
      Added value: +"Price of one unit as a plain number, for example: 12.5."
    • addedInput schema / properties / taxPct / description
      Added value: +"Tax rate in percent, for example: 8.25 for 8.25%."
  2. Changed9 schema fields changed
    • addedInput schema / properties / businessName
      Added value: +{
      +  "description": "Your business name. Sending businessName and clientName also returns the invoice as a document: result.document, result.text and, with includeDocx, a Word file.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / clientName
      Added value: +{
      +  "description": "Who the invoice is for. Needed with businessName for the document.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / currencySymbol
      Added value: +{
      +  "description": "Symbol printed before amounts in the document. Default $. The totals themselves are plain numbers.",
      +  "maxLength": 4,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / dueDate
      Added value: +{
      +  "description": "YYYY-MM-DD, a real date on or after invoiceDate (422 otherwise).",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / includeDocx
      Added value: +{
      +  "description": "true also returns the invoice as a Word file in result.docx (filename, contentType, base64). Needs businessName and clientName.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / invoiceDate
      Added value: +{
      +  "description": "YYYY-MM-DD, a real date (422 otherwise).",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / invoiceNumber
      Added value: +{
      +  "description": "Invoice number printed on the document.",
      +  "maxLength": 60,
      +  "type": "string"
      +}
    • addedInput schema / properties / notes
      Added value: +{
      +  "description": "Notes printed at the bottom of the document.",
      +  "maxLength": 2000,
      +  "type": "string"
      +}
    • addedInput schema / properties / terms
      Added value: +{
      +  "description": "Payment terms line, for example 'Net 30. Pay by bank transfer.'",
      +  "maxLength": 1000,
      +  "type": "string"
      +}
  3. Changed3 schema fields changed
    • addedInput schema / properties / discountPct / minimum
      Added value: +0
    • addedInput schema / properties / lines / minItems
      Added value: +1
    • addedInput schema / properties / taxPct / minimum
      Added value: +0
  4. First observed

TDQS

D1.9/5.0
Behavior2/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds nothing beyond that, notably omitting the conditional side effect where returning a document, result.text, and an optional Word file depends on which optional fields are sent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two words are trivially concise but represent under-specification rather than efficient communication. There is no structure to front-load because there is no content beyond the resource noun.

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

Completeness1/5

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

For a 12-parameter tool that computes totals and can conditionally produce a rendered document and a base64 Word file, the description leaves every behavior to the schema. There is no output schema, so the description should explain what results an agent receives and under what conditions.

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?

With 100% schema description coverage across all 12 parameters, the baseline of 3 applies. The description contributes no additional meaning about how lines, taxPct, discountPct, or the document-related fields interact with the computed totals.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Invoice totals" is a noun phrase that essentially restates the tool name and title; there is no verb and no statement of what is actually produced (a computed total, a document, or both). An agent cannot distinguish this from siblings like business_receipt or business_expenses without opening the schema.

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

Usage Guidelines1/5

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

The description contains no when-to-use guidance, no alternates, and no prerequisites. Nothing indicates that supplying businessName/clientName switches the tool into document-generation mode or when that variant is appropriate.

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.

Resources