Skip to main content
Glama

Get a validation result

get_validation
Read-onlyIdempotent

The status and result of a validation started with validate_xml that was still running when it returned (status "queued" or "running"). Results are kept for 24 hours.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "get_validation"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe id validate_xml returned.

Output Schema

NameRequiredDescriptionDefault
idYesThe validation id, for get_validation.
errorNoWhat went wrong on our side when status is failed.
rulesNo
resultNoNull until the validation is done.
schemaNoNull when only well-formedness was checked.
statusYesqueued or running: poll get_validation with the id; done: see result.
documentNo
progressNo
rule_setsNoThe Schematron rule sets that ran after the schema check, at their releases.
created_atNo
finished_atNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "created_at": {
      +      "type": "string"
      +    },
      +    "document": {
      +      "properties": {
      +        "name": {
      +          "type": "string"
      +        },
      +        "size": {
      +          "type": "integer"
      +        },
      +        "source": {
      +          "enum": [
      +            "upload",
      +            "url",
      +            "body"
      +          ],
      +          "type": "string"
      +        },
      +        "url": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "error": {
      +      "description": "What went wrong on our side when status is failed.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "finished_at": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "id": {
      +      "description": "The validation id, for get_validation.",
      +      "type": "string"
      +    },
      +    "progress": {
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "result": {
      +      "description": "Null until the validation is done.",
      +      "properties": {
      +        "bytes": {
      +          "type": "integer"
      +        },
      +        "documents": {
      +          "description": "For an archive: errors and warnings are then in items.",
      +          "properties": {
      +            "failed": {
      +              "type": "integer"
      +            },
      +            "passed": {
      +              "type": "integer"
      +            },
      +            "skipped": {
      +              "type": "integer"
      +            },
      +            "total": {
      +              "type": "integer"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "duration_ms": {
      +          "type": "integer"
      +        },
      +        "engine": {
      +          "properties": {
      +            "libxml2": {
      +              "type": "string"
      +            },
      +            "saxonjs": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "xmlvalid": {
      +              "type": "string"
      +            }
      +          },
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        "errors": {
      +          "description": "The errors, the first 50 when errors_listed is set.",
      +          "items": {
      +            "properties": {
      +              "column": {
      +                "description": "0 when unknown.",
      +                "type": "integer"
      +              },
      +              "help_url": {
      +                "description": "A page explaining this kind of error and how to fix it.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "level": {
      +                "enum": [
      +                  "warning",
      +                  "error",
      +                  "fatal"
      +                ],
      +                "type": "string"
      +              },
      +              "line": {
      +                "description": "0 when the message is about the whole document.",
      +                "type": "integer"
      +              },
      +              "message": {
      +                "type": "string"
      +              },
      +              "message_en": {
      +                "description": "The message in English, for a rule its publisher wrote in another language.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "path": {
      +                "description": "Where a business rule fired, as an XPath with the document's prefixes.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "rule": {
      +                "description": "The business rule that failed, such as BR-CO-15; explain it with explain_rule.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "rule_url": {
      +                "description": "The rule's page on xmlvalid.com.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "type": {
      +                "description": "syntax, xsd, relaxng, dtd, schema, io, schematron (a business rule), archive or pdf.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "line",
      +              "message"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "errors_listed": {
      +          "description": "Set when errors were cut to this many; errors_total counts them all.",
      +          "type": "integer"
      +        },
      +        "errors_total": {
      +          "type": "integer"
      +        },
      +        "errors_truncated": {
      +          "description": "More than the 500 errors the API keeps were found.",
      +          "type": "boolean"
      +        },
      +        "items": {
      +          "description": "For an archive, one result per document.",
      +          "items": {
      +            "properties": {
      +              "name": {
      +                "type": "string"
      +              },
      +              "outcome": {
      +                "type": "string"
      +              },
      +              "valid": {
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "name",
      +              "outcome"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "outcome": {
      +          "enum": [
      +            "valid",
      +            "warnings",
      +            "invalid",
      +            "schema",
      +            "input",
      +            "failed"
      +          ],
      +          "type": "string"
      +        },
      +        "pdf": {
      +          "description": "For a PDF, the invoice found in it.",
      +          "properties": {
      +            "attachment": {
      +              "description": "The XML file validated, such as factur-x.xml.",
      +              "type": "string"
      +            },
      +            "guideline": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "profile": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "sha256": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "valid": {
      +          "description": "True for the outcomes valid and warnings.",
      +          "type": "boolean"
      +        },
      +        "warnings": {
      +          "description": "The warnings, the first 50 when warnings_listed is set.",
      +          "items": {
      +            "properties": {
      +              "column": {
      +                "description": "0 when unknown.",
      +                "type": "integer"
      +              },
      +              "help_url": {
      +                "description": "A page explaining this kind of error and how to fix it.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "level": {
      +                "enum": [
      +                  "warning",
      +                  "error",
      +                  "fatal"
      +                ],
      +                "type": "string"
      +              },
      +              "line": {
      +                "description": "0 when the message is about the whole document.",
      +                "type": "integer"
      +              },
      +              "message": {
      +                "type": "string"
      +              },
      +              "message_en": {
      +                "description": "The message in English, for a rule its publisher wrote in another language.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "path": {
      +                "description": "Where a business rule fired, as an XPath with the document's prefixes.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "rule": {
      +                "description": "The business rule that failed, such as BR-CO-15; explain it with explain_rule.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "rule_url": {
      +                "description": "The rule's page on xmlvalid.com.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "type": {
      +                "description": "syntax, xsd, relaxng, dtd, schema, io, schematron (a business rule), archive or pdf.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "line",
      +              "message"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "warnings_listed": {
      +          "description": "Set when warnings were cut to this many.",
      +          "type": "integer"
      +        },
      +        "warnings_total": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "valid",
      +        "errors",
      +        "warnings"
      +      ],
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "rule_sets": {
      +      "description": "The Schematron rule sets that ran after the schema check, at their releases.",
      +      "items": {
      +        "properties": {
      +          "key": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "version": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "key",
      +          "name",
      +          "version"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "rules": {
      +      "properties": {
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "schema": {
      +      "description": "Null when only well-formedness was checked.",
      +      "properties": {
      +        "catalog": {
      +          "description": "The catalog slug.",
      +          "type": "string"
      +        },
      +        "detected": {
      +          "description": "True when schema \"auto\" picked this profile.",
      +          "type": "boolean"
      +        },
      +        "kind": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "saved": {
      +          "description": "The saved schema, as @<name>.",
      +          "type": "string"
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "description": "queued or running: poll get_validation with the id; done: see result.",
      +      "enum": [
      +        "queued",
      +        "running",
      +        "done",
      +        "failed",
      +        "cancelled"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "status"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds genuinely new behavioral context: results expire after 24 hours and the id refers to an async job. It does not describe what happens when the id is expired or unknown, which is the main behavioral gap.

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?

Two sentences, no filler, with the applicability condition front-loaded before the retention caveat. Every clause carries information an agent cannot get from the schema or annotations.

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?

An output schema exists, so return values need no explanation, and the retention window plus the originating tool are both covered. Only edge-case behavior (expired id, error result) is left implicit, which is a minor gap for this simple one-parameter fetch.

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?

There is one parameter with full schema description coverage, so the schema already explains that id is the value validate_xml returned. The description adds no further format, length, or validity detail beyond that, so the baseline of 3 applies.

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 resource (the status and result of a validation) and constrains it precisely to validations started by validate_xml that were still queued/running. A reader can tell immediately this is the poll/fetch counterpart to validate_xml rather than a validator itself.

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 when-to-use condition is explicit: only for validations that returned status "queued" or "running", with validate_xml named as the tool that created them. It does not say what to do for a completed or unknown id, nor whether repeated polling is expected, so the guidance is clear but not exhaustive.

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