Skip to main content
Glama
BACH-AI-Tools

Clinical Trials MCP Server

search_international_studies

Find multi-country clinical trials by filtering medical conditions, study phases, and specific countries to identify international research opportunities.

Instructions

Find multi-country international clinical trials

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionNoMedical condition to filter by
excludeCountryNoCountry to exclude from results (e.g., "United States")
includeCountryNoCountry that must be included in results
minCountriesNoMinimum number of countries involved
phaseNoStudy phase filter
pageSizeNoNumber of results to return (default 10, max 100)

Implementation Reference

  • The implementation of the `handleSearchInternationalStudies` tool handler, which queries the ClinicalTrials.gov API and filters results for international (multi-country) studies.
    private async handleSearchInternationalStudies(args: any) {
      const params: any = {
        format: "json",
        pageSize: args?.pageSize || 10,
      };
    
      if (args?.condition) {
        params["query.cond"] = args.condition;
      }
    
      if (args?.phase) {
        params["filter.phase"] = args.phase;
      }
    
      if (args?.includeCountry) {
        params["query.locn"] = args.includeCountry;
      }
    
      try {
        const response: AxiosResponse<StudySearchResponse> =
          await this.axiosInstance.get("/studies", { params });
    
        const studies = response.data.studies || [];
    
        // Filter for international studies
        let filteredStudies = studies.filter((study) => {
          const locations =
            study.protocolSection.contactsLocationsModule?.locations || [];
          const countries = new Set(locations.map((loc) => loc.country));
    
          // Check minimum countries requirement
          if (args?.minCountries && countries.size < args.minCountries) {
            return false;
          }
    
          // Check country exclusion
          if (args?.excludeCountry && countries.has(args.excludeCountry)) {
            return false;
          }
    
          // Only include studies with multiple countries (international)
          return countries.size >= 2;
        });
    
        const results = filteredStudies.map((study) => {
          const locations =
            study.protocolSection.contactsLocationsModule?.locations || [];
          const countries = [...new Set(locations.map((loc) => loc.country))];
    
          return {
            ...this.formatStudySummary(study),
            internationalDetails: {
              totalCountries: countries.length,
              countries: countries,
              totalLocations: locations.length,
              sampleLocations: locations.slice(0, 3),
            },
          };
        });
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  searchCriteria: {
                    condition: args?.condition,
                    excludeCountry: args?.excludeCountry,
                    includeCountry: args?.includeCountry,
                    minCountries: args?.minCountries,
                    phase: args?.phase,
                    note: "Only showing studies with 2+ countries",
                  },
                  totalCount: response.data.totalCount || 0,
                  resultsShown: results.length,
                  internationalStudies: results,
                },
                null,
                2
              ),
            },
          ],
        };
      } catch (error) {
        if (axios.isAxiosError(error)) {
          return {
            content: [
              {
                type: "text",
                text: `Clinical Trials API error: ${
                  error.response?.data?.message || error.message
                }`,
              },
            ],
            isError: true,
          };
        }
        throw error;
      }
    }
  • The tool definition and schema registration for `search_international_studies` within the `ListToolsRequestSchema` handler.
      name: "search_international_studies",
      description: "Find multi-country international clinical trials",
      inputSchema: {
        type: "object",
        properties: {
          condition: {
            type: "string",
            description: "Medical condition to filter by",
          },
          excludeCountry: {
            type: "string",
            description:
              'Country to exclude from results (e.g., "United States")',
          },
          includeCountry: {
            type: "string",
            description: "Country that must be included in results",
          },
          minCountries: {
            type: "number",
            description: "Minimum number of countries involved",
            minimum: 2,
            maximum: 50,
          },
          phase: {
            type: "string",
            description: "Study phase filter",
            enum: ["PHASE1", "PHASE2", "PHASE3", "PHASE4", "NA"],
          },
          pageSize: {
            type: "number",
            description:
              "Number of results to return (default 10, max 100)",
            minimum: 1,
            maximum: 100,
          },
        },
      },
    },
  • src/index.ts:768-771 (registration)
    The request handler registration connecting the "search_international_studies" tool call to its handler function.
    case "search_international_studies":
      return await this.handleSearchInternationalStudies(
        request.params.arguments
      );
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 only states the basic action ('Find') without detailing aspects like pagination behavior, rate limits, authentication needs, or what happens with partial inputs. For a search tool with no annotation coverage, this is a significant gap in transparency.

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 description is extremely concise—a single sentence with no wasted words. It's front-loaded and gets straight to the point, making it easy to parse quickly. This efficiency is appropriate for a tool with a clear primary function.

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

Completeness2/5

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

Given the complexity (6 parameters, no output schema, no annotations), the description is insufficient. It lacks details on behavioral traits, usage context, and output expectations. For a search tool with multiple filtering options and no structured output definition, more comprehensive guidance is needed to ensure effective use.

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 description does not add any parameter-specific information beyond what the input schema provides. Since schema description coverage is 100%, the baseline score is 3. The description mentions 'multi-country,' which aligns with parameters like 'minCountries,' but doesn't offer additional context or examples for parameter usage.

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: 'Find multi-country international clinical trials.' It specifies the verb ('Find') and resource ('multi-country international clinical trials'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'search_by_location' or 'search_studies,' which might also involve location-based filtering.

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. With many sibling tools available (e.g., 'search_by_location,' 'search_studies'), there's no indication of specific use cases, prerequisites, or exclusions. This lack of context could lead to confusion in tool selection.

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/BACH-AI-Tools/ClinicalTrials-MCP-Server'

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