Skip to main content
Glama
CDISC Library MCP Server

CDISC Library MCP Server

by whereayan

get_codelist_submission_values

Read-only

Retrieve all terms and submission values for a CDISC codelist as paginated code/name/submissionValue rows, so you can review an entire table without querying each term individually.

Instructions

分页返回编码列表的全部术语及其提交值(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}, ...]

Input Schema

NameRequiredDescriptionDefault
rawNotrue 时返回未经瘦身的原始 API 载荷(含 _links 等超媒体元数据);默认 false,返回已瘦身、更省 token 的响应
limitNo本页最多返回多少条(默认 200,上限 2000:超订会被钳到 2000 并在limitRequested 里回显请求值);全量条数看响应里的计数字段,hasMore 判断要不要继续翻页
fieldsNo每行要返回的列,默认 code,name,submissionValue;可选加 definition 或 synonyms。数组或逗号分隔字符串皆可
offsetNo分页起始下标(默认 0)
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.7/5.0
Behavior4/5

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

The annotations only declare readOnlyHint=true, so the description carries most of the behavioral burden and does so: payload-based resolution, a termsResolvedByDetailRequest count reporting fallback terms, total/hasMore paging signals, a 2000-per-page clamp (limitRequested echo), and a concrete scale note that LBTESTCD's 2397 terms need two pages. It doesn't discuss auth or failure modes for an invalid codelist ID, which keeps it off a 5.

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 point — don't call get_term per term — is front-loaded before mechanics and the example, and every line carries operational content (cost comparison, projection, paging, ID pitfalls). It is dense and runs long, with the closing 'use get_term for single-term detail' partially restating an earlier line, so it falls short of a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter read tool with no output schema, the description supplies the return shape (three columns plus an example row), page-size and total/hasMore semantics, and the fallback-count field, which is everything an agent needs to call it and interpret the result. The scale warning about two-page codelists closes the remaining gap.

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

Parameters5/5

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

Schema coverage is already 100%, so the baseline would be 3, but the description adds real semantic guidance on top: fields can be narrowed to 'name,submissionValue' (or extended with definition/synonyms), pagination is driven by total/hasMore rather than blind looping, and the codelist ID has documented traps (C667 does not exist; C141657 is not LBTESTCD).

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 states a precise verb and resource (paginated retrieval of a codelist's terms and their submissionValue) and fixes the output shape as three columns (code / name / submissionValue). It explicitly sets itself apart from the sibling get_term and shows a concrete example (package='sdtmct-2024-03-29', codelist='C66731' → [{code: C16576, ...}]).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It says when NOT to use the per-term path: reading the package payload covers the whole table in 1–2 calls versus roughly 150s / 260 calls to get_term, with a fallback to per-term detail only for terms missing from the payload. It also routes to get_ct_packages when the package is unknown and to get_variable / get_codelists when the codelist ID is uncertain, and reserves get_term for full single-term detail.

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