Skip to main content
Glama

create_sales_invoice

Creates a sales invoice or estimate with customer, issue date, and line items, applying default 20% Turkish VAT.

Instructions

Create a sales invoice (or estimate) with line items. VAT default is 20% (Turkey standard).

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": {
      "contact_id": "<contact_id>",
      "issue_date": "<issue_date>",
      "items": "<items>"
    },
    "name": "create_sales_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesInvoice line items
currencyNoCurrency (Turkish Lira is TRL, not TRY)TRL
due_dateNoDue date (YYYY-MM-DD)
item_typeNoDocument typeinvoice
contact_idYesCustomer contact ID
issue_dateYesIssue date (YYYY-MM-DD)
descriptionNoInvoice description

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden and largely drops it. It does not say whether the created document is a draft or finalized, whether an invoice number is assigned, whether an e-invoice must be issued separately, whether it affects stock/accounting, or whether the call is idempotent.

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, front-loaded sentences with no filler. The second sentence, however, mostly restates the schema's vat_rate default and could have been spent on information the schema lacks.

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?

This is a 7-parameter mutation tool with no annotations and no output schema. The description never covers the post-creation state (draft vs issued), what identifier is returned for follow-up calls like record_sales_invoice_payment, or whether currency/VAT interact with Turkey e-invoice rules — all of which an agent needs before invoking it.

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 description coverage is 100%, so all seven parameters including nested item fields are already documented with enums, defaults and formats. The VAT sentence adds nothing beyond the schema's own vat_rate text ('Turkey standard is 20 since 2023'), so the baseline 3 applies.

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?

States a specific verb and resource: 'Create a sales invoice (or estimate) with line items', which is more precise than the bare tool name because it flags that the same call can produce an estimate. It does not distinguish this from the sibling create_e_invoice or explain how an estimate created here relates to convert_estimate_to_invoice.

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 when-to-use guidance at all — nothing says when to pick this over create_e_invoice, or when to create an estimate here rather than via the estimate conversion flow. No prerequisites (contact must exist, product must exist, numbering/e-invoice implications) are mentioned.

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