Skip to main content
Glama
cyanheads

clinicaltrialsgov-mcp-server

by cyanheads

Clinicaltrials Find Eligible

clinicaltrials_find_eligible
Read-onlyIdempotent

Match a patient's age, sex, conditions, and location to eligible recruiting clinical trials, surfacing studies with matching criteria, contact details, and nearby sites.

Instructions

Match patient demographics and conditions to eligible recruiting clinical trials. Provide age, sex, conditions, and location to find studies with matching eligibility criteria, contact information, and recruiting locations. Results are re-ranked so studies whose own condition matches a requested condition surface above tangential matches from ClinicalTrials.gov's fuzzy condition search. Each candidate returns only the sites matching the requested location (capped by locationLimit), not the study's full registered site list — a large trial can register hundreds of sites worldwide. When none of a candidate's matched sites is recruiting, its nearest recruiting site is added, so an enrollable site is never hidden behind a closer closed one. Fetch a study's complete record with clinicaltrials_get_study_record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ageYesPatient age in years.
sexYesPatient's biological sex. Use 'ALL' to include studies regardless of sex restrictions.
locationYesPatient location as `{ country (required), state?, city? }`. Country is required; state/city narrow the match. For radius-based geographic search, use clinicaltrials_search_studies with geoFilter.
conditionsYesMedical conditions or diagnoses, e.g. ["Type 2 Diabetes", "Hypertension"]. Each entry is matched as a condition (multi-word entries match as a phrase); multiple entries are combined with OR, so studies for any listed condition qualify. Returned studies are re-ranked so those whose own condition list names a requested condition rank above tangential matches the upstream fuzzy search pulls in via the MeSH umbrella.
maxResultsNoMaximum results to return.
locationLimitNoCap on the sites returned per candidate. Each candidate keeps only the sites matching the requested location at the narrowest level that matched (city, else state, else country), capped at this many; the rest of the study's registered sites are omitted. The cap governs those matched sites — when none of them is recruiting, the candidate's nearest recruiting site is added on top of it, so a candidate can carry one site more than this. Raise it to see more nearby sites, or fetch the complete site list with clinicaltrials_get_study_record. Each candidate reports totalLocations / matchedLocations / locationsTruncated / nearestRecruitingSiteAdded in locationSummary only when the bound actually dropped sites.
recruitingOnlyNoOnly include actively recruiting studies.
healthyVolunteerNoWhether the patient is a healthy volunteer. When true, only studies accepting healthy volunteers are queried.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
funnelNoMatch counts at each filter stage. Shows where the funnel collapsed — e.g., conditionMatched=298 but demographicsMatched=2 means age/sex/status are the constraint.
noticeNoRecovery guidance when no studies matched — identifies which filter stage collapsed and suggests how to broaden. Absent when results are returned.
studiesNoMatching studies with eligibility and location fields. Each candidate's protocolSection.contactsLocationsModule.locations is BOUNDED to the sites matching the requested location (capped at locationLimit) plus, when none of those is recruiting, the candidate's nearest recruiting site — not the study's full registered site list. A candidate whose sites were bounded also carries a top-level locationSummary object — { totalLocations, matchedLocations, locationsTruncated, nearestRecruitingSiteAdded?, retrieveFullStudyWith } — absent when nothing was dropped; nearestRecruitingSiteAdded is present only when that extra site was added. Fetch a study's complete record and site list with clinicaltrials_get_study_record.
totalCountNoTotal matching studies from the API.
searchCriteriaNoNormalized search criteria applied to this eligibility query, including the exact upstream query strings needed to reproduce the full match set via clinicaltrials_search_studies (replay with includeUnknownEnrollment=true, which find_eligible always sets).
Behavior5/5

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

Beyond the readOnlyHint/idempotentHint annotations, the description discloses substantial non-obvious behavior: the re-ranking so exact condition matches surface above fuzzy MeSH tangential matches, the site-level filtering capped by locationLimit (omitting a study's hundreds of other sites), the nearest-recruiting-site fallback so an enrollable site is never hidden, and the locationSummary counters. This is rich, candid behavioral disclosure that materially changes how an agent interprets results.

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 is front-loaded in sentence one, and every subsequent sentence earns its place (re-ranking, site capping, recruiting fallback, pointer to sibling). It runs slightly long and duplicates some locationLimit detail that already lives in the schema description, but the structure is logical and efficient overall.

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

Completeness4/5

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

For a tool with 8 params, nested objects, and an output schema, the combination of description, schema, and annotations is thorough: purpose, eligibility behavior, site truncation, fallback logic, and the record-fetching alternative are all covered, while return values are delegated to the output schema. Few gaps remain, and none are critical to calling the tool correctly.

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

Parameters3/5

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

Schema coverage is 100% with detailed descriptions for every parameter — location's nested object shape, conditions' phrase/OR semantics, locationLimit's cap and locationSummary behavior, recruitingOnly/healthyVolunteer defaults. The description reinforces the required params (age, sex, conditions, location) and echoes locationLimit behavior, but adds little parameter meaning beyond what the schema already delivers, matching the baseline 3.

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 opens with a specific verb and resource — 'Match patient demographics and conditions to eligible recruiting clinical trials' — and specifies scope: age, sex, conditions, location. It distinguishes itself from sibling clinicaltrials_search_studies (radius-based geo search) inside the location parameter and from clinicaltrials_get_study_record (full record fetch), so an agent can separate it from alternatives.

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?

It clearly frames the tool as patient-to-trial eligibility matching and names two sibling alternatives with their selection conditions: fetching a complete record via clinicaltrials_get_study_record, and radius-based geographic search via clinicaltrials_search_studies with geoFilter. It doesn't spell out when-not-to-use scenarios versus every sibling, but the context and alternatives are explicit enough.

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