Skip to main content
Glama
cmendezs

mcp-ksef-pl

Validate Fa2 Invoice

validate_fa2_invoice

Validate KSeF FA(2) XML invoices by running XSD schema validation and Polish business-rule checks, returning errors and warnings.

Instructions

Validate a KSeF FA(2) XML invoice.

Runs XSD validation (when the official schema is present) and Polish business-rule checks. Returns a DocumentValidationResult with errors and warnings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xml_contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYes
errorsNo
metadataNo
warningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden. It discloses the conditional XSD validation ('when the official schema is present') and explains the return type as a DocumentValidationResult with errors and warnings, giving useful behavioral context beyond the tool name.

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 sentences with no filler. It front-loads the core action and then adds the key behavioral details about validation steps and output, every sentence earning its place.

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 single-parameter validation tool with an output schema, the description is largely sufficient. It covers the validation logic, the conditional schema dependency, and the result type, though it could add a sentence about when validation is appropriate relative to submission.

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 0%, so the description must compensate. It identifies the input as a KSeF FA(2) XML invoice, which makes the xml_content parameter largely inferable, but it does not explicitly define the parameter as the raw XML string or specify any constraints such as encoding or size.

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 clearly states the tool validates a KSeF FA(2) XML invoice, naming both the specific resource and the action. It further distinguishes the scope by mentioning XSD validation and Polish business-rule checks, which separates it from sibling validation and generation tools.

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?

The description explains what the tool does but offers no guidance on when to use it versus alternatives such as parse_fa2_invoice, generate_fa2_invoice, or submit_invoice_to_ksef. There is no mention of pre-submission validation, exclusion conditions, or recommended workflow context.

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