Tooluniverse clinical trial design

From mims-harvard/ToolUniverse · View interactive version

Tooluniverse clinical trial design is an AI agent skill from the GitHub repository mims-harvard/ToolUniverse. Strategic clinical trial design feasibility assessment. Analyzes 6 dimensions (endpoint, population, comparator, effect size, duration, regulatory pathway) using precedent trials and FDA guidance. Produces enrollment projections, endpoint recommendations, and approval-pathway analysis. Use for trial

How to use this skill

Skill file

Clinical Trial Design Feasibility Assessment

Systematically assess clinical trial feasibility by analyzing 6 research dimensions. Produces comprehensive feasibility reports with quantitative enrollment projections, endpoint recommendations, and regulatory pathway analysis.

IMPORTANT: Always use English terms in tool calls (drug names, disease names, biomarker names), even if the user writes in another language. Only try original-language terms as a fallback if English returns no results. Respond in the user's language.

Reasoning Before Searching

Trial design starts with the question, not the methods. Answer these four questions before running any tools — they determine everything else:

  1. What is the primary endpoint? Is it overall survival (gold standard but slow), PFS (faster but surrogate), ORR (single-arm friendly but not always accepted), or a biomarker (needs validation as surrogate first)? The endpoint determines FDA pathway, statistical design, and duration.
  2. Who is the population? Broad unselected vs. biomarker-enriched. Enriched populations have higher response rates, allowing smaller trials — but require a validated companion diagnostic and reduce the eligible patient pool.
  3. What is the comparator? Placebo (only if no standard of care exists), active control (requires non-inferiority or superiority framing), or single-arm with historical control (acceptable for rare diseases or breakthrough designations, but FDA scrutiny is high).
  4. Is the effect size realistic given the mechanism? A 20% improvement in ORR over SOC requires ~100 patients per arm. A 50% improvement requires ~30. If the mechanism only justifies a 10% improvement, the trial may be underpowered regardless of design. Check precedent effect sizes in similar trials before committing to an endpoint.

These four answers determine sample size, duration, and trial design. Look them up from precedent trials and FDA guidance — do not derive them from first principles.

LOOK UP DON'T GUESS: Never assume what the standard of care is for an indication — look it up with DrugBank and FDA tools. Never assume an endpoint is FDA-accepted — verify with search_clinical_trials precedents and OpenFDA_get_approval_history. Never estimate prevalence from memory — use OpenTargets, gnomAD, or COSMIC.

Core Principles

1. Report-First Approach (MANDATORY)

DO NOT show tool outputs to user. Instead:

  1. Create [INDICATION]_trial_feasibility_report.md FIRST
  2. Initialize with all section headers
  3. Progressively update as data arrives
  4. Present only the final report

2. Evidence Grading System

| Grade | Symbol | Criteria | Examples |

|-------|--------|----------|----------|

| A | 3-star | Regulatory acceptance, multiple precedents | FDA-approved endpoint in same indication |

| B | 2-star | Clinical validation, single precedent | Phase 3 trial in related indication |

| C | 1-star | Preclinical or exploratory | Phase 1 use, biomarker validation ongoing |

| D | 0-star | Proposed, no validation | Novel endpoint, no precedent |

3. Feasibility Score (0-100)

Weighted composite score:

Interpretation: >=75 HIGH (proceed), 50-74 MODERATE (additional validation), <50 LOW (de-risking required)


When to Use This Skill

Apply when users:

Trigger phrases: "clinical trial design", "trial feasibility", "enrollment projections", "endpoint selection", "trial planning", "Phase 1/2 design", "basket trial", "biomarker trial"


Core Strategy: 6 Research Paths

Execute 6 parallel research dimensions. See STUDY_DESIGN_PROCEDURES.md for detailed steps per path.

Trial Design Query
|
+-- PATH 1: Patient Population Sizing
|   Disease prevalence, biomarker prevalence, geographic distribution,
|   eligibility criteria impact, enrollment projections
|
+-- PATH 2: Biomarker Prevalence & Testing
|   Mutation frequency, testing availability, turnaround time,
|   cost/reimbursement, alternative biomarkers
|
+-- PATH 3: Comparator Selection
|   Standard of care, approved comparators, historical controls,
|   placebo appropriateness, combination therapy
|
+-- PATH 4: Endpoint Selection
|   Primary endpoint precedents, FDA acceptance history,
|   measurement feasibility, surrogate vs clinical endpoints
|
+-- PATH 5: Safety Endpoints & Monitoring
|   Mechanism-based toxicity, class effects, organ-specific monitoring,
|   DLT history, safety monitoring plan
|
+-- PATH 6: Regulatory Pathway
    Regulatory precedents (505(b)(1), 505(b)(2)), breakthrough therapy,
    orphan drug, fast track, FDA guidance

Report Structure (14 Sections)

Create [INDICATION]_trial_feasibility_report.md with all 14 sections. See REPORT_TEMPLATE.md for full templates with fillable fields.

  1. Executive Summary - Feasibility score, key findings, go/no-go recommendation
  2. Disease Background - Prevalence, incidence, SOC, unmet need
  3. Patient Population Analysis - Base population, biomarker selection, eligibility funnel, enrollment projections
  4. Biomarker Strategy - Primary biomarker, alternatives, testing logistics
  5. Endpoint Selection & Justification - Primary/secondary/exploratory endpoints, statistical considerations
  6. Comparator Analysis - SOC, trial design options (single-arm vs randomized vs non-inferiority), drug sourcing
  7. Safety Endpoints & Monitoring Plan - DLT definition, mechanism-based toxicities, organ monitoring, SMC
  8. Study Design Recommendations - Phase, design type, schema, eligibility, treatment plan, assessment schedule
  9. Enrollment & Site Strategy - Site selection, enrollment projections, recruitment strategies
  10. Regulatory Pathway - FDA pathway, precedents, pre-IND meeting, IND timeline
  11. Budget & Resource Considerations - Cost drivers, timeline, FTE requirements
  12. Risk Assessment - Feasibility risks, scientific risks, mitigation strategies
  13. Success Criteria & Go/No-Go Decision - Phase 1/2 criteria, interim analysis, feasibility scorecard
  14. Recommendations & Next Steps - Final recommendation, critical path to IND, alternative designs

Tool Reference by Research Path

PATH 1: Patient Population Sizing

PATH 2: Biomarker Prevalence & Testing

PATH 3: Comparator Selection

PATH 4: Endpoint Selection

PATH 5: Safety Endpoints & Monitoring

PATH 6: Regulatory Pathway


Quick Start Example

from tooluniverse import ToolUniverse

tu = ToolUniverse()
tu.load_tools()

# Example: EGFR+ NSCLC trial feasibility
# Step 1: Disease prevalence
disease_info = tu.tools.OpenTargets_get_disease_id_description_by_name(
    diseaseName="non-small cell lung cancer"
)
# Returns HPO phenotypes only, not prevalence figures; get prevalence from literature
prevalence = tu.tools.OpenTargets_get_associated_phenotypes_by_disease_efoId(
    efoId=disease_info['data']['search']['hits'][0]['id']
)

# Step 2: Biomarker prevalence
variants = tu.tools.ClinVar_search_variants(gene="EGFR", significance="pathogenic")

# Step 3: Precedent trials
trials = tu.tools.ClinicalTrials_search_studies(
    condition="EGFR positive non-small cell lung cancer",
    filter_status="COMPLETED", filter_phase="PHASE2"
)

# Step 4: Standard of care comparator
soc = tu.tools.FDA_OrangeBook_search_drug(generic_name="osimertinib")

# Compile into feasibility report...

See WORKFLOW_DETAILS.md for the complete 6-path Python workflow and use case examples.


Next Steps

Once this feasibility assessment is complete, use tooluniverse-clinical-trial-protocol to turn the 6-dimension findings (endpoint, population, comparator, effect size, duration, regulatory pathway) into an actual protocol document — full ICH E6(R2)/FDA-style sections plus a real sample-size calculation. That skill consumes this report's output rather than re-deriving feasibility.

Integration with Other Skills


Programmatic Access (Beyond Tools)

When ToolUniverse tools return limited trial metadata, use the ClinicalTrials.gov v2 API directly:

import requests, pandas as pd

# Search with pagination (all lung cancer immunotherapy trials with results)
all_studies = []
token = None
while True:
    params = {"query.cond": "lung cancer", "query.intr": "immunotherapy",
              "filter.overallStatus": "COMPLETED", "filter.results": "WITH_RESULTS", "pageSize": 100}
    if token: params["pageToken"] = token
    resp = requests.get("https://clinicaltrials.gov/api/v2/studies", params=params).json()
    all_studies.extend(resp.get("studies", []))
    token = resp.get("nextPageToken")
    if not token: break

# Extract structured data
rows = []
for s in all_studies:
    proto = s.get("protocolSection", {})
    rows.append({
        "nctId": proto.get("identificationModule", {}).get("nctId"),
        "title": proto.get("identificationModule", {}).get("briefTitle"),
        "enrollment": proto.get("designModule", {}).get("enrollmentInfo", {}).get("count"),
        "phase": proto.get("designModule", {}).get("phases", [None])[0] if proto.get("designModule", {}).get("phases") else None,
    })
df = pd.DataFrame(rows)

# FDA drug approval history
drug = "pembrolizumab"
fda = requests.get(f"https://api.fda.gov/drug/drugsfda.json?search=openfda.brand_name:{drug}&limit=10").json()

See tooluniverse-data-wrangling skill for pagination, error handling, and bulk download patterns.


Reference Files

| File | Content |

|------|---------|

| REPORT_TEMPLATE.md | Full 14-section report template with fillable fields |

| STUDY_DESIGN_PROCEDURES.md | Detailed steps for each of the 6 research paths |

| WORKFLOW_DETAILS.md | Complete Python example workflow and 5 use case summaries |

| BEST_PRACTICES.md | Best practices, common pitfalls, output format requirements |

| EXAMPLES.md | Additional examples |

| QUICK_START.md | Quick start guide |


Version Information

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.