Skip to main content
Glama
gacabartosz
by gacabartosz

ksef_draft_validate

Validate an invoice draft against FA(3) rules, checking NIP checksum, required fields, dates, VAT rates, and amount consistency. Passed drafts automatically change status to 'validated'.

Instructions

Zwaliduj draft faktury wg reguł FA(3). Sprawdza: NIP (suma kontrolna), wymagane pola, poprawność dat, stawki VAT, spójność kwot. Jeśli walidacja przejdzie, status zmienia się na 'validated'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID draftu (UUID)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

No annotations are present, so the description carries the full burden. It explicitly discloses the key side effect: if validation passes, the status changes to 'validated'. It also lists the validation scope, but it does not describe the failure path or what is returned when validation fails.

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 efficient: a purpose clause, a compact list of checks, and a conditional outcome. Every sentence earns its place and no information is wasted.

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 input side is complete with one documented parameter, and the success side effect is stated. However, with no output schema, the description omits what the tool returns on failure or whether a validation report is produced, and it does not connect validation to the approval/send workflow.

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 schema already fully describes the single 'id' parameter as a UUID draft identifier, and schema description coverage is 100%. The tool description does not add further semantic detail about the parameter, so the baseline score of 3 applies.

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 'Zwaliduj draft faktury wg reguł FA(3)', a specific verb and resource, and then enumerates the exact validation checks (NIP checksum, required fields, dates, VAT rates, amount consistency). This clearly distinguishes it from sibling draft operations like get, create, update, lock, or render_xml.

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?

No guidance is given about when to call this tool versus siblings such as ksef_approval_request or ksef_send_invoice, nor about prerequisites like the draft existing or not being locked. The intended position in the draft lifecycle is only implied by the validation semantics.

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