Skip to main content
Glama

validate_invoice

Read-onlyIdempotent

Validate an EU e-invoice XML string against the official EN 16931 Schematron. Accepts either syntax — UBL 2.1 (Invoice or CreditNote) or UN/CEFACT CII — and auto-detects which. A document declaring the XRechnung 3.0 CustomizationID is additionally checked against KoSIT's XRechnung delta ruleset. Returns whether it is valid and any failing BR-* / BR-DE-* business rules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesRaw e-invoice XML (UBL 2.1 or UN/CEFACT CII).

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is clear. The description adds significant behavioral context beyond this: it specifies the validation standard, the auto-detection of UBL vs CII, the additional XRechnung 3.0 check, and the return of failing BR-*/BR-DE-* rules. This fully compensates for the absence of an output schema.

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 three sentences, each adding essential information: the core validation, the accepted syntaxes and auto-detection, and the special XRechnung handling and output. No redundant or filler content exists; it is front-loaded with the main verb and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (one parameter, no output schema), the description is complete. It covers the input format, validation rules, edge case (XRechnung), and return value (validity + failing rules). It also distinguishes itself from sibling tools through its focus on validation, making it sufficient for an agent to select and invoke confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers the single parameter 'xml' with a description of accepted formats, giving 100% coverage. The description enhances this by clarifying that both UBL and CII are accepted and auto-detected, and it introduces the XRechnung CustomizationID nuance that affects validation. This adds meaning beyond the schema, so it earns above the baseline of 3.

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 primary action (validate) against a specific standard (EN 16931 Schematron) and enumerates accepted input formats (UBL 2.1, CII). It distinguishes itself from sibling tools like convert_invoice and generate_invoice by focusing on validation, not conversion or generation.

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 provides clear context: 'Validate an EU e-invoice XML string against the official EN 16931 Schematron' and explains the auto-detection of syntax. However, it does not explicitly contrast with alternatives (e.g., when to use convert_invoice instead) or provide when-not-to-use guidance, so it misses the explicit exclusion needed for a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool addresses a distinct operation—generate creates, validate checks, convert transforms, and list_supported_formats provides metadata—with no functional overlap. The descriptions make the boundaries between tools crystal clear.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (convert_invoice, generate_invoice, list_supported_formats, validate_invoice), with the object being the domain concept. This makes the set predictable and easy to navigate.

Tool Count5/5

With only 4 tools, the server is tightly scoped to e-invoice processing—each tool earns its place, and the count is neither too thin nor bloated. It is an ideal size for the utility's purpose.

Completeness5/5

The set covers the core workflow: generating invoices, validating them, converting between formats, and discovering supported formats. There are no obvious gaps for the stated domain; users can perform all essential operations.

Resources