Skip to main content
Glama

Validate Xml

validate_xml

Validate an XML document with xmlvalid: well-formedness, an XSD, DTD or RelaxNG schema, and for e-invoices the Schematron business rules of EN 16931, Peppol BIS, XRechnung, Factur-X and national formats. Pass the document as xml (its text) or url (a public http(s) address), and a schema: a catalog slug from search_schemas, a saved schema ("@orders-v3"), or "auto" to use the e-invoice profile the document names. Without a schema only well-formedness is checked. Returns valid, errors and warnings with line, column, message, rule and a help_url explaining each. Counts as one API validation of the key's monthly quota.

Input Schema

NameRequiredDescriptionDefault
urlNoA public http(s) URL of the document, fetched by xmlvalid.
xmlNoThe XML document itself. Use url instead for a document on the web.
nameNoA file name to show in the result, such as invoice-42.xml.
waitNoSeconds to wait for the result before returning a pending status to poll with get_validation.
schemaNoA catalog slug (see search_schemas), "@<name>" for a saved schema, or "auto" for the e-invoice profile the document names. Leave out to check well-formedness only.
rules_versionNoPin Schematron rule sets to releases, as rule-set@version, comma-separated (peppol-bis-3-ubl@3.0.21): the call fails with rules_version_mismatch when one has moved on. The result's rule_sets lists the releases that ran.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare openWorldHint, so the description carries the burden and does so well: it discloses quota cost ('one API validation of the key's monthly quota'), the URL-fetch behavior, the pending/poll flow, and the rules_version_mismatch failure mode. It also describes the return shape (valid, errors, warnings with line/column/message/rule/help_url).

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 action and layered detail afterward, with no filler sentences. It is somewhat dense, packing format lists, quota notes and return values into a few long sentences, but each element is useful.

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?

With 6 optional parameters, no output schema, and minimal annotations, the description supplies what's missing: inputs, schema selection, quota, async behavior and result structure. Nothing an agent needs to invoke 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 value by showing concrete schema formats ('@orders-v3', 'auto') and explaining that rules_version pins Schematron releases and fails with rules_version_mismatch. It restates the xml/url choice already documented in the schema, which caps it below 5.

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 ('Validate an XML document') and immediately enumerates the checked layers: well-formedness, XSD/DTD/RelaxNG, and Schematron business rules for named e-invoice profiles. This is distinguishable from siblings like get_validation or search_schemas without consulting their schemas.

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?

Explains the input alternatives (xml text vs public http(s) url), the schema options (catalog slug, saved '@orders-v3', or 'auto'), and the consequence of omitting schema (well-formedness only). The wait parameter also names get_validation as the polling alternative for pending results.

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