Skip to main content
Glama

check_against_brex

Checks an S1000D data module against BREX rules or full BREX chains and reports violations with XPath location, actual value, rule ID, and severity.

Instructions

Check a data module against BREX rules and report violations with location (XPath + line), actual value, rule id, objectUse text and severity. By default follows the data module's brexDmRef chain (project BREX → … → S1000D default BREX found under S1000D_SPEC_DIR) and checks each layer separately; pass "brex" to check against one specific BREX instead or in addition. Does NOT validate against the XML schema (XSD): run schema validation separately. nonContextRules cannot be checked automatically and are returned as manualChecks.

Input Schema

NameRequiredDescriptionDefault
xmlNoThe data module as an XML string (alternative to path; max 5 MB).
brexNoA specific BREX (file path or DMC) to check against. With followChain=false it is the only layer; otherwise it is added to the chain.
pathNoFile path of the data module to check.
csdbDirsNoExtra folders to search for data modules and BREX by DMC (in addition to S1000D_CSDB_DIR and S1000D_SPEC_DIR).
followChainNoFollow the brexDmRef chain of the data module (default true).
includeManualChecksNoInclude nonContextRules as manualChecks in each layer (default true).
maxViolationsPerLayerNoCap on violations returned per layer (default 200). The total count is always reported.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the default multi-layer BREX chain, per-layer checking, manualChecks for nonContextRules, and the exclusion of XSD validation. It does not explicitly state read-only safety or permission requirements, but the 'check' and 'report' wording strongly implies a non-mutating operation.

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?

The description is front-loaded with the core purpose and return details, then proceeds to default behavior, alternatives, and exclusions. Every sentence adds useful information without repetition or filler.

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?

It explains the return fields and manualChecks behavior despite there being no output schema, which is important for this multi-parameter tool. The main gap is that it does not state that at least one of xml or path must be supplied, since the schema has no required parameters.

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 description coverage is 100%, so the schema already documents all seven parameters in detail. The description adds some conceptual context about the brex parameter and the followChain behavior, but does not clarify csdbDirs, maxViolationsPerLayer, or the xml/path one-of choice beyond what the schema already says.

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?

The description states a specific verb and resource: check a data module against BREX rules and report violations with concrete fields. It clearly distinguishes this from XML schema validation, but does not differentiate against the listed sibling tools such as explain_brex.

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?

It explains the default brexDmRef chain behavior, when to pass a specific brex, and that schema validation must be run separately. However, it does not explicitly route the agent between this tool and siblings like explain_brex or lookup_value.

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