Skip to main content
Glama

Create invoice

create_invoice

Create a project invoice. project_id is required — this tool can never create a platform/subscription billing row (those have no project_id). tax_amount/total_amount are computed server-side from amount + tax_rate (or tax_set's default rate: domestic/eu_b2c=19%, eu_b2b/third_country=0%) — do not pass them yourself. If retainage_percent is given, retainage_amount is likewise computed server-side from total_amount. invoice_number is assigned automatically.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>",
      "customer_name": "<customer_name>",
      "amount": "<amount>"
    },
    "name": "create_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNo
amountYesNet amount before tax
statusNo
tax_setNoDefault 'domestic'; determines the default tax_rate
agent_idNo
due_dateNo
tax_rateNoOptional override of tax_set's default rate
project_idYes
descriptionNo
daily_log_idNo
customer_nameYes
retainage_percentNo% of total_amount withheld until final completion (pay-application retainage), default 0

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only establish that this is a non-destructive, non-idempotent, closed-world write. The description adds genuinely new behavior: tax_amount/total_amount are computed server-side from amount + tax_rate, retainage_amount is derived from total_amount when retainage_percent is set, and invoice_number is auto-assigned. Telling the agent not to pass derived values prevents a real class of malformed calls.

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?

Three dense sentences with the required-parameter constraint and the strongest restriction front-loaded, and no filler. The tax-rate parenthetical is information-heavy but earns its place; the only mild cost is that it makes a single sentence do a lot of work.

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

Completeness3/5

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

For a 12-parameter mutation with no output schema and low schema coverage, the description covers the derived-field traps and auto-numbering well. It leaves unaddressed what the call returns (an invoice id?), what status defaults to, and that line items must be added via create_invoice_line, which matters given that sibling exists.

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 only 33% across 12 parameters, so the description has to compensate and it does so for the hardest ones: it explains the tax_set default rates (domestic/eu_b2c=19%, eu_b2b/third_country=0%), that tax_rate overrides the default, and what retainage_percent means. However, several parameters (notes, status, agent_id, due_date, description, daily_log_id, customer_name) get no explanation anywhere, so the gap is only partly closed.

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 ('Create a project invoice') and immediately bounds the scope: it creates project invoices and can never create platform/subscription billing rows. That contrast with another invoice class, plus the sibling create_invoice_line existing for line items, lets an agent place the tool 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 Guidelines4/5

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

Gives an explicit when-not ('can never create a platform/subscription billing row — those have no project_id') and flags project_id as required, which is clear usage context. It does not route the agent to alternatives for the related work (adding line items, updating an invoice after creation), so it stops short of full when/when-not/alternative coverage.

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