Skip to main content
Glama
gacabartosz
by gacabartosz

ksef_batch_open

Open a batch session to upload multiple invoices to KSeF. Provide file size, SHA-256 hash, and part list to receive a reference number and pre-signed upload URLs.

Instructions

Otwórz sesję batch do wysyłania wielu faktur jednocześnie (API v2). Wymaga aktywnej sesji KSeF. Podaj rozmiar pliku, hash i listę części. Zwraca numer referencyjny i pre-signed URLs do uploadu części.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileHashYesSHA-256 Base64 hash pliku paczki
fileSizeYesRozmiar pliku paczki w bajtach
formCodeNoKod formularza (domyślnie 'FA')
filePartsYesLista części pliku paczki

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It explains that the tool opens a batch session, requires an active KSeF session, and returns a reference number plus pre-signed upload URLs. It stops short of describing lifecycle consequences, such as whether a session must later be closed or what happens if a session is already open.

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?

The description is a compact single sentence that conveys purpose, prerequisite, inputs, and outputs without redundancy. Key information is front-loaded, and no sentence is wasted.

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?

The description covers the essential details needed to call the tool correctly: the action, the prerequisite of an active KSeF session, the required input categories, and the key return values. It does not mention the follow-up step of uploading parts via ksef_batch_send_part or finalizing with ksef_batch_close, but the returned pre-signed URLs strongly imply the next action.

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?

Input schema coverage is 100%, with detailed per-parameter descriptions in the schema. The description adds a useful summary of the expected inputs ('Podaj rozmiar pliku, hash i listę części') but does not add substantive detail beyond what the schema already contains, so the baseline score of 3 is appropriate.

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 opens with a specific verb and resource: 'Otwórz sesję batch do wysyłania wielu faktur jednocześnie (API v2)'. This clearly distinguishes the tool from batch_send_part, batch_close, and batch_status by indicating it starts a batch upload session.

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?

The description gives a clear condition for use: sending multiple invoices simultaneously, and states a concrete prerequisite: an active KSeF session is required. It does not explicitly name alternatives or say when not to use this tool, but the purpose is specific enough that an agent can infer the situation.

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