Skip to main content
Glama
CDISC Library MCP Server

CDISC Library MCP Server

by whereayan

get_codelist_terms

Read-only

Retrieve all terms (standardized values) from a specified CDISC terminology package and codelist, returning lean term refs whose href suffix contains each term's C code.

Instructions

获取指定编码列表中的所有术语(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'

Input Schema

NameRequiredDescriptionDefault
rawNotrue 时返回未经瘦身的原始 API 载荷(含 _links 等超媒体元数据);默认 false,返回已瘦身、更省 token 的响应
packageYesCT 包名称,如 'sdtmct-2024-03-29'(SDTM 术语)或 'adamct-2024-03-29'(ADaM 术语);大小写不敏感。不确定有哪些包时用 get_ct_packages 查询
codelistYes编码列表 ID,格式为 'C' + 数字,如 C66731(SEX), C65047(LBTESTCD)。ID 不能靠直觉拼:C667 不存在(SEX 实为 C66731),C141657 是 10-Meter Walk/Run Functional Test Test Code、与 LBTESTCD 无关。不确定某变量的 codelist ID 时,用 get_variable 看其 refs 里的 CT 引用,或 get_codelists 按名称查

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint annotation: it discloses the exact response shape (refs map of term name -> href, with the C code as the href's last segment), explicitly documents a negative behavior (submissionValue is never returned, even with raw=true, by API design), and quantifies a real risk (responses up to ~260k characters for large codelists). This is exactly the kind of operational context an agent cannot get from structured fields.

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 key constraint (no per-term submissionValue, use the sibling instead) is front-loaded and the example anchors it at the end. It is dense with useful caveats, though the emphasis markers and the large-table warning could be tightened slightly.

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 and three parameters, the description does the heavy lifting well: return shape, omitted fields, and size limits are all covered. The one shortfall is that after flagging 260k-character responses it names no concrete pagination approach, leaving the agent without a next step for the worst case.

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 coverage is already 100%, so the schema carries the baseline. The description still adds value by clarifying that raw=true does not unlock submissionValue and by giving a concrete package/codelist example pair, which helps an agent form valid arguments.

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 ('获取指定编码列表中的所有术语'), defines what a term is ('可选的标准化值'), and distinguishes itself from get_codelist_submission_values. An agent can tell exactly what this returns without opening the 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?

Explicitly routes to get_codelist_submission_values when the three-column view (name + C code + submission value) is needed, and warns that large codelists such as LBTESTCD should use a paginated tool instead. The paginated alternative is referenced only vaguely as '新工具分页' without being named, which is a minor gap given the sibling list.

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