Skip to main content
Glama
gacabartosz
by gacabartosz

ksef_draft_create

Create a new invoice draft with automatic net/VAT/gross calculation. Edit locally before validating and sending to the Polish KSeF e-Invoice system.

Instructions

Utwórz nowy draft faktury. Draft jest zapisywany lokalnie i może być edytowany przed walidacją i wysłaniem do KSeF. Oblicza automatycznie kwoty netto/VAT/brutto.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesPozycje faktury
buyerNipYesNIP nabywcy
currencyNoWaluta (domyślnie PLN)
sellDateNoData sprzedaży (YYYY-MM-DD)
buyerNameYesNazwa nabywcy
issueDateYesData wystawienia (YYYY-MM-DD)
sellerNipYesNIP sprzedawcy (10 cyfr)
sellerNameYesNazwa sprzedawcy
buyerAddressNoAdres nabywcy
invoiceNumberYesNumer faktury
sellerAddressNoAdres sprzedawcy

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It clearly discloses that the draft is saved locally, that it is not sent to KSeF yet, that it can be edited later, and that amounts are calculated automatically. This gives the agent useful non-obvious behavior without listing prerequisites or response details.

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?

Three short sentences, each adding meaningful information: what is created, where it is stored, and what auto-calculation happens. The description is front-loaded with the primary purpose and contains no filler.

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

Completeness4/5

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

For a create operation with no output schema and no annotations, the description covers the core invocation context: local persistence, editability before validation/submission, and automatic amount cals. It does not describe the return value or draft identifier, but the schema provides all required parameter semantics and the workflow is understandable.

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?

The input schema covers 100% of the parameters with descriptions, so the baseline is 3. The description adds no per-parameter detail, though it does note that net/VAT/gross amounts are computed automatically, which relates to how item values are interpreted.

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 starts with a precise verb and object: 'Utwórz nowy draft faktury' (create a new invoice draft). It further distinguishes this from sending or updating by stating the draft is stored locally and can be edited before validation and sending to KSeF.

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

Usage Guidelines3/5

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

The description implies a draft-first workflow by noting the draft can be edited before validation and KSeF submission, but it does not explicitly state when to choose this tool over siblings like ksef_draft_update, ksef_draft_validate, or ksef_send_invoice. Usage context is present but only implicitly.

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