Skip to main content
Glama

Create Invoice from Proposal

create_invoice_from_proposal
Idempotent

Converts an accepted proposal into a draft invoice in one step. A workshop proposal must be won (status "accepted") and linked to a client: its priced rows become the invoice lines, and a deposit it asks becomes the invoice's payment schedule (depositDue). An older quote (marked legacy: true) must have status "accepted" and converts from its own tasks; if no client by its client name exists yet, one is created. Returns the invoice ID and number. A proposal converts once: calling again returns the invoice it already became (alreadyConverted: true). A proposal in Trash is not found. Creates the invoice as a draft; nothing is sent. Handles requests like "invoice that proposal", "convert the proposal for [client]", or "create an invoice from the accepted proposal".

Input Schema

NameRequiredDescriptionDefault
dueDateNoOverride due date as ISO string (overrides netDays if provided)
netDaysNoPayment terms in days (default 30)
proposalIdYesID of the accepted proposal to convert

Output Schema

NameRequiredDescriptionDefault
amountNoInvoice total, in currency units
statusNo
currencyNo
invoiceIdNo
depositDueNoDue on acceptance, from the invoice payment schedule; absent when none
invoiceNumberNo
lineItemCountNo
unresolvedCountNoPriced rows with no figure yet, left off the invoice
alreadyConvertedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint false, idempotentHint true, destructiveHint false), and the description adds materially: idempotency is explained concretely (re-calling returns alreadyConverted: true), the side effect of auto-creating a missing client, draft-only behavior ('nothing is sent'), and Trash proposals being invisible. This is exactly the extra context annotations cannot carry.

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?

Dense but well front-loaded: the conversion contract comes first, edge cases (legacy, alreadyConverted, Trash) follow, and the example phrasings land last. Slightly long, but nearly every sentence carries distinct behavioral information.

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?

With an output schema present, return values need not be detailed, and the description still notes the returned invoice ID/number. Preconditions, side effects, idempotency and edge cases are all covered for a 3-param mutation tool.

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 coverage is 100%, so proposalId, dueDate and netDays are already documented in the schema. The description explains downstream effects like depositDue but does not add format or precedence detail beyond what the schema states, so the baseline 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+resource ('converts an accepted proposal into a draft invoice in one step') and the transformation logic (priced rows become invoice lines, deposit becomes payment schedule). An agent can distinguish this from create_month_invoice_drafts and preview_month_billing without opening any schema.

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?

Gives clear preconditions (proposal must be status 'accepted' and linked to a client; legacy quotes follow a variant path) and example utterances that map intent to tool. It stops short of explicitly naming what to use instead when the proposal is not accepted or when bulk/monthly invoicing is wanted.

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