Skip to content

ToolUniverse is a collection of biomedical tools designed for AI agents

License

Notifications You must be signed in to change notification settings

Cloverhound/ToolUniverse

 
 

Repository files navigation

ToolUniverse: Scientific Model Context Protocol

ProjectPage PaperLink TxAgent-PIP ToolUniverse-PIP TxAgent ToolUniverse HuggingFace Model context protocol (MCP)

ToolUniverse is a collection of biomedical tools designed for use by Agentic AI. It is a critical component of TxAgent, providing the agent with the ability to access and leverage a vast array of biomedical knowledge to solve complex therapeutic reasoning tasks. ToolUniverse includes 211 biomedical tools that address various aspects of drugs and diseases. These tools are linked to trusted sources, including all US FDA-approved drugs since 1939 and validated clinical insights from Open Targets and Monarch Initiative.

TxAgent

Install

Install from source

python -m pip install . --no-cache-dir

Install from Pypi

Pip page (https://pypi.org/project/tooluniverse)

pip install tooluniverse

Usage

ToolUniverse supports both a Python SDK and an MCP server interface.

  • You can use the Python SDK to interact with ToolUniverse programmatically in your Python projects.
  • You can connect to the ToolUniverse MCP server for remote tool execution and integration with other agentic systems.

For more detailed usage examples, see the README_USAGE page.

For MCP integration with Claude Desktop App, see the MCP for Claude Tutorial.

🚀 Consolidated API (NEW)

Token-Efficient Alternative: We now provide 4 consolidated tools that replace 215+ individual tools, reducing LLM token usage by 95% while maintaining full functionality.

Consolidated Tools

1. opentargets.query - OpenTargets Platform

from tooluniverse import ToolUniverse

tu = ToolUniverse()

# Single tool replaces 60+ OpenTargets tools
result = tu.run({
    'name': 'opentargets.query',
    'arguments': {
        'action': 'drug.moa',                    # Mechanism of action
        'resolve': {'drug': 'aspirin'},          # Auto-resolve drug name to ChEMBL ID
        # OR: 'ids': {'chembl': 'CHEMBL25'}     # Use explicit ChEMBL ID
    }
})

Available Actions: search.multi, drug.*, disease.*, target.*, similar.*, pgx.*

2. fda.spl - FDA Drug Labeling

# Single tool replaces 130+ FDA labeling tools
result = tu.run({
    'name': 'fda.spl',
    'arguments': {
        'section': 'adverse_reactions',          # Any FDA label section
        'drug': {'name': 'ibuprofen'},          # Multiple ID formats supported
        # OR: 'drug': {'ndc': '12345-678-90', 'application_number': 'ANDA123456'}
    }
})

Available Sections: indications, contraindications, adverse_reactions, dosage_and_administration, etc.

3. hpo.lookup - HPO Phenotype Operations

# Replaces HPO-related tools
result = tu.run({
    'name': 'hpo.lookup',
    'arguments': {
        'action': 'diseases_by_ids',
        'hpo_ids': ['HP:0000822', 'HP:0001645']  # Find diseases by phenotype IDs
    }
})

Available Actions: id_by_term, term_by_id, diseases_by_ids

4. registry.resolve - Cross-Platform ID Resolution

# Deterministic ID resolver across APIs
result = tu.run({
    'name': 'registry.resolve',
    'arguments': {
        'drug_name': 'metformin',               # Resolves to ChEMBL, NDC, etc.
        'chembl': 'CHEMBL1431'                 # Enriches with FDA data
    }
})

Benefits of Consolidated API

  • 95% Token Reduction: 4 tools vs 215+ individual tools
  • Built-in Resolution: Automatic name-to-ID conversion
  • Unified Parameters: Consistent interface across APIs
  • Backward Compatible: Original 215+ tools still work
  • Better Performance: Fewer tool selection decisions for LLMs

Migration Examples

# OLD: Specific tool per operation
old_call = {
    'name': 'OpenTargets_get_drug_mechanisms_of_action_by_chemblId',
    'arguments': {'chemblId': 'CHEMBL25'}
}

# NEW: Action-based consolidated tool
new_call = {
    'name': 'opentargets.query',
    'arguments': {
        'action': 'drug.moa',
        'ids': {'chembl': 'CHEMBL25'}
    }
}

# EVEN BETTER: Auto-resolve drug names
smart_call = {
    'name': 'opentargets.query',
    'arguments': {
        'action': 'drug.moa',
        'resolve': {'drug': 'aspirin'}  # No need to know ChEMBL ID
    }
}

Citation

@misc{gao2025txagent,
      title={TxAgent: An AI Agent for Therapeutic Reasoning Across a Universe of Tools}, 
      author={Shanghua Gao and Richard Zhu and Zhenglun Kong and Ayush Noori and Xiaorui Su and Curtis Ginder and Theodoros Tsiligkaridis and Marinka Zitnik},
      year={2025},
      eprint={2503.10970},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2503.10970}, 
}

Contact

If you have any questions or suggestions, please email Shanghua Gao and Marinka Zitnik.

Core contributors

Shanghua Gao; Richard Zhu; Zhenglun Kong; Sufian Aldogom

About

ToolUniverse is a collection of biomedical tools designed for AI agents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%