Skip to main content
Glama

validate_schema

Validates an S1000D XML document against its declared XSD schema and returns line/column libxml2 errors, so you can detect schema violations before downstream checks.

Instructions

Validate one document against the S1000D XML schema (XSD) named by its xsi:noNamespaceSchemaLocation. The XSD is taken from the xml_schema_flat/ folder found under S1000D_SPEC_DIR (the issue is read from brex.xsd there). Errors are libxml2 messages with line/column. Returns schema-not-found with a reason when no suitable XSD is available.

Input Schema

NameRequiredDescriptionDefault
xmlNoThe document as an XML string (alternative to path; max 5 MB).
pathNoFile path of the data module (or PM) to check.
issueNoS1000D issue of the XSD to use when several xml_schema_flat/ folders exist (e.g. "7", "4.2"). Default: inferred from the schemaLocation URL.
maxErrorsNoCap on errors returned (default 100).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses meaningful behavior: XSD resolution from xsi:noNamespaceSchemaLocation, lookup under xml_schema_flat/ beneath S1000D_SPEC_DIR, issue detection from brex.xsd, libxml2 error format with line/column, and a schema-not-found return case. It does not describe success return shape or any limitations beyond schema availability.

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?

Three front-loaded sentences with no filler; the key purpose and schema-resolution rule come first, followed by error format and an edge case. Minor density in the second sentence but overall efficient.

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

Completeness3/5

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

For a validation tool with no output schema, the description explains error message format and the schema-not-found case, but does not describe what a successful validation returns (e.g., valid/invalid flag, count of errors, or full result shape). That is an important omission for an agent invoking the tool without an output schema.

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?

Schema coverage is 100%, so the schema already documents all four parameters. The description adds only marginal context beyond the schema (e.g., how the issue interacts with schemaLocation inference), but does not meaningfully elaborate on xml vs. path or maxErrors beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a clear verb (validate), resource (one document), and scope (against the S1000D XML schema identified by xsi:noNamespaceSchemaLocation). It does not explicitly name or contrast with sibling tools like verify_data_module or list_schemas, so it falls short of full sibling differentiation.

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

Usage Guidelines3/5

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

The description implies when to use it (XSD-based validation of a document), but provides no explicit when-to-use vs. alternatives guidance, no exclusions, and does not mention the sibling verify_data_module or other checkers.

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