Skip to main content
Glama

create_invoice

Create a DRAFT invoice for a client; the server assigns the number (INV-YYYY-NNNN), computes taxes from the client's jurisdiction and rounds per invoice rules — never state amounts yourself. Lines need description, qty and unitPrice (decimal). Due date defaults to 14 days from today. Pass a stable requestId when retrying: the same requestId returns the same invoice instead of creating a duplicate. Use send_invoice to email it — do NOT send without the user's confirmation.

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": {
      "clientId": "<clientId>",
      "lines": "<lines>"
    },
    "name": "create_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYes
notesNo
dueDateNoDefaults to today + dueInDays
clientIdYes
dueInDaysNo
issueDateNoDefaults to today
requestIdNoIdempotency key

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses a lot: the server assigns the number, computes taxes and rounds, the agent must never state amounts itself, drafts are created rather than sent, and retries are idempotent. It stops short of stating permission/auth requirements or what happens on validation failure, so it is not exhaustive.

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?

Three dense sentences, front-loaded with the outcome (a draft, server-computed totals), then the line requirements, then idempotency and the send hand-off. No filler and no repetition of the name.

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 7-parameter mutation with no annotations and no output schema, the description covers the surprising behaviors (server-side numbering, tax computation, draft state, idempotency) that an agent would otherwise get wrong. The remaining gap is what the call returns (invoice id/number) and any auth prerequisites.

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 coverage is only 43%, and the description clarifies the line object's required fields, the 14-day due-date default, and — most usefully — the retry semantics of requestId beyond the terse 'Idempotency key' label. However notes, issueDate, discountPct, taxJurisdictionId and productId get no explanation in either place, so it does not fully compensate for the coverage gap.

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 a DRAFT invoice') and adds the important qualifier that the result is a draft, not a sent invoice. That distinguishes it immediately from the sibling send_invoice.

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?

Explicitly routes the agent to send_invoice for emailing and adds a hard precondition ('do NOT send without the user's confirmation'). It also tells the agent when to pass requestId ('when retrying'), which is a usage rule rather than a schema fact.

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