Skip to main content
Glama
ninetails-io

gnucash-mcp

create_document

Create customer invoices, vendor bills, employee expense vouchers, or credit notes, then add line items and post them to the books.

Instructions

Create a customer invoice, vendor bill, employee expense voucher, or credit note.

The owner side derives from the document type — invoice → customer, bill → vendor, voucher → employee. Credit notes exist on both sides, so they alone require party_type ("customer" or "vendor"). After creating, add line items with add_document_entry, then post_document to put it on the books.

Args: document_type: "invoice", "bill", "voucher", or "credit_note". owner_id: The owning party's ID (customer ID for invoices, vendor ID for bills, employee ID for vouchers). ID counters are per type. party_type: Required for credit notes only ("customer" or "vendor" — which side the credit belongs to). Derived from document_type otherwise. date_opened: ISO date. Defaults to today (echoed in the response). notes: Optional notes (max 4096 characters). currency: ISO code. Defaults to the owner's currency, then the book default. term: Billterm name (e.g., "Net 30"). Optional. id: Custom document number; auto-generated when omitted. job_id: Optional Job to group under (invoices and bills; must belong to the same owner). applies_to_id: Credit notes only — the invoice/bill this credit note reverses. The link is PROVENANCE, not a constraint: apply_credit_note can net the credit against any open document from the same owner (its response notes the divergence when the applied target differs from this link).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
termNo
notesNoOptional notes. Capped at 4096 characters at the MCP boundary; oversize input rejects with a clear error.
job_idNo
currencyNo
owner_idYes
party_typeNo
date_openedNo
applies_to_idNo
document_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv1.4.4

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavioral details: owner-side derivation from document type, per-type ID counters, default date/currency behavior, the conditional requirement for party_type on credit notes, and the subtle provenance semantics of applies_to_id. These are exactly the non-obvious traits an agent needs to know.

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?

The description is long, but every section earns its place: purpose, workflow, then parameter semantics. The most critical behavioral nuance (provenance not constraint) is clearly surfaced. Formatting with code literals and per-argument lines makes it scannable despite the length.

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?

Given 10 parameters, complex conditional logic, and an output schema, the description is complete. It covers the full lifecycle (create → add entries → post), defaulting behavior, credit-note specifics, and even notes a response echo for date_opened. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 10%, so the description carries the full burden for the other 90%. It meaningfully explains all 10 parameters, including defaults, conditional requirements, allowed values, and constraints like 'job_id must belong to the same owner'. This is far beyond what the input schema provides.

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 description opens with a specific verb and resource ('Create a customer invoice, vendor bill, employee expense voucher, or credit note') and enumerates the four document types. It also distinguishes itself from sibling tools like add_document_entry and post_document by sketching the creation workflow.

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?

The description clearly states when to use this tool: to create the four document types. It goes further and routes the agent through the follow-up workflow ('add line items with add_document_entry, then post_document'), which is valuable context. It does not explicitly list exclusions or alternatives for non-document creation (e.g., create_transactions), but the usage context is strong.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ninetails-io/gnucash-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server