Skip to main content
Glama
InvoicePDFs MCP Server

InvoicePDFs MCP Server

Official
by invoicepdfs

document_transition

Move documents through allowed lifecycle states to finalize drafts, record sent or paid status, void, archive, or restore them; invalid transitions are rejected.

Instructions

Move a document through its lifecycle.

  • finalized — Issue a draft: fix its number and totals.

  • sent — Record that the document reached the customer.

  • paid — Record that the document was paid in full.

  • unpaid — Undo mark_paid, returning the document to sent.

  • void — Cancel a document that was issued.

  • archived — Move a document out of the active list.

  • restored — Bring an archived document back to finalized.

Each transition is only valid from certain states and is refused with 409 otherwise. To actually email a document to its customer, use document_send — to: "sent" only records that it happened.

Input Schema

NameRequiredDescriptionDefault
toYesThe state to move the document to. - `finalized` — Issue a `draft`: fix its number and totals. - `sent` — Record that the document reached the customer. - `paid` — Record that the document was paid in full. - `unpaid` — Undo `mark_paid`, returning the document to `sent`. - `void` — Cancel a document that was issued. - `archived` — Move a document out of the active list. - `restored` — Bring an archived document back to `finalized`.
document_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.2/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 reasonably well: it discloses the 409 refusal on invalid transitions and clarifies that `to: "sent"` is a record-keeping action rather than an actual delivery. It omits permissions/auth requirements and whether voiding is irreversible, which matters for a lifecycle-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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded purpose sentence, scannable bullets per transition, and a closing caveat that prevents the single most likely misuse. No filler, and the duplication of the enum list is defensible as authoritative state-machine semantics.

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?

For a 2-parameter state-machine tool with no annotations and no output schema, the description covers valid targets, failure mode (409), and the sibling boundary. It does not state what the call returns or which role can perform each transition, leaving modest gaps.

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?

The enum values are already fully documented in the schema, and the description's bullet list is essentially a verbatim restatement of the `to` property description. `document_id` has no description in either place, and the description does not compensate, so schema coverage of 50% is only partially offset.

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 ("Move a document through its lifecycle") and enumerates every legal target state, so an agent knows exactly what the tool mutates. The closing sentence explicitly separates it from `document_send`, which is the most confusable sibling.

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?

Bullets define what each transition means operationally (e.g. `unpaid` undoes `mark_paid`, `restored` revives an archived doc) and route the agent to `document_send` when actual emailing is intended. The gap is that it never states which source state each transition requires, saying only "valid from certain states," which leaves the agent to discover the state machine by trial and 409.

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