Skip to main content
Glama
cmendezs

mcp-ksef-pl

Submit Invoice To Ksef

submit_invoice_to_ksef

Submit FA(3) XML invoices directly to the Polish KSeF platform (API v2). Ensures compliance by using the required format for submission.

Instructions

Submit a FA(3) XML invoice to the KSeF platform (API v2).

KSeF API v2 requires FA(3) format for submission. Use generate_fa2_invoice only for validation or parsing; it produces FA(2) XML which KSeF v2 does not accept. FA(3) generation is tracked in roadmap-2026.md.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xml_contentYes
session_tokenNo Obtain via the challenge → authenticate → redeem flow: https://github.com/CIRFMF/ksef-docs/blob/main/uwierzytelnianie.md

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the behavioral burden. It discloses the FA(3) format requirement but does not mention side effects of submission, authentication prerequisites, reversibility, or potential status/error behavior. For a mutation tool, this leaves important operational behavior undisclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded in the first sentence, and the following sentences give relevant format guidance. The roadmap note is slightly extraneous and could confuse, but overall the description is compact and structured well.

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?

An output schema exists, so return-value documentation is not the description's burden. However, with no annotations, the description should cover prerequisites such as session_token acquisition and submission side effects; it only covers the format constraint. This is sufficient for the basic input but incomplete for confident invocation.

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 coverage is only 50%; xml_content has no schema description, while session_token has an auth flow link. The description adds meaning to xml_content by requiring FA(3) XML, but it does not specify encoding, structure, or how the content must be embedded, so it only partially compensates for the schema gap.

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, resource, and version: 'Submit a FA(3) XML invoice to the KSeF platform (API v2).' It also distinguishes itself from generate_fa2_invoice by clarifying the target format, so an agent can tell this is the submission tool, not a generator or validator.

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?

Explicitly warns that generate_fa2_invoice produces FA(2) XML that KSeF v2 does not accept and should only be used for validation or parsing. However, it does not point to generate_fa3_invoice as the correct companion generator, and the roadmap note muddies whether FA(3) generation is actually available.

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