Skip to main content
Glama

disease_getter

Retrieve comprehensive disease details, including definitions, synonyms, ontology mappings, and associated phenotypes, directly from MyDisease.info via BioMCP. Ideal for precise biomedical research.

Instructions

Get detailed disease information from MyDisease.info.

⚠️ PREREQUISITE: Use the 'think' tool FIRST to understand your research goal!

Provides real-time disease annotations including:
- Official disease name and definition
- Disease synonyms and alternative names
- Ontology mappings (MONDO, DOID, OMIM, etc.)
- Associated phenotypes
- Links to disease databases

This tool fetches CURRENT disease information from MyDisease.info, ensuring
you always have the latest ontology mappings and definitions.

Example usage:
- Get the definition of GIST (Gastrointestinal Stromal Tumor)
- Look up synonyms for melanoma
- Find the MONDO ID for a disease by name

Note: For clinical trials about diseases, use trial_searcher. For articles about diseases, use article_searcher.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
disease_id_or_nameYesDisease name (e.g., 'melanoma', 'lung cancer') or ontology ID (e.g., 'MONDO:0016575', 'DOID:1909')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Primary MCP tool handler for 'disease_getter'. Registers the tool with @mcp_app.tool(), defines input schema via Annotated Field, and delegates execution to _disease_details helper.
    @mcp_app.tool()
    @track_performance("biomcp.disease_getter")
    async def disease_getter(
        disease_id_or_name: Annotated[
            str,
            Field(
                description="Disease name (e.g., 'melanoma', 'lung cancer') or ontology ID (e.g., 'MONDO:0016575', 'DOID:1909')"
            ),
        ],
    ) -> str:
        """Get detailed disease information from MyDisease.info.
    
        ⚠️ PREREQUISITE: Use the 'think' tool FIRST to understand your research goal!
    
        Provides real-time disease annotations including:
        - Official disease name and definition
        - Disease synonyms and alternative names
        - Ontology mappings (MONDO, DOID, OMIM, etc.)
        - Associated phenotypes
        - Links to disease databases
    
        This tool fetches CURRENT disease information from MyDisease.info, ensuring
        you always have the latest ontology mappings and definitions.
    
        Example usage:
        - Get the definition of GIST (Gastrointestinal Stromal Tumor)
        - Look up synonyms for melanoma
        - Find the MONDO ID for a disease by name
    
        Note: For clinical trials about diseases, use trial_searcher. For articles about diseases, use article_searcher.
        """
        return await _disease_details(
            call_benefit="Get up-to-date disease definitions and ontology information",
            disease_id_or_name=disease_id_or_name,
        )
  • Core handler function that performs the actual API query to MyDisease.info via BioThingsClient, formats the result with links and summaries, and returns markdown or JSON.
    async def get_disease(
        disease_id_or_name: str,
        output_json: bool = False,
    ) -> str:
        """
        Get disease information from MyDisease.info.
    
        Args:
            disease_id_or_name: Disease ID (MONDO, DOID) or name (e.g., "melanoma", "MONDO:0016575")
            output_json: Return as JSON instead of markdown
    
        Returns:
            Disease information as markdown or JSON string
        """
        client = BioThingsClient()
    
        try:
            disease_info = await client.get_disease_info(disease_id_or_name)
    
            if not disease_info:
                error_data = {
                    "error": f"Disease '{disease_id_or_name}' not found",
                    "suggestion": "Please check the disease name or ID (MONDO:, DOID:, OMIM:, MESH:)",
                }
                return (
                    json.dumps(error_data, indent=2)
                    if output_json
                    else to_markdown([error_data])
                )
    
            # Convert to dict for rendering
            result = disease_info.model_dump(exclude_none=True)
    
            # Add helpful links
            _add_disease_links(disease_info, result)
    
            # Format output for display
            _format_disease_output(disease_info, result)
    
            if output_json:
                return json.dumps(result, indent=2)
            else:
                return to_markdown([result])
    
        except Exception as e:
            logger.error(
                f"Error fetching disease info for {disease_id_or_name}: {e}"
            )
            error_data = {
                "error": "Failed to retrieve disease information",
                "details": str(e),
            }
            return (
                json.dumps(error_data, indent=2)
                if output_json
                else to_markdown([error_data])
            )
  • Intermediate helper function called by the MCP tool handler. Includes detailed tool description and calls the core get_disease function.
    async def _disease_details(
        call_benefit: Annotated[
            str,
            "Define and summarize why this function is being called and the intended benefit",
        ],
        disease_id_or_name: Annotated[
            str,
            Field(
                description="Disease name (e.g., melanoma, GIST) or ID (e.g., MONDO:0016575, DOID:1909)"
            ),
        ],
    ) -> str:
        """
        Retrieves detailed information for a disease from MyDisease.info.
    
        This tool provides real-time disease annotations including:
        - Official disease name and definition
        - Disease synonyms and alternative names
        - Ontology mappings (MONDO, DOID, OMIM, etc.)
        - Associated phenotypes
        - Links to disease databases
    
        Parameters:
        - call_benefit: Define why this function is being called
        - disease_id_or_name: Disease name or ontology ID
    
        Process: Queries MyDisease.info API for up-to-date disease information
        Output: Markdown formatted disease information with definition and metadata
    
        Note: For clinical trials about diseases, use trial_searcher. For articles about diseases, use article_searcher.
        """
        return await get_disease(disease_id_or_name, output_json=False)
  • Helper function that adds useful external links (MONDO Browser, Disease Ontology, PubMed) to the disease result dictionary.
    def _add_disease_links(disease_info, result: dict) -> None:
        """Add helpful links to disease result."""
        links = {}
    
        # Add MONDO browser link if available
        if (
            disease_info.mondo
            and isinstance(disease_info.mondo, dict)
            and (mondo_id := disease_info.mondo.get("mondo"))
            and isinstance(mondo_id, str)
            and mondo_id.startswith("MONDO:")
        ):
            links["MONDO Browser"] = (
                f"https://www.ebi.ac.uk/ols/ontologies/mondo/terms?iri=http://purl.obolibrary.org/obo/{mondo_id.replace(':', '_')}"
            )
    
        # Add Disease Ontology link if available
        if (
            disease_info.xrefs
            and isinstance(disease_info.xrefs, dict)
            and (doid := disease_info.xrefs.get("doid"))
        ):
            if isinstance(doid, list) and doid:
                doid_id = doid[0] if isinstance(doid[0], str) else str(doid[0])
                links["Disease Ontology"] = (
                    f"https://www.disease-ontology.org/?id={doid_id}"
                )
            elif isinstance(doid, str):
                links["Disease Ontology"] = (
                    f"https://www.disease-ontology.org/?id={doid}"
                )
    
        # Add PubMed search link
        if disease_info.name:
            links["PubMed Search"] = (
                f"https://pubmed.ncbi.nlm.nih.gov/?term={disease_info.name.replace(' ', '+')}"
            )
    
        if links:
            result["_links"] = links
  • Helper function that formats synonyms (truncated list) and associated phenotypes for clean display in the output.
    def _format_disease_output(disease_info, result: dict) -> None:
        """Format disease output for display."""
        # Format synonyms nicely
        if disease_info.synonyms:
            result["synonyms"] = ", ".join(
                disease_info.synonyms[:10]
            )  # Limit to first 10
            if len(disease_info.synonyms) > 10:
                result["synonyms"] += (
                    f" (and {len(disease_info.synonyms) - 10} more)"
                )
    
        # Format phenotypes if present
        if disease_info.phenotypes:
            # Just show count and first few phenotypes
            phenotype_names = []
            for pheno in disease_info.phenotypes[:5]:
                if isinstance(pheno, dict) and "phenotype" in pheno:
                    phenotype_names.append(pheno["phenotype"])
            if phenotype_names:
                result["associated_phenotypes"] = ", ".join(phenotype_names)
                if len(disease_info.phenotypes) > 5:
                    result["associated_phenotypes"] += (
                        f" (and {len(disease_info.phenotypes) - 5} more)"
                    )
            # Remove the raw phenotypes data for cleaner output
            result.pop("phenotypes", None)
Behavior4/5

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

With no annotations provided, the description carries full burden and does well: it discloses the tool provides 'real-time' and 'CURRENT' information, mentions it fetches from a specific source (MyDisease.info), and includes a warning about prerequisites. It doesn't mention rate limits, error behavior, or authentication needs, but covers key operational aspects.

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 appropriately sized and front-loaded: it starts with the core purpose, then lists what it provides, emphasizes currency, gives usage examples, and ends with sibling distinctions. Some redundancy exists ('real-time' and 'CURRENT' are similar), but overall it's well-structured with minimal waste.

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

Completeness5/5

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

Given the tool has an output schema (so return values don't need explanation), 100% schema coverage, and no annotations, the description provides excellent context: purpose, usage guidelines, behavioral traits, examples, and sibling distinctions. It's complete enough for an agent to use this tool effectively.

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 fully documents the single parameter. The description doesn't add any parameter-specific information beyond what's in the schema (which explains disease_id_or_name accepts names or IDs). Baseline 3 is appropriate when schema does the heavy lifting.

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: 'Get detailed disease information from MyDisease.info' with specific resources listed (disease name, synonyms, ontology mappings, phenotypes, database links). It distinguishes from siblings by specifying it's for disease information retrieval, not clinical trials (trial_searcher) or articles (article_searcher).

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: it includes a prerequisite ('Use the 'think' tool FIRST'), clear when-to-use examples (getting definitions, synonyms, IDs), and explicit alternatives for related tasks ('For clinical trials about diseases, use trial_searcher. For articles about diseases, use article_searcher').

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