Skip to main content
Glama

check_references

Checks S1000D document references (dmRef, pmRef, ICN, internalRef, applicRef) and reports unresolved targets with reasons, so you can fix broken links before publishing.

Instructions

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.

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.
kindsNoReference kinds to report (default: all).
csdbDirsNoExtra CSDB folders to search for referenced data modules, publication modules, ICN files and BREX (in addition to S1000D_CSDB_DIR; BREX also under S1000D_SPEC_DIR).
maxItemsNoCap on listed references (default 200).
includeResolvedNoAlso list resolved references with the file they resolve to (default false; counts are always returned).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.9/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 does well: it discloses the resolution mechanisms (DOCTYPE ENTITY declaration for ICN, ids in the same document for internalRef), the enumerated failure reasons returned for unresolved references, and the special case that dmRefs to modelIdentCode S1000D point at the spec and are listed separately. It omits error behavior and cost/performance for large documents.

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?

The core purpose is front-loaded in the first clause, and the remaining clauses earn their space by enumerating kinds and failure reasons. It is dense to the point of being a run-on sentence with heavy parenthetical nesting, which costs readability but not correctness.

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?

For a 6-parameter, no-output-schema tool, the description covers what is checked, how each kind resolves, and what unresolved entries report (reason codes), which is the essential return information. It does not describe the overall result shape or the identity/count fields, leaving some return structure to be discovered at runtime.

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 every parameter is already documented in the schema and baseline 3 applies. The description adds domain meaning by spelling out the reference kinds that the `kinds` enum selects and the ENTITY-declaration lookup path, but says nothing extra about csdbDirs, maxItems, or includeResolved.

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 verb and resource: list the references of one document plus whether each target exists. It then enumerates exactly which reference kinds are covered (dmRef, pmRef, ICN, internalRef, applicRefId), so an agent can tell this is a reference-resolution tool rather than a schema validator like validate_schema or verify_csdb.

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?

Usage is implied by the phrasing — one document, references, resolution status — but there is no explicit when-to-use/when-not framing and no mention of alternatives such as verify_data_module for structural checks or verify_csdb for CSDB-wide integrity. An agent must infer the boundary from sibling names.

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