Skip to main content
Glama
cyanheads

clinicaltrialsgov-mcp-server

Clinicaltrials Search Studies

clinicaltrials_search_studies
Read-onlyIdempotent

Search for clinical trials from ClinicalTrials.gov using free text, condition, intervention, location, or advanced filters with pagination and field selection.

Instructions

Search for clinical trial studies from ClinicalTrials.gov. Supports full-text and field-specific queries, status/phase/geographic filters, pagination, sorting, and field selection. Use the fields parameter to reduce payload size — full study records are ~70KB each.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoGeneral free-text search across all fields. Plain words plus AND, OR, NOT only — reserved chars `[ ] ( ) ,` will fail. For field-scoped searches, use the dedicated *Query parameters (conditionQuery, interventionQuery, etc.) or advancedFilter with AREA[FieldName]value.
conditionQueryNoCondition/disease-specific search. E.g., "Type 2 Diabetes", "non-small cell lung cancer". Plain words plus AND/OR/NOT only — reserved chars: [ ] ( ) ,
interventionQueryNoIntervention/treatment search. E.g., "pembrolizumab", "cognitive behavioral therapy". Plain words plus AND/OR/NOT only — reserved chars: [ ] ( ) ,
locationQueryNoLocation search — city, state, country, or facility name. Plain words plus AND/OR/NOT only — reserved chars: [ ] ( ) ,
sponsorQueryNoSponsor/collaborator name search. Plain words plus AND/OR/NOT only — reserved chars: [ ] ( ) ,
titleQueryNoSearch within study titles and acronyms only. Plain words plus AND/OR/NOT only — reserved chars: [ ] ( ) ,
outcomeQueryNoSearch within outcome measure fields. Plain words plus AND/OR/NOT only — reserved chars: [ ] ( ) ,
statusFilterNoFilter by study status. Values: RECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING, NOT_YET_RECRUITING, ENROLLING_BY_INVITATION, SUSPENDED, TERMINATED, WITHDRAWN, UNKNOWN, WITHHELD, NO_LONGER_AVAILABLE, AVAILABLE, APPROVED_FOR_MARKETING, TEMPORARILY_NOT_AVAILABLE.
phaseFilterNoFilter by trial phase. Values: EARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4, NA.
advancedFilterNoAdvanced filter using AREA[FieldName]value syntax. Examples: "AREA[StudyType]INTERVENTIONAL", "AREA[EnrollmentCount]RANGE[100, 1000]", "AREA[Phase]PHASE2 AND AREA[StudyType]INTERVENTIONAL", "(AREA[Phase]PHASE3 OR AREA[Phase]PHASE4) AND AREA[StudyType]INTERVENTIONAL". AND/OR/NOT join complete AREA[FieldName]value expressions; parentheses group them. Call clinicaltrials_get_field_definitions to find AREA[]-compatible field names.
geoFilterNoGeographic proximity filter. Format: distance(lat,lon,radius). E.g., "distance(47.6062,-122.3321,50mi)" for studies within 50 miles of Seattle.
nctIdsNoFilter to specific NCT IDs for batch lookups.
fieldsNoPascalCase leaf names to return; strongly recommended since full records are ~70KB. Common leaves: NCTId, BriefTitle, BriefSummary, OverallStatus, Phase, LeadSponsorName, Condition. Call clinicaltrials_get_field_definitions with a concept query (e.g., "adverse events", "eligibility") to find the exact leaf for any concept.
sortNoSort order. Format: FieldName:asc or FieldName:desc. E.g., "LastUpdatePostDate:desc", "EnrollmentCount:desc". Max 2 fields comma-separated. Use clinicaltrials_get_field_definitions to find sortable field names.
pageSizeNoResults per page, 1–200.
pageTokenNoPagination cursor from a previous response.
countTotalNoInclude total study count in response. Only computed on the first page.
includeUnknownEnrollmentNoInclude studies whose EnrollmentCount is the upstream "unknown" sentinel (99999999). Excluded by default — the sentinel pollutes RANGE[N, MAX] queries and EnrollmentCount:desc sorts. Set true for data-quality audits or when targeting unknown-enrollment studies specifically.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
studiesYesMatching studies. Each entry is a nested ClinicalTrials.gov study record — top-level keys: protocolSection, derivedSection, hasResults, resultsSection, documentSection. Use clinicaltrials_get_field_definitions to explore the schema.
totalCountNoTotal matching studies (first page only when countTotal=true).
nextPageTokenNoToken for the next page. Absent on last page.
searchCriteriaNoEcho of query/filter criteria used. Present when results are empty.
requestedFieldsNoEcho of the explicit fields parameter — present only when the caller passed fields. Lifts the default truncation cap so all requested leaves render in full.
noMatchHintsNoSuggestions for broadening the search when no results are found.
Behavior5/5

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

Annotations readOnlyHint, idempotentHint, and openWorldHint are present. The description adds behavioral context: full records are ~70KB each, the includeUnknownEnrollment parameter's sentinel pollutes queries, and countTotal is only computed on the first page. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with purpose and capabilities, then concise performance advice. Every sentence adds value; no fluff.

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 18 parameters, 100% schema coverage, and output schema exists, the description covers key aspects: field selection, sorting, pagination, geo/advanced filters, and performance. References to sibling tools and reserved char limitations complete the picture.

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 description coverage is 100%, baseline 3. The description enriches parameters with reserved char warnings, example formats (geoFilter, advancedFilter), and links to helper tools. This adds value beyond schema descriptions.

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 clearly states 'Search for clinical trial studies from ClinicalTrials.gov' with a specific verb and resource. It lists supported features (full-text/field queries, filters, pagination, sorting, field selection) and distinguishes itself from siblings like clinicaltrials_get_study_record, which retrieves individual records.

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?

The description advises using the fields parameter to reduce payload and references clinicaltrials_get_field_definitions for field names. However, it does not explicitly contrast when to use this tool vs. siblings (e.g., for batch lookups with NCT IDs, clinicaltrials_get_study_record might be better).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/clinicaltrialsgov-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server