Skip to main content
Glama
BACH-AI-Tools

Clinical Trials MCP Server

get_pediatric_studies

Find clinical trials for children and adolescents by specifying condition, age range, and recruitment status to identify relevant pediatric research studies.

Instructions

Find clinical trials specifically designed for children and adolescents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionNoPediatric condition or disease
ageRangeNoSpecific pediatric age range
recruitmentStatusNoFilter by recruitment status
pageSizeNoNumber of results to return (default 10, max 50)

Implementation Reference

  • The handleGetPediatricStudies function executes the logic for the get_pediatric_studies tool, querying the ClinicalTrials.gov API with age filters.
    async handleGetPediatricStudies(args) {
        const params = {
            format: "json",
            pageSize: args?.pageSize || 10,
            "filter.stdAge": "CHILD",
        };
        if (args?.condition) {
            params["query.cond"] = args.condition;
        }
        if (args?.ageRange) {
            switch (args.ageRange) {
                case "INFANT":
                    params["filter.minimumAge"] = "0 Years";
                    params["filter.maximumAge"] = "2 Years";
                    break;
                case "CHILD":
                    params["filter.minimumAge"] = "2 Years";
                    params["filter.maximumAge"] = "12 Years";
                    break;
                case "ADOLESCENT":
                    params["filter.minimumAge"] = "12 Years";
                    params["filter.maximumAge"] = "18 Years";
                    break;
            }
        }
        if (args?.recruitmentStatus) {
            params["filter.overallStatus"] = args.recruitmentStatus;
        }
        try {
            const response = await this.axiosInstance.get("/studies", { params });
            const studies = response.data.studies || [];
            const results = studies.map((study) => ({
                ...this.formatStudySummary(study),
                conditions: study.protocolSection.conditionsModule?.conditions || [],
                eligibility: {
                    sex: study.protocolSection.eligibilityModule?.sex || "Unknown",
                    minimumAge: study.protocolSection.eligibilityModule?.minimumAge ||
                        "Not specified",
                    maximumAge: study.protocolSection.eligibilityModule?.maximumAge ||
                        "Not specified",
                    healthyVolunteers: study.protocolSection.eligibilityModule?.healthyVolunteers || false,
                },
                locations: study.protocolSection.contactsLocationsModule?.locations?.slice(0, 2) || [],
            }));
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify({
                            searchCriteria: {
                                targetPopulation: "PEDIATRIC",
                                condition: args?.condition,
                                ageRange: args?.ageRange,
                                recruitmentStatus: args?.recruitmentStatus,
                            },
                            totalCount: response.data.totalCount || 0,
                            resultsShown: results.length,
                            studies: 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;
        }
    }
  • build/index.js:402-433 (registration)
    Registration of the get_pediatric_studies tool in the ListToolsRequestSchema handler.
        name: "get_pediatric_studies",
        description: "Find clinical trials specifically designed for children and adolescents",
        inputSchema: {
            type: "object",
            properties: {
                condition: {
                    type: "string",
                    description: "Pediatric condition or disease",
                },
                ageRange: {
                    type: "string",
                    description: "Specific pediatric age range",
                    enum: ["INFANT", "CHILD", "ADOLESCENT"],
                },
                recruitmentStatus: {
                    type: "string",
                    description: "Filter by recruitment status",
                    enum: [
                        "RECRUITING",
                        "NOT_YET_RECRUITING",
                        "ACTIVE_NOT_RECRUITING",
                    ],
                },
                pageSize: {
                    type: "number",
                    description: "Number of results to return (default 10, max 50)",
                    minimum: 1,
                    maximum: 50,
                },
            },
        },
    },
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 'Find clinical trials' but does not specify whether this is a read-only operation, what permissions are needed, if there are rate limits, or what the output format looks like. For a tool with no annotations, this leaves significant behavioral gaps.

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 a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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 of a search tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, usage guidelines, and output expectations, which are crucial for an AI agent to use the tool effectively in a context with many similar sibling tools.

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%, so the schema already documents all parameters thoroughly. The description does not add any additional meaning or context beyond what the schema provides, such as explaining how parameters interact or default behaviors. Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb 'Find' and the resource 'clinical trials specifically designed for children and adolescents', making the purpose evident. However, it does not explicitly differentiate from sibling tools like 'search_by_condition' or 'search_by_eligibility_criteria', which could also potentially filter for pediatric studies, so it lacks full sibling distinction.

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 for searching studies, there is no indication of prerequisites, exclusions, or specific contexts where this tool is preferred over others like 'search_by_condition' or 'search_by_eligibility_criteria'.

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