Clinicaltrials Get Field Definitions
clinicaltrials_get_field_definitionsDiscover valid ClinicalTrials.gov field names for queries. Search by keyword, drill into sections, or get an overview to use in filters and sorting.
Instructions
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
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Operation 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). | |
| path | No | drill mode only. Dot-notation path to drill into — e.g., "protocolSection.designModule", "protocolSection.eligibilityModule", "resultsSection". Returns the section's individual fields. | |
| limit | No | search mode only. Maximum results to return. Default: 20. | |
| query | No | search 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. | |
| includeIndexedOnly | No | drill mode only. Only return indexed (searchable) fields. Default: false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | The limit cap applied to this search (search mode only). | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of fields returned (search mode only). | |
| fields | No | Field definitions, ordered by relevance when mode is "search". | |
| notice | No | Recovery guidance when search mode returns no matches, or a truncation note when results are capped. | |
| truncated | No | True when the field list was capped by the limit parameter (search mode only). | |
| searchQuery | No | Echo of the keyword used in search mode. Absent for drill and overview. | |
| totalFields | No | Total fields returned. | |
| resolvedPath | No | Resolved path when mode is "drill". | |
| totalMatches | No | Total 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. |