Skip to main content
Glama

validate_dataset

Validates clinical datasets against CDISC CORE rules and returns a structured report with pass/fail counts and detailed issues.

Instructions

Validate clinical datasets against CDISC CORE rules.

Runs the CORE Rules Engine CLI against provided dataset files and returns a structured validation report.

Args: dataset_paths: List of paths to XPT, JSON, NDJSON, or XLSX files. standard: CDISC standard to validate against. Options: 'sdtmig', 'sendig', 'adamig', 'tig' version: IG version (e.g., '3-4', '3-3', '3-2', '1-3', '3-1-1') ct_version: Controlled Terminology package (e.g., 'sdtmct-2025-09-26'). Optional. rules: Specific CORE rule IDs to run (e.g., ['CORE-000001']). If None, runs all applicable rules. exclude_rules: CORE rule IDs to skip. define_xml_path: Path to Define-XML file (optional). output_format: Report format — 'JSON' (default) or 'XLSX'.

Returns: Validation report with: - summary: total rules, pass/fail/skip counts, issue summary - issues: detailed issue list with dataset, row, variables, values - rules_report: status of each rule executed - datasets: metadata of validated datasets

Usage: validate_dataset(["/data/ae.xpt", "/data/dm.xpt"]) validate_dataset( ["/data/ae.xpt"], standard="sdtmig", version="3-4", ct_version="sdtmct-2025-09-26" ) validate_dataset( ["/data/ae.xpt"], rules=["CORE-000001", "CORE-000351"] )

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dataset_paths": "<dataset_paths>"
    },
    "name": "validate_dataset"
  }
}

Input Schema

NameRequiredDescriptionDefault
rulesNo
versionNo3-4
standardNosdtmig
ct_versionNo
dataset_pathsYes
exclude_rulesNo
output_formatNoJSON
define_xml_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful behavior: it shells out to an external CLI engine, 'rules=None' runs all applicable rules, and the report has summary/issues/rules_report/datasets sections. It omits operational traits that matter for an 8-parameter batch job — expected runtime and cost of running all rules, error behavior on unreadable or malformed files, and where XLSX output is written (file path vs. return payload).

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?

Well front-loaded: the purpose and mechanism come first, followed by Args, Returns, and Usage sections. Every line adds information; the examples are short and non-redundant.

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 complex 8-parameter tool with no annotations and no output schema, the description covers purpose, all parameters, and return structure — enough to call it correctly. What is still missing is failure/timeout behavior and the side-effect profile (writes a file, invokes an external process), which matters given the batch nature of the operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it largely does: it gives meaning for all eight parameters, including accepted file types (XPT, JSON, NDJSON, XLSX), allowed standard values, example version and CT package strings, and the rules/exclude_rules interaction. Gaps remain — version values are listed without mapping to which standard they belong to, and output_format='XLSX' doesn't say where the file lands.

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 ('Validate clinical datasets against CDISC CORE rules') and adds the mechanism ('Runs the CORE Rules Engine CLI... returns a structured validation report'). This clearly distinguishes it from the sibling tools, which are all discovery/administrative (list_rules, get_rule_details, update_engine, etc.).

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?

Three worked examples show realistic invocation patterns (bare paths, with standard/version/ct_version, with an explicit rules subset), which conveys the intended usage context well. It does not, however, say when not to use it or point to siblings — e.g., that rule IDs should be discovered via list_rules/search_rules first — so an agent must infer that routing.

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