Skip to main content
Glama

trial_getter

Retrieve complete clinical trial details by NCT ID, including protocol, locations, outcomes, and references. Part of BioMCP for structured access to biomedical data.

Instructions

Fetch comprehensive details for a specific clinical trial.

Retrieves all available information for a clinical trial by its NCT ID.
This includes protocol details, locations, outcomes, and references.

For specific sections only, use the specialized getter tools:
- trial_protocol_getter: Core protocol information
- trial_locations_getter: Site locations and contacts
- trial_outcomes_getter: Primary/secondary outcomes and results
- trial_references_getter: Publications and references

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nct_idYesNCT ID (e.g., 'NCT06524388')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Primary handler function for the 'trial_getter' MCP tool. Decorated with @mcp_app.tool() for registration. Defines input schema (nct_id parameter) and orchestrates calls to four helper functions to fetch comprehensive trial details from ClinicalTrials.gov.
    @mcp_app.tool()
    @track_performance("biomcp.trial_getter")
    async def trial_getter(
        nct_id: Annotated[
            str,
            Field(description="NCT ID (e.g., 'NCT06524388')"),
        ],
    ) -> str:
        """Fetch comprehensive details for a specific clinical trial.
    
        Retrieves all available information for a clinical trial by its NCT ID.
        This includes protocol details, locations, outcomes, and references.
    
        For specific sections only, use the specialized getter tools:
        - trial_protocol_getter: Core protocol information
        - trial_locations_getter: Site locations and contacts
        - trial_outcomes_getter: Primary/secondary outcomes and results
        - trial_references_getter: Publications and references
        """
        results = []
    
        # Get all sections
        protocol = await _trial_protocol(
            call_benefit="Fetch comprehensive trial details for analysis",
            nct_id=nct_id,
        )
        if protocol:
            results.append(protocol)
    
        locations = await _trial_locations(
            call_benefit="Fetch comprehensive trial details for analysis",
            nct_id=nct_id,
        )
        if locations:
            results.append(locations)
    
        outcomes = await _trial_outcomes(
            call_benefit="Fetch comprehensive trial details for analysis",
            nct_id=nct_id,
        )
        if outcomes:
            results.append(outcomes)
    
        references = await _trial_references(
            call_benefit="Fetch comprehensive trial details for analysis",
            nct_id=nct_id,
        )
        if references:
            results.append(references)
    
        return (
            "\n\n".join(results)
            if results
            else f"No data found for trial {nct_id}"
        )
  • Helper function _trial_protocol called by trial_getter to fetch core protocol details (identification, status, design, eligibility, etc.) using get_trial with Module.PROTOCOL.
    async def _trial_protocol(
        call_benefit: Annotated[
            str,
            "Define and summarize why this function is being called and the intended benefit",
        ],
        nct_id: str,
    ):
        """
        Retrieves core protocol information for a single clinical
        trial identified by its NCT ID.
    
        Parameters:
        - call_benefit: Define and summarize why this function is being called and the intended benefit
        - nct_id: A single NCT ID (string, e.g., "NCT04280705")
    
        Process: Fetches standard "Protocol" view modules (like ID,
                 Status, Sponsor, Design, Eligibility) from the
                 ClinicalTrials.gov v2 API.
        Output: A Markdown formatted string detailing title, status,
                sponsor, purpose, study design, phase, interventions,
                eligibility criteria, etc. Returns error if invalid.
        """
        return await get_trial(nct_id, Module.PROTOCOL)
  • Helper function _trial_locations called by trial_getter to fetch trial site locations and contacts using get_trial with Module.LOCATIONS.
    async def _trial_locations(
        call_benefit: Annotated[
            str,
            "Define and summarize why this function is being called and the intended benefit",
        ],
        nct_id: str,
    ) -> str:
        """
        Retrieves contact and location details for a single
        clinical trial identified by its NCT ID.
    
        Parameters:
        - call_benefit: Define and summarize why this function is being called and the intended benefit
        - nct_id: A single NCT ID (string, e.g., "NCT04280705")
    
        Process: Fetches the `ContactsLocationsModule` from the
                 ClinicalTrials.gov v2 API for the given NCT ID.
        Output: A Markdown formatted string detailing facility names,
                addresses (city, state, country), and contact info.
                Returns an error message if the NCT ID is invalid.
        """
        return await get_trial(nct_id, Module.LOCATIONS)
  • Helper function _trial_outcomes called by trial_getter to fetch outcome measures and results using get_trial with Module.OUTCOMES.
    async def _trial_outcomes(
        call_benefit: Annotated[
            str,
            "Define and summarize why this function is being called and the intended benefit",
        ],
        nct_id: str,
    ) -> str:
        """
        Retrieves outcome measures, results (if available), and
        adverse event data for a single clinical trial.
    
        Parameters:
        - call_benefit: Define and summarize why this function is being called and the intended benefit
        - nct_id: A single NCT ID (string, e.g., "NCT04280705")
    
        Process: Fetches the `OutcomesModule` and `ResultsSection`
                 from the ClinicalTrials.gov v2 API for the NCT ID.
        Output: A Markdown formatted string detailing primary/secondary
                outcomes, participant flow, results tables (if posted),
                and adverse event summaries. Returns an error if invalid.
        """
        return await get_trial(nct_id, Module.OUTCOMES)
  • Helper function _trial_references called by trial_getter to fetch publications and references using get_trial with Module.REFERENCES.
    async def _trial_references(
        call_benefit: Annotated[
            str,
            "Define and summarize why this function is being called and the intended benefit",
        ],
        nct_id: str,
    ):
        """
        Retrieves publications and other references associated with
        a single clinical trial identified by its NCT ID.
    
        Parameters:
        - call_benefit: Define and summarize why this function is being called and the intended benefit
        - nct_id: A single NCT ID (string, e.g., "NCT04280705")
    
        Process: Fetches the `ReferencesModule` from the
                 ClinicalTrials.gov v2 API for the NCT ID.
        Output: A Markdown formatted string listing citations,
                associated PubMed IDs (PMIDs), and reference types
                (e.g., result publication). Returns error if invalid.
        """
        return await get_trial(nct_id, Module.REFERENCES)
Behavior3/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. It discloses that the tool 'retrieves' information (implying read-only behavior) and specifies what information is included (protocol details, locations, outcomes, references). However, it doesn't mention potential limitations like rate limits, authentication requirements, or error conditions. The description doesn't contradict any annotations.

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 well-structured and appropriately sized. The first sentence states the core purpose, the second elaborates on scope, and the remaining sentences provide clear usage guidelines. Every sentence adds value with zero wasted words, and the information is front-loaded effectively.

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

Completeness4/5

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

Given the tool has a single parameter with 100% schema coverage and an output schema exists, the description provides good contextual completeness. It clearly explains the tool's purpose, scope, and relationship to alternatives. The main gap is lack of behavioral details like rate limits or error handling, but the output schema reduces the need to describe return values.

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?

Schema description coverage is 100%, so the schema already documents the single parameter (nct_id) with its description and example. The description adds minimal value beyond the schema by mentioning 'NCT ID' in context, but doesn't provide additional syntax or format details. With high schema coverage, baseline 3 is appropriate.

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

Purpose5/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 with specific verbs ('fetch comprehensive details', 'retrieves all available information') and identifies the resource ('clinical trial by its NCT ID'). It distinguishes itself from sibling tools by emphasizing it provides 'comprehensive details' versus specialized getters for specific sections.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool versus alternatives. It states this tool is for 'comprehensive details' and lists four specialized getter tools for 'specific sections only', naming each alternative (trial_protocol_getter, trial_locations_getter, trial_outcomes_getter, trial_references_getter).

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

Related 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/genomoncology/biomcp'

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