Skip to main content
Glama

Draft an invoice (no sending)

sef_draft_invoice

Builds a local UBL 2.1 invoice draft from a profile and line items, returns totals plus an approval code, and does not submit it to SEF. Show the result to the user before sending.

Instructions

Builds a UBL 2.1 invoice locally from the profile and the given lines, stores it as a draft and returns totals plus an approvalCode. Nothing is sent to SEF. Always show the result to the user before sending.

Input Schema

NameRequiredDescriptionDefault
linesYes
notesNoExtra notes, added after profile and customer default notes
numberYesInvoice number exactly as it should appear on the invoice
dueDateNoDue date; defaults to issueDate + paymentDueDays
customerYesCustomer id or PIB from the profile
issueDateYesIssue date, YYYY-MM-DD
periodEndNo
sendToCirNo
attachmentsNoPDF file paths relative to SEF_MCP_ATTACHMENTS_DIR (limit SEF_MCP_MAX_ATTACHMENTS, default 2)
orderNumberNo
periodStartNo
deliveryDateNoDatum prometa (mandatory on SEF since 3.14). Defaults to periodEnd, else issueDate — confirm with the user.
contractNumberNo
paymentReferenceNoPoziv na broj

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare only the generic flags (readOnlyHint=false, destructiveHint=false, openWorldHint=false, idempotentHint=false); the description adds the important fact that the write is local-only and no network send occurs, plus that an approvalCode and totals come back. It does not address whether repeated drafting is safe, whether drafts expire, or what validation failures look like, but the core behavioral context is supplied.

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?

Two sentences, front-loaded with the operation and immediately followed by the critical non-sending caveat and the workflow instruction. No filler or redundancy.

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?

The description compensates for the absent output schema by naming the return (totals plus approvalCode) and clarifies the local-draft model, which is valuable for a 14-parameter mutation tool. However, with only 57% schema coverage and no annotations beyond generic hints, gaps remain around the undocumented optional fields, whether the stored draft must be retrieved with sef_get_draft, and any validity/auth constraints.

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 57%, so the schema itself documents several parameters (number, dueDate, customer, issueDate, deliveryDate, attachments, notes, unitCode). The description only gestures at 'the profile and the given lines' and does not clarify the many undocumented optional fields such as sendToCir, periodStart/periodEnd, orderNumber, or contractNumber. Baseline 3 is appropriate given partial schema coverage and minimal added meaning.

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 ('Builds a UBL 2.1 invoice ... stores it as a draft and returns totals plus an approvalCode') and adds the decisive scope boundary 'Nothing is sent to SEF', which cleanly separates it from sef_send_invoice. An agent can identify the operation 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?

'Nothing is sent to SEF' plus 'Always show the result to the user before sending' establishes the draft-then-send workflow and implies sef_send_invoice is the follow-up step, which is clear usage context. It stops short of naming that sibling explicitly or stating when to prefer it over other paths (e.g., retrieving via sef_get_draft).

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