Skip to main content
Glama

Clinicaltrials Find Eligible

clinicaltrials_find_eligible
Read-onlyIdempotent

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, one recruiting site is added so an enrollable site is never hidden behind a closer closed one: the one nearest the matched sites by their published coordinates, in the requested country whenever a site there recruits, carrying distanceMi, or the first in match order when coordinates are missing. 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, one recruiting site is added on top of it (the nearest to any matched site, measured before this cap, when coordinates allow — in the requested country whenever a site there recruits), 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, one added recruiting site — not the study's full registered site list. The added site is the one nearest any matched site by published coordinates, taken from the requested country whenever a site there recruits, and carries distanceMi (miles to that nearest matched site); when the matched or recruiting sites publish no coordinates it is the first in match order and carries no distanceMi. 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 (the key keeps its name in the match-order fallback). 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).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / locationLimit / description
      Previous value: -"Cap 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."New value: +"Cap 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, one recruiting site is added on top of it (the nearest to any matched site, measured before this cap, when coordinates allow — in the requested country whenever a site there recruits), 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."
    • changedOutput schema / properties / studies / description
      Previous value: -"Matching 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."New value: +"Matching 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, one added recruiting site — not the study's full registered site list. The added site is the one nearest any matched site by published coordinates, taken from the requested country whenever a site there recruits, and carries distanceMi (miles to that nearest matched site); when the matched or recruiting sites publish no coordinates it is the first in match order and carries no distanceMi. 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 (the key keeps its name in the match-order fallback). Fetch a study's complete record and site list with clinicaltrials_get_study_record."
  2. Changed1 schema field changed
    • changedOutput schema / properties / searchCriteria / properties / location / description
      Previous value: -"The exact queryLocn string sent upstream (city/state/country joined). Pass as locationQuery to clinicaltrials_search_studies to reproduce the location filter beyond the maxResults cap."New value: +"The exact queryLocn string sent upstream (city/state/country, multi-word components quoted, AND-joined). Pass as locationQuery to clinicaltrials_search_studies to reproduce the location filter beyond the maxResults cap."
  3. Changed7 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / location / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "studies",
      +      "searchCriteria",
      +      "funnel"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `blank_value`: A parameter was supplied with a blank, whitespace-only, or empty-list value. `rate_limited`: ClinicalTrials.gov returned 429 after retry budget exhausted. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "blank_value",
      +            "rate_limited"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "studies",
      -  "searchCriteria",
      -  "funnel"
      -]
  4. Changed2 schema fields changed
    • addedInput schema / properties / locationLimit
      Added value: +{
      +  "default": 10,
      +  "description": "Cap 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.",
      +  "maximum": 500,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / studies / description
      Previous value: -"Matching studies with eligibility and location fields."New value: +"Matching 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."
  5. Changed1 schema field changed
    • removedInput schema / properties / conditions / minItems
      Removed value: -1
  6. Changed5 schema fields changed
    • changedOutput schema / properties / searchCriteria / description
      Previous value: -"Normalized search criteria applied to this eligibility query."New value: +"Normalized 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)."
    • addedOutput schema / properties / searchCriteria / properties / advancedFilter
      Added value: +{
      +  "description": "The exact AREA[] advancedFilter (age range, plus sex/healthy-volunteer when constrained) sent upstream. Pass as advancedFilter to clinicaltrials_search_studies to reproduce the demographic constraints.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / searchCriteria / properties / conditionQuery
      Added value: +{
      +  "description": "The exact queryCond string sent upstream (multi-word terms quoted, OR-joined). Pass as conditionQuery to clinicaltrials_search_studies to reproduce the full match set beyond the maxResults cap.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / searchCriteria / properties / location / description
      Previous value: -"Location searched."New value: +"The exact queryLocn string sent upstream (city/state/country joined). Pass as locationQuery to clinicaltrials_search_studies to reproduce the location filter beyond the maxResults cap."
    • addedOutput schema / properties / searchCriteria / properties / statusFilter
      Added value: +{
      +  "description": "The status filter applied ([\"RECRUITING\"] when recruitingOnly). Pass as statusFilter to clinicaltrials_search_studies. Absent when recruitingOnly is false.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  7. Changed1 schema field changed
    • changedInput schema / properties / conditions / description
      Previous value: -"Medical conditions or diagnoses. E.g., [\"Type 2 Diabetes\", \"Hypertension\"]. Plain words plus AND/OR/NOT. `[ ]` are reserved; `( )` group sub-expressions when matched; `,` acts as AND."New value: +"Medical 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."
  8. Changed1 schema field changed
    • changedInput schema / properties / conditions / description
      Previous value: -"Medical conditions or diagnoses. E.g., [\"Type 2 Diabetes\", \"Hypertension\"]. Plain words only — reserved chars `[ ] ( ) ,` inside an entry will fail."New value: +"Medical conditions or diagnoses. E.g., [\"Type 2 Diabetes\", \"Hypertension\"]. Plain words plus AND/OR/NOT. `[ ]` are reserved; `( )` group sub-expressions when matched; `,` acts as AND."
  9. Changed4 schema fields changed
    • changedOutput schema / properties / funnel / description
      Previous value: -"Match counts at each filter stage. Diagnoses where the funnel collapsed on sparse results — e.g., conditionMatched=298 but demographicsMatched=2 means age/sex/status are the constraint."New value: +"Match counts at each filter stage. Shows where the funnel collapsed — e.g., conditionMatched=298 but demographicsMatched=2 means age/sex/status are the constraint."
    • removedOutput schema / properties / noMatchHints
      Removed value: -{
      -  "description": "Hints when no studies match, with suggestions to broaden the search.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Recovery guidance when no studies matched — identifies which filter stage collapsed and suggests how to broaden. Absent when results are returned.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / searchCriteria / description
      Previous value: -"Search criteria used."New value: +"Normalized search criteria applied to this eligibility query."
  10. Changed2 schema fields changed
    • changedInput schema / properties / conditions / description
      Previous value: -"Medical conditions or diagnoses. E.g., [\"Type 2 Diabetes\", \"Hypertension\"]. Plain words only — brackets, parentheses, and commas inside an entry will trip the upstream Essie parser."New value: +"Medical conditions or diagnoses. E.g., [\"Type 2 Diabetes\", \"Hypertension\"]. Plain words only — reserved chars `[ ] ( ) ,` inside an entry will fail."
    • changedInput schema / properties / location / description
      Previous value: -"Patient location."New value: +"Patient 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."
  11. Changed1 schema field changed
    • changedInput schema / properties / conditions / description
      Previous value: -"Medical conditions or diagnoses. E.g., [\"Type 2 Diabetes\", \"Hypertension\"]."New value: +"Medical conditions or diagnoses. E.g., [\"Type 2 Diabetes\", \"Hypertension\"]. Plain words only — brackets, parentheses, and commas inside an entry will trip the upstream Essie parser."
  12. Changed2 schema fields changed
    • addedOutput schema / properties / funnel
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Match counts at each filter stage. Diagnoses where the funnel collapsed on sparse results — e.g., conditionMatched=298 but demographicsMatched=2 means age/sex/status are the constraint.",
      +  "properties": {
      +    "conditionMatched": {
      +      "description": "Studies matching the condition query alone (broadest stage).",
      +      "type": "number"
      +    },
      +    "demographicsMatched": {
      +      "description": "Studies matching the full filter set (condition + location + age/sex + status). Equal to totalCount.",
      +      "type": "number"
      +    },
      +    "locationMatched": {
      +      "description": "Studies matching condition + location — diagnoses geographic narrowing.",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "conditionMatched",
      +    "locationMatched",
      +    "demographicsMatched"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "studies",
      -  "searchCriteria"
      -]New value: +[
      +  "studies",
      +  "searchCriteria",
      +  "funnel"
      +]
  13. Changed2 schema fields changed
    • changedInput schema / properties / sex / description
      Previous value: -"Patient's biological sex. Use 'All' to include studies regardless of sex restrictions."New value: +"Patient's biological sex. Use 'ALL' to include studies regardless of sex restrictions."
    • changedInput schema / properties / sex / enum
      Previous value: -[
      -  "Female",
      -  "Male",
      -  "All"
      -]New value: +[
      +  "FEMALE",
      +  "MALE",
      +  "ALL"
      +]
  14. Changed1 schema field changed
    • changedInput schema / properties / sex / description
      Previous value: -"Biological sex."New value: +"Patient's biological sex. Use 'All' to include studies regardless of sex restrictions."
  15. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/openWorld/idempotent annotations, the description discloses non-obvious behavior: re-ranking from fuzzy condition search, truncation of sites to locationLimit, omission of non-matching sites, and the fallback addition of a recruiting site when no matched site is recruiting, including distanceMi handling.

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 purpose is front-loaded in the first sentence, and every subsequent sentence adds indispensable behavioral detail about re-ranking, site truncation, and the recruiting-site fallback. The description is long because the behavior is complex, not because of redundancy.

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?

For a complex 8-parameter tool, the description covers required inputs, edge cases (closed matched sites, missing coordinates), truncation semantics, and how to obtain complete data via a sibling tool. The output schema handles return-value details, so nothing essential is missing.

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 description coverage is 100%, so the schema already documents every parameter in detail. The main description adds no new per-parameter semantics beyond mentioning age, sex, conditions, and location; it largely restates behavior already encoded in the parameter descriptions rather than enriching them.

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.' It clearly differentiates from siblings by focusing on patient eligibility matching and explicitly delegates complete-record retrieval to clinicaltrials_get_study_record.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the required inputs ('Provide age, sex, conditions, and location') and the intended patient-matching use case. It also names an alternative for radius-based search in the location schema ('use clinicaltrials_search_studies with geoFilter') and points to clinicaltrials_get_study_record for full site lists, giving an agent clear routing guidance.

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.