Skip to main content
Glama

regenerate_invoice

Destructive

Regenerate the PDF for an invoice by id. Overwrites the stored billing details on the invoice with the current ones from the source payment and its customer, overwrites the PO number when the payment has one, and fills in the customer email, customer name and product title only where the invoice has none. It then replaces the existing hosted PDF - the previous PDF is not kept. Preserves line items, amounts, taxes, and status. The returned invoiceUrl is a fresh signed link.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the invoice to regenerate.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, and the description goes well beyond that by disclosing exactly what is overwritten (billing details, PO number), what is only filled when empty (email, name, product title), what is preserved (line items, amounts, taxes, status), and that the previous hosted PDF is discarded. This is unusually rich behavioral context.

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?

The purpose is front-loaded in the first sentence, and the remaining sentences each carry distinct, useful information about overwrite/preserve semantics. It is slightly dense and run-on, but nearly every clause earns its place.

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?

Annotations cover the safety profile and an output schema exists, so return values need not be explained; nonetheless the description notes the returned `invoiceUrl` is a fresh signed link. For a single-parameter mutation tool, nothing an agent needs to invoke it correctly is missing.

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 one parameter at 100% schema description coverage and a defined pattern, the schema already documents everything about `id`. The description only echoes "by id" and adds no format or sourcing detail beyond the schema, so the baseline of 3 applies.

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 ("Regenerate the PDF for an invoice by id") and gives the exact scope of the operation. It is unambiguous, and no sibling tool performs this operation, so an agent can identify it without confusion.

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?

The description thoroughly explains what happens when the tool runs, which implies when it is useful (after source payment/customer data changes). However, it never explicitly states when to choose this over alternatives like get_invoice or list_invoices, nor does it state preconditions or exclusions.

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