Skip to main content
Glama
cotletdev

Contractor Foreman MCP Server

by cotletdev

Create invoice

create_invoice

Creates a draft invoice for a project or customer with priced line items, so you can later submit, email, or record payments against it without sending it immediately.

Instructions

Creates a draft invoice for a project or customer, with priced line items.

Saves a new invoice in the Draft status. With project_id it bills that project's customer. Without one, customer_id is required. A description needs due_date in the same call. items are plain priced lines (name, type, quantity, unit, unit cost in dollars, markup percent). It is not sent. update_invoice with status submitted marks it sent and lets record_payment take payments. send_invoice emails it after your OK.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNo
numberNoYour own number. Default: the app's next.
due_dateNo
project_idNoFrom list_projects. Its customer is billed.
customer_idNoDirectory customer id. Needed without a project.
descriptionNoShown on the invoice. Needs due_date in the same call.
invoice_dateNoDefault: today.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-destructive, non-idempotent, open-world write; the description adds the crucial behavior that the invoice lands in Draft and is not sent, and lays out the downstream lifecycle. It does not warn that repeated calls will create duplicate drafts (non-idempotent) or mention any limits, so it falls slightly short of full disclosure.

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?

The core behavior is front-loaded in the first two sentences, and every subsequent sentence carries a routing rule. The later sentences are telegraphic fragments ('It is not sent.', 'send_invoice emails it after your OK.') and there is mild repetition around 'not sent'/'marks it sent', but the content density is high.

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 create mutation with no output schema and no required parameters (conditional requirements instead), the description covers the draft state, the project/customer branch, line item shape, and the lifecycle to sending and payment. The main missing piece is what the call returns (e.g., the new invoice id) that later update_invoice/record_payment calls would need.

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 71%, and the description adds real meaning: the project_id/customer_id dependency, the description–due_date coupling, and the contents of each item line (name, type, quantity, unit, unit cost in dollars, markup percent). It omits number, invoice_date, and cost_code_id, so it does not fully compensate for the uncovered parameters.

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 first sentence gives a specific verb and resource ('Creates a draft invoice') plus scope ('for a project or customer, with priced line items'). It is immediately distinguishable from send_invoice and update_invoice by the explicit Draft status and 'It is not sent.'

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?

It gives the exact branching rule: with project_id the project's customer is billed; without one customer_id is required. It also names the follow-on tools (update_invoice with status submitted, record_payment, send_invoice) and the ordering constraint that description requires due_date in the same call.

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

Deploy Server

Other Tools