Skip to main content
Glama

Draft a customer invoice

create_invoice

Save a DRAFT customer invoice in a contracting business's Invoices & tax. Every line has a kind (labor, material, …) because the sales tax depends on it, and the tax is worked out by the business's tax engine from job_site.state — never typed. A line with no unit_price is refused, never billed at $0.00. A draft is not sent, not in the books and not payable until a person issues it in Seayora. Usually queued for the account holder to approve (read staged).

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": "create_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
memoNo
linesYes
termsNo
titleNo
job_idNoThe job it bills.
job_siteNoWhere the work was — the sales tax is sourced to it.
customer_idNoA client from `list_customers`. Or give `customer_name` and `customer_email`.
customer_nameNo
customer_emailNo
property_classNo

Output Schema

NameRequiredDescriptionDefault
idNoThe created or updated record's id, when the write was applied rather than staged.
noteNoWhy the result was truncated, when it was.
stagedNoTRUE means nothing has changed yet — the write is queued in the account holder's Approvals queue in Seayora. Say it is waiting for approval; never report it as done.
draft_idNoThe staged proposal's id, when it was queued rather than performed.
truncatedNoPresent and true when the result was too large to return in full. Treat it as a partial answer.
total_availableNoHow many rows existed before truncation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations, it discloses meaningful behavior: drafts have no accounting or payment effect until a person issues them, sales tax is computed by the business's tax engine from job_site.state rather than supplied, a line missing unit_price is rejected rather than billed at zero, and the result is usually held for account-holder approval. It does not address duplicate-creation behavior (relevant since idempotentHint=false) or permission requirements, but the added context is substantial.

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

Conciseness4/5

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

Four sentences, front-loaded with the action and scope, then constraints. Each sentence carries information, though the clause about human issuance could be tightened and 'in a contracting business's Invoices & tax' is slightly awkward phrasing.

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

Completeness4/5

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

For a 10-parameter tool with nested `lines` and a nested `job_site`, the description covers the risky and non-obvious parts: tax sourcing, required line fields, zero-price rejection, and draft lifecycle. Output schema exists so return values need not be detailed. Remaining gap is customer identification and terms defaults, which an agent will have to infer from 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?

With schema description coverage at 30% across 10 parameters, the description must carry more weight. It adds real meaning for `kind` (tax depends on it, so it is required and enumerated), `job_site.state` (tax sourcing), and `unit_price` (omitted means refused; discounts carry a positive amount). It says nothing about customer_id vs customer_name/customer_email, terms, property_class, job_id or `staged` beyond naming it, leaving half the surface undocumented in both schema and prose.

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

Purpose4/5

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

The description opens with a specific verb and resource: 'Save a DRAFT customer invoice in a contracting business's Invoices & tax.' The DRAFT qualifier plus 'not sent, not in the books and not payable until a person issues it' separates it from issue/update operations. It never names a sibling alternative (e.g. invoice_billable_work or invoice_estimate) to route the agent, so it falls short of the top score.

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?

Usage is implied: create the draft here, a human approves later, and the caller should read `staged`. There is no explicit when-not-to-use guidance and no mention of which sibling to prefer when billing from existing time, estimates or jobs, which is exactly the ambiguity a caller faces among invoice_billable_work, invoice_estimate and invoice_jobs.

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