Skip to main content
Glama

Generate draft invoice

generate_invoice
Destructive

Generate a DRAFT invoice from a customer's approved billable hours over a billing period. The draft is editable and can be deleted before it is issued.

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": {
      "customer_id": "<customer_id>",
      "period_start": "<period_start>",
      "period_end": "<period_end>"
    },
    "name": "generate_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoOptional notes to include on the invoice.
due_dateNoOptional explicit due date (ISO 8601). Overrides payment_terms-based calculation.
groupingNoHow to group approved hours into line items: "project" (default) or "task".
period_endYesBilling period end date (ISO 8601, e.g. 2026-05-31).
customer_idYesId of the customer to invoice.
period_startYesBilling period start date (ISO 8601, e.g. 2026-05-01).
payment_termsNoPayment terms string, e.g. "Net 30" (default).
idempotency_keyNoOptional caller-supplied key; retrying with the same key returns the original result instead of acting twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and idempotentHint=false, so the safety profile is covered. The description adds genuinely useful context by framing the output as a reversible DRAFT that can be edited or deleted before issuance, which softens the destructive flag. It omits whether approved hours get consumed/locked, what permissions are required, and what happens if no approved hours exist.

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?

Two tight sentences, zero filler, and the core action plus the reversible-draft behaviour are front-loaded. Nothing redundant with the title or schema.

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

Completeness3/5

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

For an 8-parameter mutation with no output schema, the definition covers the action and lifecycle but not the return shape (invoice id/status) or edge cases such as an empty billing period. Adequate, but an agent calling it correctly would still benefit from knowing what comes back and whether hours are marked billed.

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 description coverage is 100%, so every parameter (period dates, grouping, payment_terms, due_date override, idempotency_key) is documented in the schema itself. The description adds only the notion that the period scopes which approved hours are pulled in; it does not elaborate on grouping semantics or the due_date/payment_terms interaction.

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?

States a specific verb (generate) plus resource (draft invoice) and names the input source (a customer's approved billable hours over a billing period). It distinguishes itself from update_draft_invoice and delete_draft_invoice by being the creation step, though it never names those siblings explicitly.

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?

Implies the precondition 'approved billable hours' exist and describes the draft lifecycle (editable and deletable before issue), which lightly signals this precedes issue_invoice. It gives no explicit when-not guidance or naming of the alternative editing/issuing tools.

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