Skip to main content
Glama

create_invoice

Creates an unbooked Fortnox invoice for a customer from article rows, with optional freight, currency and references. Invoice quantities count as delivered and reduce stock.

Instructions

Create an invoice (unbooked). rows: [{article_number, quantity, price, description?}]. Invoice quantities are delivered quantities and take the goods out of stock.

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": {
      "customer_number": "<customer_number>",
      "rows": "<rows>"
    },
    "name": "create_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsYes
dry_runNo
freightNo
remarksNo
currencyNo
languageNo
extra_fieldsNo
our_referenceNo
your_referenceNo
customer_numberYes
terms_of_paymentNo
your_order_numberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/5.0
Behavior3/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 disclose one critical side effect: delivered quantities are deducted from stock, which warns the agent of an inventory mutation. However, it omits reversibility (cancel_invoice/credit_invoice exist), required permissions, and never mentions the dry_run flag, which is arguably the most important safety control for a write tool.

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?

Two short sentences, front-loaded with the action and status, followed by the payload shape and the stock consequence. Nothing is wasted, though the line-wrapped fragment after the colon reads slightly as a note rather than structured guidance.

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

Completeness2/5

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

For a 12-parameter mutating tool with no annotations and no output schema, the definition leaves major gaps: dry_run is undocumented, no return shape or failure mode is implied, and the relationship to bookkeep_invoice is left implicit. Only the rows payload and the stock deduction are covered adequately.

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

Parameters2/5

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

Schema description coverage is 0% across 12 parameters, and the description only documents the internal shape of `rows` (article_number, quantity, price, description?) — genuinely useful since the item schema is a bare object. The other eleven parameters, including dry_run, currency, language, terms_of_payment, and the reference fields, receive no explanation at all, leaving a significant compensation gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Create an invoice') and adds a meaningful state qualifier ('unbooked') that distinguishes it from booking-related siblings such as bookkeep_invoice. It stops short of naming any sibling explicitly, so an agent must infer the boundary from surrounding tool names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no statement of when to choose this over bookkeep_invoice, order_to_invoice, credit_invoice, or create_order, and no stated prerequisites (e.g., customer must exist). The only contextual hint is the 'unbooked' status and the stock-impact note, which describe outcome rather than selection criteria.

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