Skip to main content
Glama

Explain error codes

explain_errors
Read-only

Explain rule codes in plain language. Works without an API key.

Covers the codes of validate_invoice findings and hints: EN 16931, XRechnung, ZUGFeRD and invowerk's own hint codes (IW-*).

Input: codes is a list of one or more codes, e.g. ["BR-CO-18", "BR-DE-21"]. Duplicates are removed. lang is "de" (default) or "en".

Returns lang and explanations. Each explanation has title, meaning, causes, fixes, severity, standard, bt_refs, xpath_hints and explain_url (the German page for the code). If any code is unknown, the call fails and names the unknown codes.

Credits: free. This tool is not metered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoLanguage of the explanations: "de" (default) or "en".de
codesYesOne or more rule codes from validate_invoice, e.g. ["BR-CO-18", "BR-DE-21"].

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / lang / enum
      Added value: +[
      +  "de",
      +  "en"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: it discloses the no-API-key requirement, deduplication behavior, the failure mode when an unknown code is supplied ('the call fails and names the unknown codes'), and the metering/cost profile. These are exactly the operational traits an agent needs.

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 purpose and well-sectioned into input/return/credits. Slightly less than ideal because it enumerates the return fields ('title', 'meaning', 'causes'...) that the output schema already documents, which is redundant padding.

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?

For a read-only lookup with an output schema present, the description covers everything needed: input format, language, dedup, failure behavior, and cost. Nothing required to call it correctly is missing.

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 already 100%, so the baseline is 3, but the description adds real meaning: codes is 'one or more' with a concrete example, duplicates are removed, and lang defaults to 'de' with the two allowed values. The example format adds value beyond the schema's generic string-array description.

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 and resource ('Explain rule codes in plain language') and scopes it to codes emitted by validate_invoice, which distinguishes it from the other invoice siblings. An agent can immediately tell this is a lookup/explanation tool rather than a processing tool.

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?

Clearly establishes the context of use by tying the input codes to validate_invoice findings, and notes it works without an API key. It does not, however, explicitly state when NOT to use it or name any alternative, so it stops short of full when/when-not guidance.

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.