Skip to main content
Glama
CDISC Library MCP Server

CDISC Library MCP Server

by whereayan

get_variable

Read-only

Retrieves detailed metadata for a specified SDTM/SEND/CDASH variable, including data type, core attributes, role, and CT codelist references.

Instructions

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

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

Input Schema

NameRequiredDescriptionDefault
rawNotrue 时返回未经瘦身的原始 API 载荷(含 _links 等超媒体元数据);默认 false,返回已瘦身、更省 token 的响应
datasetYes数据集名称(大写),如 DM
versionYes版本号,支持 '3-4' 或 '3.4' 格式;传 'latest' 自动解析为该产品当前最新版本
standardYes标准名称: sdtm, sdtmig, sendig, adam, adamig, cdash, cdashig
variableYes变量名称(大写),如 USUBJID, AGE, SEX

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

readOnlyHint=true already tells the agent this is a safe read, and the description adds real value on top by disclosing the shape of the returned record (attributes, role, codelist refs under refs). It does not mention failure behavior for unknown variables/datasets, but for a read-only lookup that is a minor omission.

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?

Three short lines: what it returns, the scope restriction plus alternative tool, then a concrete example. The scope restriction and the redirect are front-loaded, and no sentence is filler.

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?

With no output schema, the description correctly compensates by listing the returned fields, and the example demonstrates a valid invocation across all four required parameters. Remaining gaps are small: it does not say what happens when a variable name is not found, nor how the raw flag changes the returned payload beyond the schema's own note.

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 the schema already carries the meaning of all five parameters, including the raw toggle and the 'latest' version sentinel – the description adds nothing to those. The worked example does reinforce value formats ('3-4', uppercase DM/USUBJID), which is a marginal gain over a fully documented schema and lands at baseline.

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?

The description names a specific verb+resource ('获取指定变量的详细信息') and enumerates the payload an agent will get back: data type, core attributes (Req/Exp/Perm), role, and CT codelist references in refs. It also explicitly marks the boundary against the sibling 'get_datastructure_variable', so the tool is distinguishable without opening either schema.

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?

It states the applicable standards (SDTM/SEND/CDASH) and names the alternative tool for ADaM variables, which is exactly the routing decision an agent needs. However, the input schema's enum still accepts 'adam'/'adamig', creating a residual ambiguity the description does not reconcile (e.g. whether those values error or are silently resolved).

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