Clinicaltrials Get Field Definitions
clinicaltrials_get_field_definitionsResolve valid ClinicalTrials.gov field names and paths before using search or filter tools. Find canonical PascalCase identifiers by keyword, drill into a section, or list top-level sections.
Instructions
Resolve valid field names from the ClinicalTrials.gov data model — the canonical PascalCase identifiers (OverallStatus, EnrollmentCount, LeadSponsorName) the other tools take. Every record piece works in clinicaltrials_search_studies fields; a leaf piece (sourceType other than STRUCT) also works in AREA[…] expressions in advancedFilter and the query parameters, and as input to clinicaltrials_get_field_values (LocationGeoPoint aside); a leaf of a date or integer type (NormalizedDate, PartialDate, DateTimeMinutes, integer, long, short) also works in sort. An index-only piece (drill with includeIndexedOnly, e.g. NumLocations) works wherever a leaf does except fields. 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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "<mode>"
},
"name": "clinicaltrials_get_field_definitions"
}
}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. A value at or past the match count returns every match. | |
| 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. Also list index-only pieces (search-index fields such as StudyFirstPostYear, NumLocations) alongside the record fields. They work in `AREA[…]`, in `sort` (the integer counts), and in clinicaltrials_get_field_values, but not in clinicaltrials_search_studies `fields`; search mode never lists them. 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. |