Skip to main content
Glama

Factur-X: Generate & Validate E-Invoices

Explain a validation finding

explain_finding
Read-onlyIdempotent

Turn a validation rule id into the invoice field to change and an example value.

Use after validate_invoice or a generate_invoice rule error, not to validate an invoice itself.
rule is trimmed and uppercased to select a guide entry. message/json_pointer must come from that
same finding: nonempty values override its generic context, but never change the selected fix or
example. Omit them to use guide defaults for known rules.

Returns rule, known, message, json_pointer, fix and example; known rules also include problem.
Selected BR-FR rules and BR-CO-17/BR-CO-26 have guidance.
Unknown ids return known=false and example=null with the supplied context, not an error; consult
the original finding. No key or document quota is needed; nothing is stored.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleYesValidation rule identifier, for example BR-FR-01 or BR-CO-26.
messageNoOriginal finding's message text.
json_pointerNoOriginal finding's json_pointer field path.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / json_pointer / description
      Previous value: -"json_pointer from the finding. Used as-is when you send it."New value: +"Original finding's json_pointer field path."
    • changedInput schema / properties / message / description
      Previous value: -"The finding message, echoed back when the rule is not in the short guide."New value: +"Original finding's message text."
    • changedInput schema / properties / rule / description
      Previous value: -"Rule id from a finding, for example BR-FR-01 or BR-CO-26. Required."New value: +"Validation rule identifier, for example BR-FR-01 or BR-CO-26."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/no-key requirements, yet the description adds substantial behavior: rule ids are trimmed and uppercased before lookup, supplied message/json_pointer override generic context but never change the selected fix or example, unknown ids return known=false rather than an error, and nothing is stored. That is real disclosure beyond the structured hints.

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?

Front-loaded with the core transformation and the usage exclusion, and each sentence carries distinct information. It is dense — three tightly packed paragraphs — but no sentence is filler, so it stays just short of maximal.

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 a 3-parameter tool with an output schema, the description covers trigger, exclusions, parameter normalization, override rules, unknown-id behavior, and the storage/quota profile. Nothing an agent needs to call it correctly is absent.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine semantics: normalization of 'rule', the requirement that message/json_pointer come from the same finding, the override-vs-default behavior, and what happens when they are omitted. It stops short of full coverage only because the returned fields are enumerated rather than the inputs elaborated further.

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 precise verb and resource — 'Turn a validation rule id into the invoice field to change and an example value' — which is unmistakable against siblings like validate_invoice or generate_invoice. It also explicitly says it does not validate an invoice itself, separating it from validate_invoice.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('Use after validate_invoice or a generate_invoice rule error') and an explicit exclusion ('not to validate an invoice itself'). The alternative is named and the selecting condition is stated, leaving nothing to inference.

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.

Resources