Skip to main content
Glama
cmendezs

mcp-ksef-pl

Parse Fa2 Invoice

parse_fa2_invoice

Parse Polish KSeF FA(2) XML invoices into structured dictionaries. Extract header, seller, buyer, invoice details, and line items for straightforward data handling.

Instructions

Parse a KSeF FA(2) XML invoice into a structured dictionary.

Returns a nested dict with 'header', 'seller', 'buyer', 'invoice', and 'lines' keys.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xml_contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the primary behavior: converting XML into a nested dictionary with named keys. However, it does not mention error behavior on malformed XML, format assumptions, or whether parsing is strict or lenient, leaving notable gaps for a parsing tool.

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 two tight sentences with no filler. The main action and resource are front-loaded, and the second sentence economically summarizes the return structure.

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?

For a single-parameter parser with an output schema, the description covers the essential call pattern: pass FA(2) XML content and receive a dict with named sections. It is less complete about error conditions, supported KSeF versions, and edge cases such as empty or invalid XML, which an agent would need for robust handling.

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 only defines xml_content as a string with no description, while the tool description adds that it should contain a KSeF FA(2) XML invoice. This provides useful meaning beyond the raw schema, but it does not cover encoding details, XML structure expectations, or how malformed content is handled.

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 uses a specific verb ('Parse') and a precise resource ('a KSeF FA(2) XML invoice'), and it states the output is a structured dictionary with clear top-level keys. This clearly separates it from siblings like generate_fa2_invoice and validate_fa2_invoice, which perform different operations on the same document type.

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 intended use is implied by the verb 'Parse' and the reference to FA(2) XML invoices, but there is no explicit guidance about when to choose this tool over validate_fa2_invoice or generate_fa2_invoice. No exclusions, prerequisites, or alternative-use conditions are stated.

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