Skip to main content
Glama

Clinicaltrials Get Field Definitions

clinicaltrials_get_field_definitions
Read-onlyIdempotent

Resolve valid field names from the ClinicalTrials.gov data model — the canonical PascalCase identifiers (OverallStatus, EnrollmentCount, LeadSponsorName) accepted by the fields, advancedFilter, and sort parameters of other tools, and as input to clinicaltrials_get_field_values. Select a mode: "search" — keyword search returning ranked matches (pass query, e.g. "enrollment", "sponsor", "adverse events"); "drill" — drill into a specific section by dot-notation path (pass path, e.g. "protocolSection.designModule"); "overview" — top-level summary of all sections (no additional args).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesOperation mode. "search" — keyword search (requires `query`); "drill" — drill into a section by path (requires `path`); "overview" — list all top-level sections (no other args needed).
pathNodrill mode only. Dot-notation path to drill into — e.g., "protocolSection.designModule", "protocolSection.eligibilityModule", "resultsSection". Returns the section's individual fields.
limitNosearch mode only. Maximum results to return. Default: 20.
queryNosearch mode only. Keyword to search field names by — e.g., "enrollment", "sponsor", "adverse events". Returns matching field names ranked by relevance with their full paths and data types.
includeIndexedOnlyNodrill mode only. Only return indexed (searchable) fields. Default: false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe limit cap applied to this search (search mode only).
errorNoPresent when the call failed. Absent on success.
shownNoNumber of fields returned (search mode only).
fieldsNoField definitions, ordered by relevance when mode is "search".
noticeNoRecovery guidance when search mode returns no matches, or a truncation note when results are capped.
truncatedNoTrue when the field list was capped by the limit parameter (search mode only).
searchQueryNoEcho of the keyword used in search mode. Absent for drill and overview.
totalFieldsNoTotal fields returned.
resolvedPathNoResolved path when mode is "drill".
totalMatchesNoTotal fields matching the query before the limit cap was applied (search mode only). Compare against `shown` to size a follow-up limit, or to see that a capped result set is barely over the cap rather than hundreds deep.

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare a safe read-only, idempotent, open-world operation, so the bar for the description is about adding value on top. It clarifies the mode-dependent contract numerically — what happens when each mode's parameters are dispatched — and the kind of output (ranked matches, section fields, top-level summary). It stops short of disclosing edge cases like empty result sets, invalid paths, or whether overview has bounded output, which would take this to 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 purpose clause is front-loaded before the em dash, with the mode-by-mode breakdown following in a scannable, rhythmically consistent format. Every clause earns its place: the examples are illustrative, the mode-to-parameter mapping is tight. It is two substantial sentences, which is appropriate for the complexity, though it could theoretically be slimmed slightly.

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?

Given the tool's genuine complexity (three dispatch modes, conditional parameter requirements, cross-tool integration), the description leaves little procurement failure mode uncovered: all modes, their params, and example values are documented. The presence of an output schema frees the description from return-value documentation, and it fills the remaining gap (downstream usage) by noting this feeds clinicaltrials_get_field_values.

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 100%, so the baseline is 3. Credit is earned by the description's enrichment above the schema: it groups parameters by mode (search/drill/overview), provides realistic example values ("enrollment", "sponsor", "protocolSection.eligibilityModule"), and clarifies the conditional requirements (e.g., overview takes 'no additional args') that aren't explicit in the schema's required-fields alone.

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?

Opens with a specific verb ('Resolve') and a tightly-scoped resource: 'valid field names from the ClinicalTrials.gov data model,' buttressed by canonical examples (OverallStatus, EnrollmentCount, LeadSponsorName). It explicitly says what the output is for — the fields/advancedFilter/sort parameters of other tools and input to clinicaltrials_get_field_values — which clearly differentiates it from the study-query siblings. An agent could identify this tool's role without opening a single sibling 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?

Provides explicit when-to-use context for every branch: keyword search passes `query`, drill passes a dot-notation `path`, and overview needs no arguments. It also states where the output is consumed, which routes an agent toward correct downstream usage. However, it never names what it is not — e.g., unlike clinicaltrials_search_studies or clinicaltrials_get_study_record — so an explicit exclusion for the other five siblings is absent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool targets a distinct action: finding eligible trials, resolving field names, discovering field values, counting studies, fetching full records, fetching results, and searching. Even the count tool is clearly separated from search by its lightweight, no-data purpose. No two tools have ambiguous boundaries.

Naming Consistency5/5

All tools follow a strict 'clinicaltrials_' prefix followed by a descriptive verb_noun pattern (find_eligible, get_study_record, search_studies). The naming is uniform in snake_case and clearly indicates the operation and object. This consistency makes the tool set predictable.

Tool Count5/5

Seven tools is well within the ideal range for a focused MCP server. Each tool covers a necessary aspect of the ClinicalTrials.gov API (search, retrieval, counting, field exploration, results, eligibility matching) without bloat or redundancy. The scope feels complete for a read-only clinical trials interface.

Completeness5/5

The tool set covers the full read-only lifecycle: discovering the data model, searching, counting, fetching protocol records, fetching results, and matching patients to trials. There are no obvious gaps like missing location details or result statistics (both handled via parameters). The server fulfills its stated purpose without dead ends.