Skip to main content
Glama

Simpler.Asia

invoice_item_create

Adds one line item to an invoice. unit_price_cents is integer CENTS, 0 or more ($15.00 → 1500); quantity is 0.001 to 1,000,000 with up to 3 decimals (1.5 hours → 1.5); unit is an optional label (hr, kg); discount_bps is an optional line discount (10% → 1000). quantity × unit_price_cents is at most 10,000,000,000. Refuses a negative price (send discount_bps instead), a 'paid' parent (retire the payment first) and a 'cancelled' parent (issue a new invoice). Re-derives the invoice's paid/sent status. tax_code is the line's code under the document's tax_scheme, refused on a document without a scheme. NEXT: invoice_read to see the updated total.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNo
positionNo
quantityNoHow many, up to 3 decimals (1.5 hours → 1.5). A new line defaults to 1.
tax_codeNo
invoice_idNo
descriptionNo
discount_bpsNoOptional line discount in basis points: 10% → 1000, none → 0. A discount is never a lower or negative price.
unit_price_centsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (non-destructive, non-idempotent, closed-world), and the description adds real substance on top: parent-status preconditions, the re-derivation of paid/sent status as a side effect, and the aggregate ceiling of quantity × unit_price_cents ≤ 10,000,000,000. The non-idempotent hint is implicit (each call adds a line) rather than stated, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose and the unit/discount conventions, which is good, but the paragraph then packs validation, pricing ceiling, three refusal rules, status side effects and a next-step hint into an undifferentiated block. Every clause carries information, yet the density makes it hard to scan and the refusal rules deserve their own structure.

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 an 8-parameter mutation with no output schema, the description covers pricing semantics and failure modes well but says nothing about where the new line lands ('position'), what 'description' does on the line, or the needed invoice_id. An agent could call it, but ordering and identification behavior remain guesswork.

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 only 25%, so the description must carry the load and mostly does: unit_price_cents is integer CENTS with a $15.00 → 1500 example, quantity is bounded with a 1.5 hours example, unit is labeled optional, discount_bps is explained as the 10% → 1000 basis-point form, and tax_code is tied to the document's tax_scheme. It leaves 'position', 'description' and 'invoice_id' unexplained, so not full compensation.

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 with scope: 'Adds one line item to an invoice.' This distinguishes it cleanly from invoice_item_update, invoice_item_delete, invoice_item_list and from the parallel quote_item_create without needing to open 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 Guidelines5/5

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

Goes well beyond implied usage: it names the rejected conditions (paid parent, cancelled parent, negative price), the prescribed alternatives ('send discount_bps instead', 'retire the payment first', 'issue a new invoice') and the follow-up call ('NEXT: invoice_read to see the updated total'). The agent knows both when to call it and what to do when it refuses.

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