Skip to main content
Glama
Aki894
by Aki894

search_clinical_trials

Find clinical trials by condition, intervention, location, or NCT ID to access study protocols, interventions, and outcomes data from ClinicalTrials.gov.

Instructions

Search clinical trials using ClinicalTrials.gov API v2. Returns study information including protocols, interventions, and outcomes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionNoMedical condition or disease. Example: 'lung cancer', 'diabetes'
interventionNoDrug or intervention name. Example: 'Vemurafenib', 'chemotherapy'
outcomeNoOutcome measure. Example: 'overall survival', 'adverse events'
sponsorNoStudy sponsor. Example: 'National Cancer Institute'
statusNoStudy status. Example: 'RECRUITING', 'COMPLETED'
locationNoStudy location. Example: 'New York', 'United States'
nct_idNoSpecific NCT ID. Example: 'NCT04267848'
pageSizeNoMaximum number of records to return (1-1000)
countTotalNoWhether to count total number of studies

Implementation Reference

  • The handler function that executes the search clinical trials logic by making an API request.
    private async searchClinicalTrials(params: ClinicalTrialSearchParams) {
      const data = await this.makeRequest(params);
      
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              totalCount: data.totalCount,
              nextPageToken: data.nextPageToken,
              studies_count: data.studies?.length || 0,
              studies: data.studies || []
            }, null, 2)
          }
        ]
      };
    }
  • src/index.ts:104-125 (registration)
    The tool registration block containing the definition and schema for search_clinical_trials.
    name: "search_clinical_trials",
    description: "Search clinical trials using ClinicalTrials.gov API v2. Returns study information including protocols, interventions, and outcomes.",
    inputSchema: {
      type: "object",
      properties: {
        condition: {
          type: "string",
          description: "Medical condition or disease. Example: 'lung cancer', 'diabetes'"
        },
        intervention: {
          type: "string",
          description: "Drug or intervention name. Example: 'Vemurafenib', 'chemotherapy'"
        },
        outcome: {
          type: "string",
          description: "Outcome measure. Example: 'overall survival', 'adverse events'"
        },
        sponsor: {
          type: "string",
          description: "Study sponsor. Example: 'National Cancer Institute'"
        },
        status: {
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the API version (v2) and that it 'returns study information including protocols, interventions, and outcomes,' but lacks details on rate limits, authentication needs, pagination behavior, error handling, or whether it's read-only or destructive. For a search tool with 9 parameters and no annotations, this is insufficient.

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 description is concise and front-loaded, consisting of two clear sentences that state the tool's purpose and what it returns. There's no wasted verbiage, though it could be slightly more structured (e.g., by explicitly listing key use cases).

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

Completeness3/5

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

Given the complexity (9 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and return scope but lacks behavioral details, usage context, and output format explanations. Without annotations or output schema, the agent must infer much from the schema alone, leaving gaps in understanding.

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?

The schema description coverage is 100%, meaning all parameters are well-documented in the schema itself. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain how parameters interact or provide search syntax). This meets the baseline for high schema coverage but doesn't enhance understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search clinical trials using ClinicalTrials.gov API v2.' It specifies the action (search) and resource (clinical trials), and mentions the data source (ClinicalTrials.gov API v2). However, it doesn't explicitly differentiate from sibling tools like 'get_study_details' or 'analyze_safety_profile', which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_study_details' (for specific studies) or 'analyze_safety_profile' (for safety analysis), nor does it specify prerequisites or exclusions. This leaves the agent without contextual usage instructions.

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/Aki894/mcp-ClinicalTrial'

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