Skip to main content
Glama
gacabartosz
by gacabartosz

ksef_correction_create

Create a correction invoice from an existing draft that has been sent to KSeF. It copies original data into a new linked draft, preserving the original for reference.

Instructions

Utwórz korektę faktury na podstawie istniejącego draftu. Oryginalna faktura musi być wysłana do KSeF (mieć ksefReferenceNumber). Tworzy nowy draft z danymi oryginału, statusem 'draft' i powiązaniem z oryginałem.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originalDraftIdYesID oryginalnego draftu (UUID) — musi być wysłany do KSeF
correctionReasonYesPowód korekty (min. 3 znaki)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden of explaining behavior. It discloses the key side effect: a new draft is created with the original's data, status 'draft', and a link to the original. It does not describe failure modes or confirm the original remains unchanged, but the main mutation is transparent.

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 concise, front-loaded sentences. The action and precondition come first, and there is no filler or redundant restatement of the tool name.

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 two-parameter creation tool with no output schema, this is nearly complete: it states the precondition, the input semantics, and the resulting side effect. It could optionally mention what the response returns or what happens when the original lacks ksefReferenceNumber, but the description is sufficient for selecting and invoking the tool.

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 the baseline is 3. The description reinforces that originalDraftId must reference a KSeF-sent invoice, but it does not add significant new semantic detail beyond what the schema already provides for the two parameters.

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 specific verb, 'Utwórz korektę', and names a precise resource: an existing draft that has already been sent to KSeF. It clearly distinguishes itself from related tools like ksef_draft_create by stating it copies original data and links the correction to the original, making its scope unambiguous.

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 an explicit precondition: the original invoice must be sent to KSeF and have a ksefReferenceNumber. This is clear, actionable context, but it does not explicitly discuss when to prefer this tool over ksef_correction_zero or other drafting tools, so it stops short of full alternative routing.

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