Skip to main content
Glama
Define-XML MCP Server

Define-XML MCP Server

by defineEditor

define-xml-mcp-server

TypeScript MCP server for CDISC Define-XML.

Features

  • Supports Define-XML 2.0 and 2.1

  • Detects Define version and ARM presence from ODM attributes

  • Supports both MCP transports:

    • stdio (default)

    • Streamable HTTP (/mcp endpoint)

  • Local file-path input only

  • Multi-document in-memory cache using document_id

  • Response formats:

    • json

    • markdown

Related MCP server: MCP-Typescribe

Install

npm install

Build

npm run build

Run

stdio (default)

npm run dev

or

node dist/index.js --transport=stdio

Streamable HTTP

node dist/index.js --transport=http --port=3000

Server endpoint:

  • POST /mcp

Tool Catalog

Document Tools

  • define_load_document

    • Input: file_path, response_format

    • Loads/parses XML and returns document_id

  • define_close_document

    • Input: document_id, response_format

    • Removes document from cache

  • define_get_metadata_summary

    • Input: document_id, response_format

    • Returns metadata and entity counts

Required List/Get Tools

  • Datasets

    • define_list_datasets

    • define_get_dataset

  • Variables

    • define_list_variables

    • define_get_variable

  • Codelists

    • define_list_codelists

    • define_get_codelist

  • ARM

    • define_list_arm_results

    • define_get_arm_result

Search Tool

  • define_search

Notes

  • ARM is optional. ARM tools return empty results when ARM data is not present.

  • All list tools support pagination via offset and limit.

Available Tools

13 tools
define_close_documentClose Define-XML DocumentA
DestructiveIdempotent

Remove a loaded Define-XML document from in-memory cache by document_id.

Inputs: document_id (required), response_format.

define_get_arm_resultGet Define-XML ARM ResultB
Read-onlyIdempotent

Get a single ARM analysis result by OID or name from a loaded Define-XML document.

Inputs: oid (required), document_id (required), response_format.

define_get_codelistGet Define-XML CodelistA
Read-onlyIdempotent

Get a single codelist by name from a loaded Define-XML document.

Inputs: name (required), document_id (required), include_terms, response_format.

define_get_datasetGet Define-XML DatasetA
Read-onlyIdempotent

Get a single dataset by OID or name from a loaded Define-XML document.

Inputs: name (required), document_id (required), response_format, include_variables.

define_get_metadata_summaryGet Define-XML Metadata SummaryA
Read-onlyIdempotent

Return high-level document metadata and counts of datasets/variables/codelists/ARM results.

Inputs: document_id (required), response_format.

define_get_variableGet Define-XML VariableA
Read-onlyIdempotent

Get a single variable by name and dataset name from a loaded Define-XML document.

Inputs: name (required), document_id (required), dataset_name (required), response_format.

define_list_arm_resultsList Define-XML ARM ResultsA
Read-onlyIdempotent

List ARM analysis results from a loaded Define-XML document (empty when ARM not present).

Inputs: document_id (required), limit, offset, response_format.

define_list_codelistsList Define-XML CodelistsA
Read-onlyIdempotent

List codelists from a loaded Define-XML document with pagination.

Inputs: document_id (required), limit, offset, response_format.

define_list_datasetsList Define-XML DatasetsA
Read-onlyIdempotent

List datasets (ItemGroupDef) from a loaded Define-XML document with pagination.

Inputs: document_id (required), limit, offset, response_format.

define_list_variablesList Dataset VariablesA
Read-onlyIdempotent

List variables of a specific dataset from a loaded Define-XML document with pagination.

Inputs: document_id (required), dataset_name (required), limit, offset, +1 more.

define_load_documentLoad Define-XML DocumentA
Read-onlyIdempotent

Load and parse a local Define-XML file. Returns a document_id for subsequent tool calls.

Inputs: file_path (required), response_format.

define_reload_documentReload Define-XML DocumentB
Read-only

Reload a previously loaded Define-XML document from disk, replacing the cached version. Returns the new document_id.

Inputs: document_id (required), response_format.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 13 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: loading, closing, listing, and getting specific components (datasets, variables, codelists, ARM results) plus metadata summary and search. No overlap in functionality.

    Naming Consistency5/5

    All tools follow the consistent pattern 'define_verb_noun' (e.g., define_load_document, define_list_datasets). Verbs and nouns are descriptive and uniform.

    Tool Count5/5

    13 tools is well-scoped for a Define-XML document server: covers loading, reloading, querying individual items, listing with pagination, search, metadata summary, and memory management (close). Not excessive nor too sparse.

    Completeness4/5

    The tool set covers all fundamental read operations for Define-XML documents: load, list and get datasets/variables/codelists/ARM results, search, and metadata summary. Minor gaps like retrieving item groups beyond datasets or getting raw XML snippets exist but don't hinder core usage.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      A TypeScript-based MCP server that connects to FHIR servers, allowing access to healthcare data via fhir:// URIs and providing search capabilities for FHIR resources.
      65
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A TypeScript MCP server for managing persistent knowledge graphs with entities, directional relations, and time-based observations. It enables users to create, search, and track structured information with built-in concurrency control and JSON file storage.
      MIT