Skip to main content
Glama
CDISC Library MCP Server

CDISC Library MCP Server

by whereayan

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CDISC_API_KEYYesAPI 密钥 from CDISC Library API Portal
CDISC_BASE_URLNoAPI URLhttps://library.cdisc.org/api
CDISC_CACHE_DIRNo缓存目录~/.cdisc-mcp/cache
CDISC_CACHE_TTLNo缓存时间(秒)86400

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_productsA

获取所有 CDISC 产品列表,包括 SDTM、ADaM、CDASH 等标准及各 IG 系列。 返回产品名称、版本路径(refs)、类型等信息。 无需参数,可直接调用。不确定某标准的可用版本时,先调这个。

get_standardA

获取指定标准的基本信息:描述、生效日期、包含的类列表等。

示例: standard='sdtmig', version='3-4'(或 '3.4' / 'latest') 注意: standard 与 version 必须匹配(如 sdtmig 用 3-x,sdtm 用 1-x/2-x),拿不准时 version 传 'latest'。

get_classesA

获取指定标准包含的所有类(Class)列表。 SDTM 类包括: Events, Findings, Interventions, SpecialPurpose 等。

示例: standard='sdtmig', version='3-4'

get_datasetsA

获取指定标准下的所有数据集列表。

仅适用于 SDTM/SEND/CDASH 系列;adam / adamig 没有 datasets 端点,请改用 get_datastructures。

示例: standard='sdtmig', version='3-4'

get_datasetA

获取指定数据集的元数据:描述、所属类、结构说明、用途等。 只查变量清单请用 get_dataset_variables(更省 token);查单个变量详情用 get_variable。 仅适用于 SDTM/SEND/CDASH 系列;ADaM 的数据结构用 get_datastructure。

示例: standard='sdtmig', version='3-4', dataset='DM'

get_dataset_variablesA

获取指定数据集的完整变量列表(名称、标签、核心属性 Req/Exp/Perm、角色等)。 这是拿一个域全部变量定义的首选工具;数据集本身的元数据用 get_dataset。 仅适用于 SDTM/SEND/CDASH 系列;查 ADaM(如 ADSL)的变量请改用 get_datastructure(含 core 与类型的整表)或 get_datastructure_variables(名称清单)。

示例: standard='sdtmig', version='3-4', dataset='DM'

get_variableA

获取指定变量的详细信息:数据类型、核心属性(Req/Exp/Perm)、角色、关联的 CT codelist 引用(在 refs 中)等。 仅适用于 SDTM/SEND/CDASH 系列;ADaM 变量用 get_datastructure_variable。

示例: standard='sdtmig', version='3-4', dataset='DM', variable='USUBJID'

get_datastructuresA

获取 ADaM 产品(adam / adamig)包含的分析数据结构清单(ADSL、BDS 等)。 ADaM 侧没有 datasets 端点,get_datasets 对 adam/adamig 一定 404,要先用这个看有哪些结构。

示例: standard='adamig', version='latest'

get_datastructureA

获取单个分析数据结构的完整变量表:按变量集分组,每个变量一行 (name / label / core / datatype)。这是唯一带 core 与类型的整表来源, 问“ADSL 有哪些变量(含 Required/Permissible)”就用它。

默认返回紧凑表(已去掉每个变量的 description); 整包原始载荷很大,确有必要时再传 raw=true。

示例: standard='adamig', version='latest', datastructure='ADSL'

get_datastructure_variablesA

获取分析数据结构的变量名清单(变量名 + 标签,另给 hrefTemplate),最省 token 的穷举方式。 注意:此端点不返回 core 与数据类型,要整表用 get_datastructure; 单个变量的定义与描述用 get_datastructure_variable。

示例: standard='adamig', version='latest', datastructure='ADSL'

get_datastructure_variableA

获取分析数据结构中单个变量的详情:core、数据类型、描述、所属变量集(在 refs 中)。 变量名大小写不敏感(API 里是 SITEGRy / APHASEw 这类混合大小写,会自动匹配到准确写法)。

示例: standard='adamig', version='latest', datastructure='ADSL', variable='AGE'

get_datastructure_varsetsA

获取分析数据结构包含的变量集(Identifier / Treatment / Trial Experience 等)清单。 变量集名跨版本不稳定,下钻前先来这里取当版的可用名称。

示例: standard='adamig', version='latest', datastructure='ADSL'

get_datastructure_varsetA

获取单个变量集的内容(含每个变量的 description),适合按集下钻而不要拉整包。 varset 可传 slug(如 Identifier、SubjectDemographics)或显示名 (如 'ADSL Subject Demographics'、'Subject Demographics'),大小写与空格/连字符不敏感。

示例: standard='adamig', version='latest', datastructure='ADSL', varset='PopulationIndicator'

get_ct_packagesA

获取所有 CDISC 控制术语(Controlled Terminology)包列表。 返回包名称、生效日期等信息。 无需参数,可直接调用。

get_ct_packageA

获取指定控制术语包详情:包元信息 + 分页的 codelist 索引(含每张表的 termCount)。 整包载荷内联了全部术语及其 submissionValue(sdtmct 实测 1106 张表 / 13 MB),因此默认只发索引、不发内联术语;raw=true 会把 13 MB 原样推送,常见 MCP 客户端会在 60s 超时,请改用 get_codelist_submission_values 按表取。

示例: package='sdtmct-2024-03-29'

get_codelistsA

获取指定控制术语包中的所有编码列表(Codelist)。

示例: package='sdtmct-2024-03-29'

get_codelistA

获取指定编码列表的详细信息(定义、是否可扩展等)。 要拿列表里的全部术语用 get_codelist_terms;要连提交值一起拿用get_codelist_submission_values。

示例: package='sdtmct-2024-03-29', codelist='C66731'

get_codelist_termsA

获取指定编码列表中的所有术语(Terms),即可选的标准化值。 瘦身后返回 refs: {术语名 -> 术语href},href 末段即术语的 C 代码。 注意:本端点不返回逐术语的 submissionValue(顶部的 submissionValue 是codelist 自己的,如 LBTESTCD,不是术语的);raw=true 也没有,这是 Library API 的设计而非瘦身剔除。要术语名+C 代码+提交值三列,用 get_codelist_submission_values。大表(如 LBTESTCD 2397 术语)本工具响应可达 26 万字符,建议改用新工具分页。

示例: package='sdtmct-2024-03-29', codelist='C66731'

get_codelist_submission_valuesA

分页返回编码列表的全部术语及其提交值(submissionValue),三列:C 代码 / 术语名 / 提交值。 一次读取包级载荷即可覆盖整表,不需要逐术语调用 get_term(260 个术语实测约 150s / 260 次,本工具整表只需 1~2 次);只有包载荷缺失的术语才回退到单条详情,并在termsResolvedByDetailRequest 里告知回数。 可只查名字与提交值(fields='name,submissionValue'),或加上 definition / synonyms。 翻页看 total / hasMore;LBTESTCD(2397 术语)单页上限 2000,需两页。 单条术语的完整详情仍用 get_term(支持按术语名查)。

示例: package='sdtmct-2024-03-29', codelist='C66731' -> [{code: C16576, name: Female, submissionValue: F}, ...]

get_termA

获取指定术语的详细信息,包括定义、提交值(submissionValue)等。

term 参数支持两种写法:

  1. 术语 C 代码,如 'C201972'

  2. 术语名称(不区分大小写),如 'Female'——会自动在 codelist 内解析成 C 代码;找不到时会返回相近的候选名

示例: package='sdtmct-2024-03-29', codelist='C66731', term='Female'

searchA

全局搜索 CDISC Library,可搜索标准、数据集、变量、术语等。 命中按相关度排序;结果在客户端缓存 24h。

参数说明:

  • query: 搜索关键词,如 'sdtm', 'adverse event', 'DM', 'AVAL'

  • type: 可选,按命中类型过滤(不区分大小写),如 'Analysis Variable'

  • limit / offset: 可选,客户端分页,如 limit=20, offset=20 取第 21-40 条

示例: query='AVAL', type='Analysis Variable', limit=10

compare_versionsA

比较同一标准两个版本的差异。

默认返回摘要视图(各差异分区名称与行数 + Info 分区内容),因为完整 diff 载荷可达数十 MB,不适合直接进上下文。 要看某分区详情:传 section='<分区名>'(名称来自摘要里的 sections 索引),并用 max_rows 控制返回行数(默认 200,超出会标注 truncated)。

参数说明:

  • standard: 标准名称,如 sdtmig, adamig

  • old_version / new_version: 旧/新版本号,支持 '3-3'/'3.3'/'latest';传反了会自动交换并在响应 note 中说明

示例: standard='sdtmig', old_version='3-3', new_version='3-4' 再下钻: section='Domains', max_rows=50

Prompts

Interactive templates invoked by user choice

NameDescription
explore_standard引导用户探索某个 CDISC 标准
find_variable帮助用户查找特定变量
find_terminology帮助用户查找控制术语
compare_standards引导用户比较标准版本
validate_dataset检查数据集是否符合标准

Resources

Contextual data attached and managed by the client

NameDescription
CDISC Products所有 CDISC 产品列表 (SDTM, ADaM, CDASH 等)
API InformationCDISC Library API 信息

TDQS

A3.9/5.0

Scored across 22 tools

Disambiguation4/5

The set is deliberately split into two parallel trees (SDTM/SEND/CDASH: get_datasets → get_dataset → get_dataset_variables → get_variable; ADaM: get_datastructures → get_datastructure → get_datastructure_variable/varset), and the descriptions explicitly state which sibling to use and warn that get_datasets 404s for ADaM. Remaining overlap is real but mitigated: get_datastructure_variables vs get_datastructure vs get_datastructure_varset all expose variables, and get_codelist_terms vs get_codelist_submission_values vs get_term all expose terms. An agent must read carefully but not guess blindly.

Naming Consistency4/5

Almost everything follows snake_case get_<noun> with a clear singular/plural convention (get_datasets vs get_dataset, get_ct_packages vs get_ct_package, get_codelists vs get_codelist). The only deviations are 'search' (verb, no noun) and 'compare_versions' (verb_object rather than get_). Consistent and highly readable overall.

Tool Count3/5

22 tools is on the heavy side, driven by maintaining two parallel hierarchies (dataset-* and datastructure-*) plus a five-tool CT/codelist chain. Most of these exist for token efficiency (short-name-list variants, paginated submission values), so they earn their place, but the surface is still larger than the domain strictly requires and increases selection burden.

Completeness4/5

The read-only CDISC Library domain is covered end to end: products → standards → classes → datasets/structures → variables/varsets, CT packages → codelists → terms → submission values, plus global search and version diff. Gaps are minor: no direct way to enumerate CT codelist references across a whole dataset, no value-level metadata traversal beyond per-variable refs, and no raw/vendor-extension endpoints. These can mostly be worked around by chaining existing tools.

Maintenance

ActivityMaintained
ResponsivenessSyncing