Skip to main content
Glama

Create invoice document

well_create_invoice_document

Render an existing invoice as a print-ready PDF and attach it as the invoice's source document.

The letterhead carries the issuing company's own mark when Well has one on file, and otherwise sets the issuer's name as text. Never promise a logo.

Use this tool when the user asks to generate, render, or attach a PDF for an invoice that already exists in the workspace. This does NOT email or send the invoice anywhere — it only creates and attaches the file.

REQUIRED: invoice_id (the invoice must already exist)

Refused if the invoice is already linked to a REAL ingested document (an upload, a connector import, or a provider-issued PDF) — that source of truth is never overwritten.

Returns { success: true, invoice_id, document_id, reference_number, file } on success, or { success: false, error } on failure.

file carries the rendered PDF's name and size plus the links to fetch it: download_url (saves the file), signed_url (opens it), and app_url (the document in Well). Hand the user download_url when they ask for the PDF itself. Both signed links stop working at expires_at; app_url does not.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_idYes
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which.
idempotency_keyNoOptional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
errorNo
successYes
invoice_idNo
document_idNo
reference_numberNo

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, leaving write behavior undisclosed. The description fills this gap thoroughly: it attaches the PDF, never overwrites a real ingested source document, explains the logo fallback, and details refusal conditions. It also clarifies return behavior and link expiry.

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?

The description is longer than average but every section earns its place: core action, subtle logo behavior, usage condition, refusal condition, and return details with link semantics. It is scannable and front-loaded with the main verb and resource.

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?

Even with an output schema present, the description usefully explains the return contract including file links and expiration semantics. It covers preconditions, refusal cases, logo caveats, and non-email scope, making the tool callable without further investigation.

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 67%, and the description adds meaningful semantics for invoice_id by marking it required and requiring the invoice to already exist. workspace_id and idempotency_key are already well-described in the schema, so the description doesn't need to repeat them, though it doesn't tie them into the tool flow.

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 ('Render an existing invoice as a print-ready PDF and attach it as the invoice's source document') plus a concrete resource. Clearly distinguishes this from sibling tools like well_create_invoice_from_data and well_update_invoice by anchoring on an already-existing invoice.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use it: when the user asks to generate, render, or attach a PDF for an invoice already in the workspace. It also states what it does not do (does not email or send) and when it is refused, though it does not name an alternative tool to use when the invoice does not yet exist.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: CRUD for companies, people, and invoices; financial analytics (cash, cost, runway, holdings); connector management and invocation; schema discovery; querying; reconciliation; and contact channel management. No two tools could be confused for the same action.

Naming Consistency5/5

All tools follow the `well_verb_noun` pattern with consistent verb choices (create, get, list, update, delete, add, remove, run, resolve, query, invoke). The naming is predictable and makes the tool's purpose immediately clear.

Tool Count4/5

With 26 tools, the set is slightly above the ideal 3-15 range, but every tool earns its place given the breadth of the domain (CRM, invoicing, financial analytics, reconciliation, connector management). The count is well-scoped and not excessive.

Completeness4/5

The tool surface covers core CRUD, financial KPIs, reconciliation, and connector management. Minor gaps exist (e.g., no direct tool to update contact channels or manage accounts), but the query and schema tools allow agents to work around them, and the primary workflows are fully supported.

Resources