S1000D Verify (S1000D Stack)

v0.16.0
io.github.shuji-bonji/s1000d-verify-mcp Checked 12 hours ago Published 12 hours ago

Validate S1000D data modules: XSD, BREX chain and reference resolution as one verification status.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

verify_data_module

Verify one S1000D data module: well-formedness, XML schema (XSD) validation against the user's own S1000D schemas (S1000D_SPEC_DIR), BREX checks along the brexDmRef chain, and reference resolution (dmRef, pmRef, ICN entities, internalRef, applicRefId). Returns a "verification" status (the same VerificationStatus that s1000d-reader-mcp embeds) plus the details of each step. Does NOT decide S1000D conformance.

ParameterTypeDescription
csdbDirsarrayCSDB folders to search for referenced data modules, publication modules, ICN files and BREX (default: S1000D_CSDB_DIR / the config file; BREX is also searched under S1000D_SPEC_DIR). When given, these…
maxSchemaErrorsnumberCap on XSD errors returned (default 100). The total count is always reported.
maxUnresolvedRefsnumberCap on unresolved references returned (default 200).
maxViolationsPerLayernumberCap on BREX violations returned per layer (default 200).
pathstringFile path of the data module (or PM) to check.
skiparraySteps to skip. Skipped steps are reported with state "not-run".
xmlstringThe document as an XML string (alternative to path; max 5 MB).

validate_schema

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. Only the XSD of the same issue as the document is used. When no XSD of that issue is available — including when only the schemas of another issue are present — validation is not run and the result is schema-not-found with a reason; schema.missingIssue {needed, found} then names the issue whose distribution is missing.

ParameterTypeDescription
issuestringS1000D issue of the XSD to validate against (e.g. "7", "4.2", or a patch such as "4.0.2" or "4.1.A"; a patch is a different issue from the issue it patches). Default: the issue in the schemaLocation U…
maxErrorsnumberCap on errors returned (default 100).
pathstringFile path of the data module (or PM) to check.
xmlstringThe document as an XML string (alternative to path; max 5 MB).

check_references

List the references of one document and whether each target exists: dmRef (all contexts: brexDmRef, applicCrossRefTableRef, pmEntry, body), pmRef, ICN (graphic/@infoEntityIdent via the DOCTYPE ENTITY declaration to a file), internalRef (ids in the same document) and applicRefId (applic ids or referencedApplicGroupRef/applicRef). Unresolved references carry a reason (not-found, no-entity-declaration, file-not-found, no-such-id, no-csdb). dmRef to modelIdentCode "S1000D" point to the specification itself and are listed separately.

ParameterTypeDescription
csdbDirsarrayCSDB folders to search for referenced data modules, publication modules, ICN files and BREX (default: S1000D_CSDB_DIR / the config file; BREX is also searched under S1000D_SPEC_DIR). When given, these…
includeResolvedbooleanAlso list resolved references with the file they resolve to (default false; counts are always returned).
kindsarrayReference kinds to report (default: all).
maxItemsnumberCap on listed references (default 200).
pathstringFile path of the data module (or PM) to check.
xmlstringThe document as an XML string (alternative to path; max 5 MB).

verify_csdb

Verify every CSDB object (data modules by default; optionally publication modules etc.) found in the given folders, and return one VerificationStatus per object plus totals (valid / XSD errors / BREX violations / unresolved references / unreadable). Use offset/limit to page. Pass reportPath to also write the full JSON report to a file.

ParameterTypeDescription
csdbDirsarrayFolders to verify (default: S1000D_CSDB_DIR / the config file). Referenced objects are also searched here. When given, these folders replace S1000D_CSDB_DIR and the csdbDirs of the config file (they a…
includearrayObject kinds to verify (default: dm and pm).
limitnumberObjects per call (default 100, max 1000).
offsetnumberIndex of the first object (default 0).
reportPathstringIf given, the full report (all details) is written to this JSON file; the response keeps only the statuses.
skiparraySteps to skip. Skipped steps are reported with state "not-run".

suggest_fixes

Verify one data module (same steps as verify_data_module) and return fix candidates for each finding: XSD errors (values and elements from the libxml2 message or from the XSD definitions), BREX violations (the rule's allowed values with their descriptions; remove / add for forbidden / missing; allowed notations), unresolved references (similar DMCs in the CSDB, the issue present in the CSDB, ICN files that differ only in the extension, similar ids) and, when "product" is given, applicability that cannot be decided because the product lacks a value (values from the ACT, CCT and PCT). Every cand…

ParameterTypeDescription
csdbDirsarrayCSDB folders to search for referenced data modules, publication modules, ICN files and BREX (default: S1000D_CSDB_DIR / the config file; BREX is also searched under S1000D_SPEC_DIR). When given, these…
includeSpecificationReferencesbooleanAlso list fixes for dmRef to the S1000D specification itself (modelIdentCode "S1000D"). They are never in a CSDB, are not errors and carry no candidate (default false; the count is always returned).
maxCandidatesnumberCap on candidates per fix (default 20). A fix that was cut carries candidateCount.
maxFixesnumberCap on fixes returned (default 200). The total count is always reported.
pathstringFile path of the data module (or PM) to check.
productobjectThe product to evaluate applicability against. If given, applicability that is undetermined because the product lacks a value is reported with candidate values. Omit it to skip applicability.
skiparraySteps to skip. Skipped steps are reported with state "not-run".
xmlstringThe document as an XML string (alternative to path; max 5 MB).

reconcile_dml

Reconcile a data module list (DML) or a data dispatch note (DDN) with the CSDB. For each DML entry (dmRef / pmRef / infoEntityRef / dmlRef) or DDN delivery item (dispatchFileName) it reports found / issue-mismatch (the object exists but not the issue the list names; the latest issue in the CSDB is given) / not-found / not-checked (commentRef), plus the data modules and publication modules that are in the CSDB but not listed in the DML (notListed, each with the issue of the file as issueInfo; limited to the model identification codes that appear in the DML). Pass path or xml of one DML or DDN;…

ParameterTypeDescription
csdbDirsarrayCSDB folders to search for referenced data modules, publication modules, ICN files and BREX (default: S1000D_CSDB_DIR / the config file; BREX is also searched under S1000D_SPEC_DIR). When given, these…
includeFoundbooleanAlso list the entries whose state is "found" (default false: only issue-mismatch / not-found / not-checked are listed; counts always cover everything).
includeNotListedbooleanReport CSDB objects that the DML does not list (default true).
maxItemsintegerMaximum entries and notListed objects to return per list (default 200, max 5000).
pathstringFile path of the DML or DDN. Omit path and xml to reconcile every DML and DDN in the CSDB.
xmlstringThe DML or DDN as an XML string (alternative to path; max 5 MB).

list_schemas

Show which S1000D XML schema folders (xml_schema_flat/ containing brex.xsd) were found under S1000D_SPEC_DIR, with the issue read from brex.xsd and the schema names available. Use it to diagnose schema-not-found results, and to confirm that the schemas of a missing issue are found after the user has added that distribution.