Skip to main content
Glama

generate-order-invoice

Idempotent

Get one order's invoice as a PDF (optionally also a JPEG of the first page) to send to a buyer who asks for one — the same document the app prints under Orders > Print > Generate Invoice, built from the company's invoice template. It is the 3Dsellers invoice, not the marketplace's own receipt.

Returns pdfUrl (and imageUrl with image: true). The links expire in 5 minutes because the invoice carries the buyer's name and address: download the file and attach it, do not forward the link. With no options the invoice on file is reused; pass regenerate: true after the order or the template changed, or templateId to use a template other than the default. orderId is the id from get-orders. Authenticated via bearer token.

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": {
      "orderId": "<orderId>"
    },
    "name": "generate-order-invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageNoAlso render a JPEG of the first page, as imageUrl
orderIdYesThe order id (the id field from get-orders)
regenerateNoRender a new invoice even when one is on file
templateIdNoInvoice template id; omit for the company's default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that links expire in 5 minutes because the document carries buyer PII, and instructs the agent to download and attach rather than forward the link. It also explains the caching/idempotency behavior and the bearer-token auth requirement, which is exactly the context the readOnlyHint=false / idempotentHint=true pair needs to be actionable.

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?

Front-loaded with purpose and disambiguation, then returns/expiry, then parameter guidance, then auth. Three tight paragraphs with no filler; the trailing 'Authenticated via bearer token' is the only line that borders on redundant server-level boilerplate.

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?

There is no output schema, yet the description names the return fields (pdfUrl, imageUrl) and the expiry behavior, so an agent can act on the result. Prerequisite (orderId from get-orders), caching, regeneration and PII handling are all covered.

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%, so the baseline is 3; the description still adds meaning by giving the trigger for regenerate ('after the order or the template changed') and the default semantics of templateId, and by naming the returned imageUrl for image: true. It stops short of nothing significant, but most of the field-level detail is already in the schema.

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 ('Get one order's invoice as a PDF') plus an optional variant (JPEG of the first page). It also disambiguates from the closest sibling by declaring 'It is the 3Dsellers invoice, not the marketplace's own receipt', which separates it from get-order-invoice without either schema being opened.

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?

Names the triggering scenario ('send to a buyer who asks for one'), the default path (reuse the invoice on file), and the explicit condition for the alternative ('pass regenerate: true after the order or the template changed, or templateId to use a template other than the default'). It also points at get-orders as the source of orderId.

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.