Count clinical trials
count_trialsCount clinical trials matching filters, including registrationNumbers, supported trialState/trialStates values, and deviceFamily='pacemaker_or_icd' for recorded protocol-eligibility mentions. Returns { count: , sample: <top 5 representative trials for citation> }; a city count may also include non-citable locationResolution metadata with a server-derived fallbackState. State samples include matchedSites and device-family samples include bounded eligibilityEvidence. Eligibility criteria do not establish direct medical safety. Use for 'how many Phase X trials of compound Y?' / 'how many trials in country Z?' / single-bucket aggregate questions. State and device-family filters are intentionally unavailable in aggregate_trials.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "count_trials"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| phase | No | Trial phase as Roman numerals: "I", "II", "III", "IV", or "NA". Also accepts "Phase 1"/"Phase 2"/etc. and "1"/"2"/"3"/"4" — they are normalized internally. | |
| query | No | ||
| status | No | Trial status. Accepts schema strings ("Recruiting", "Completed", "Active not recruiting", etc.) AND common shortcuts like "active", "recruiting", "completed". | |
| topics | No | Topic slugs (e.g. "depressive-disorders", "post-traumatic-stress-disorder"). Common abbreviations like "PTSD", "TRD", "OCD" and short names like "depression", "anxiety" are auto-mapped. | |
| compounds | No | Compound slugs (e.g. "psilocybin", "mdma"). Street names ("shrooms", "ecstasy") and brand/program names ("COMP360", "MM-120") are auto-mapped. | |
| trialCity | No | City name (e.g. "Berlin", "London", "Boston"). Filter scans only trialSites within the matched country, so you must ALSO set trialCountry (or pass a city in the auto-pair list — Berlin→Germany, London→United Kingdom, etc.). Forgiving prefix match. | |
| designType | No | Trial design type. Use ["crossover"] for "crossover trials"; ["single-arm"] for uncontrolled trials. | |
| enrollsAge | No | Age in years that the trial would enroll (matches ageMinYears <= X AND (ageMaxYears IS UNDEFINED OR ageMaxYears >= X)). Use 16 for "trials enrolling adolescents", 70 for "trials enrolling elderly". | |
| generation | No | ||
| trialState | No | Single supported country-qualified state. "Colorado" and "CO" normalize to "us-co" and pin the search to United States trial sites. | |
| trialCities | No | Multiple city names or supported local regions. "Orange County" expands to Orange, Santa Ana, San Juan Capistrano, and Garden Grove. Country scope is inferred only when every entry maps to the same country; otherwise also pass trialCountry. | |
| trialStates | No | Multiple supported country-qualified states. State aliases are normalized and deduplicated. Do not combine with trialCity or trialCities. | |
| deviceFamily | No | Recorded trial eligibility mentions for the pacemaker/implantable-cardioverter-defibrillator family. This retrieves protocol criteria, not a medical-safety conclusion. | |
| isRandomized | No | ||
| maskingLevel | No | Blinding level. "none" = open-label, "double" = double-blind, etc. | |
| studyStartTo | No | Inclusive upper bound for studyStartDate (YYYY-MM-DD). | |
| trialCountry | No | Single country slug (e.g. "united-states", "germany"). ISO codes ("US", "UK", "DE") and common names ("USA", "Britain") are auto-mapped. For multi-country / regional questions use trialCountries instead. | |
| sexesEligible | No | Sexes eligible for study. "all" matches trials with no sex restriction. | |
| studyStartFrom | No | Inclusive lower bound for studyStartDate (YYYY-MM-DD). | |
| trialCountries | No | Multiple country slugs OR region names. Regions ("Scandinavia", "Nordics", "EU", "Europe", "North America", "Latin America", "Oceania", "Asia-Pacific") expand to their constituent countries automatically. Use this for "trials in Scandinavia", "European psilocybin trials", etc. | |
| controlStrategy | No | Control / comparator strategy. ["placebo"] for placebo-controlled, ["comparator"] for active-comparator, ["waitlist"] for waitlist control. | |
| researcherSlugs | No | Slugs of investigators / researchers attached to the trial (Person docs). | |
| resultsPublished | No | ||
| primarySponsorSlug | No | Stakeholder slug of the primary sponsor (e.g. compass-pathways, maps). | |
| registrationNumbers | No | Exact ClinicalTrials.gov IDs (for example NCT03537014). Case and whitespace after NCT are normalized. | |
| psychotherapyProvided | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |