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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_against_brex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | No | The data module as an XML string (alternative to path; max 5 MB). | |
| brex | No | A specific BREX (file path or DMC) to check against. With followChain=false it is the only layer; otherwise it is added to the chain. | |
| path | No | File path of the data module to check. | |
| csdbDirs | No | Extra folders to search for data modules and BREX by DMC (in addition to S1000D_CSDB_DIR and S1000D_SPEC_DIR). | |
| followChain | No | Follow the brexDmRef chain of the data module (default true). | |
| includeManualChecks | No | Include nonContextRules as manualChecks in each layer (default true). | |
| maxViolationsPerLayer | No | Cap on violations returned per layer (default 200). The total count is always reported. |