Skip to main content
Glama
InvoicePDFs MCP Server

InvoicePDFs MCP Server

Official
by invoicepdfs

document_send

Queues a finalized document to be emailed with an existing PDF render attached, or sends it without an attachment when PDF attachment is disabled.

Instructions

Queue the document to be emailed, with its PDF attached.

The document must be finalized; sending a draft is a 409. attach_pdf defaults to true, and on that path a render must already exist — the email attaches an existing render rather than making one — so the natural sequence is create, finalize, render, send, and sending straight after finalizing is refused with No render exists for this document. Send with attach_pdf: false and no render is needed, because none is attached.

Returns 202 with the delivery in queued. The mail is sent in the background and retried on transient failure; poll GET /deliveries/{id} for the outcome.

Input Schema

NameRequiredDescriptionDefault
ccNo
toYes
bccNo
messageNo
subjectNo
attach_pdfNo
document_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it: it discloses the 409 on drafts, the exact 'No render exists for this document' refusal, the 202 response with the delivery in `queued`, and that mail is sent asynchronously with retries, plus the polling endpoint for outcome. It omits permission/scope requirements and any duplicate-send or idempotency behavior, which are the remaining gaps for a mutation tool.

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 the action, then preconditions, then the response contract, in three tight paragraphs. A few phrases are more verbose than needed ('and on that path a render must already exist', the repeated restatement of the no-render case), but nothing is off-topic.

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

Completeness4/5

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

There is no output schema, and the description supplies the return contract (202, `queued`, background delivery, poll `GET /deliveries/{id}`), which is exactly what an agent needs. For a 7-parameter, no-annotation mutation tool it is close to complete, with only auth/permission expectations and recipient-field semantics left implicit.

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 0% across 7 parameters, so the description must compensate. It does so well for the non-obvious one — attach_pdf's default of true and the render-existence consequence of each value — and ties document_id to the finalize prerequisite, but to/cc/bcc/subject/message get no explanation beyond their conventional names and examples.

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?

The opening sentence gives a specific verb and resource ('Queue the document to be emailed, with its PDF attached'), which cleanly separates it from document_render (makes a render) and document_transition (finalizes). An agent can identify the operation without opening the schema.

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?

Explicit preconditions are stated: the document must be finalized (draft sends are a 409) and, under the default attach_pdf path, a render must already exist. It spells out the correct call sequence (create, finalize, render, send), names the failure mode for skipping a step, and gives the alternative path (attach_pdf: false) that removes the render requirement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.