Skip to main content
Glama

duplicateInvoice

Duplicate an invoice into a new draft for the same customer and location, with the same lines, quantities and unit prices but without their discounts. Returns the new draft, which can then be edited and issued. An invoice of a subscription cannot be duplicated. Get invoiceId from getInvoices. The route is not idempotent: after a failure or timeout, check the result with the list tool before calling again, or a second record is created. Never invent UUIDs; only use values from prior tool responses.

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": {
      "invoiceId": "<invoiceId>"
    },
    "name": "duplicateInvoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoiceIdYesThe id of the invoice.

Output Schema

NameRequiredDescriptionDefault
invoiceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only declare this is a non-read-only, non-destructive, closed-world write; the description adds substantially more — exactly what is copied, that discounts are dropped, that the result is an editable draft, the subscription restriction, and the non-idempotency warning. The only thing left unsaid is whether the source invoice is altered in any way (implied no by 'duplicate', but not stated).

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?

Front-loaded with the core action and the exact copy semantics, then restrictions, then the idempotency warning. Every sentence carries non-redundant information; nothing could be cut without losing guidance.

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?

For a one-parameter mutation tool with an output schema, this is complete: it covers what happens, what is excluded, where the ID comes from, and what to do after a timeout. Return-value detail is correctly delegated to the output schema.

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% and the single UUID parameter is already documented, so the baseline is 3. The description goes beyond the schema by telling the agent where the invoiceId comes from and warning against fabricated UUIDs, which is meaningful operational guidance.

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 ('Duplicate an invoice into a new draft') and immediately scopes it: same customer, location, lines, quantities and unit prices, but discounts stripped. That level of specificity clearly separates it from createInvoice and from sibling duplicators like duplicateEvent or duplicateTemplate.

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?

Gives explicit when-to-use routing ('Get invoiceId from getInvoices'), an exclusion ('An invoice of a subscription cannot be duplicated'), and a recovery protocol after failure ('check the result with the list tool before calling again'). The agent knows both how to obtain the input and when to stop.

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