tooluniverse package

class tooluniverse.ToolUniverse[source]

Bases: object

A comprehensive tool management system for loading, organizing, and executing various scientific and data tools.

The ToolUniverse class provides a centralized interface for managing different types of tools including GraphQL tools, RESTful APIs, MCP clients, and specialized scientific tools. It handles tool loading, filtering, caching, and execution.

all_tools

List of all loaded tool configurations

Type:

list

all_tool_dict

Dictionary mapping tool names to their configurations

Type:

dict

tool_category_dicts

Dictionary organizing tools by category

Type:

dict

tool_files

Dictionary mapping category names to their JSON file paths

Type:

dict

callable_functions

Cache of instantiated tool objects

Type:

dict

MAX_TOOL_NAME_LENGTH = 45
__init__(tool_files={'ChEMBL': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/chembl_tools.json', 'EFO': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/efo_tools.json', 'Enrichr': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/enrichr_tools.json', 'EuropePMC': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/europe_pmc_tools.json', 'HumanBase': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/humanbase_tools.json', 'OpenAlex': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/openalex_tools.json', 'ada_aha_nccn': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ada_aha_nccn_tools.json', 'admetai': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/admetai_tools.json', 'adverse_event': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/adverse_event_tools.json', 'agents': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/agentic_tools.json', 'allen_brain': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/allen_brain_tools.json', 'alliance_genome': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/alliance_genome_tools.json', 'alphafold': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/alphafold_tools.json', 'alphamissense': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/alphamissense_tools.json', 'anaconda': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/anaconda_tools.json', 'arrayexpress': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/arrayexpress_tools.json', 'artic': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/artic_tools.json', 'arxiv': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/arxiv_tools.json', 'bgee': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/bgee_tools.json', 'bigg_models': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/bigg_models_tools.json', 'bindingdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/bindingdb_tools.json', 'bioconductor': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/bioconductor_tools.json', 'biogrid': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/biogrid_tools.json', 'bioimage_archive': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/bioimage_archive_tools.json', 'biomodels_tools': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/biomodels_tools.json', 'bioportal': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/bioportal_tools.json', 'biorxiv': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/biorxiv_tools.json', 'biorxiv_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/biorxiv_ext_tools.json', 'biosamples': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/biosamples_tools.json', 'biostudies': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/biostudies_tools.json', 'biothings': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/biothings_tools.json', 'biotools_registry': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/biotools_registry_tools.json', 'blast': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/blast_tools.json', 'bmrb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/bmrb_tools.json', 'brenda': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/brenda_tools.json', 'bvbrc': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/bvbrc_tools.json', 'cadd': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cadd_tools.json', 'cath': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cath_tools.json', 'cbioportal': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cbioportal_tools.json', 'cdc': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cdc_tools.json', 'ceda': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ceda_tools.json', 'cellosaurus': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cellosaurus_tools.json', 'cellpainting': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cellpainting_tools.json', 'cellxgene_census': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cellxgene_census_tools.json', 'cellxgene_discovery': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cellxgene_discovery_tools.json', 'channelsdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/channelsdb_tools.json', 'chebi': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/chebi_tools.json', 'chem_compute': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/chem_compute_tools.json', 'chipatlas': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/chipatlas_tools.json', 'civic': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/civic_tools.json', 'clingen': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/clingen_tools.json', 'clingen_ar': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/clingen_ar_tools.json', 'clingen_dosage': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/clingen_dosage_api_tools.json', 'clinical_guidelines': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/clinical_guidelines_tools.json', 'clinical_trials': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/clinicaltrials_gov_tools.json', 'clinvar': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/clinvar_tools.json', 'clue': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/clue_tools.json', 'cod_crystal': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cod_crystal_tools.json', 'col': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/col_tools.json', 'compact_mode': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/compact_mode_tools.json', 'complex_portal': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/complex_portal_tools.json', 'compose': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/compose_tools.json', 'core': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/core_tools.json', 'cosmic': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cosmic_tools.json', 'cpic': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cpic_tools.json', 'cran': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/cran_tools.json', 'crossref': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/crossref_tools.json', 'ctd': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ctd_tools.json', 'dailymed': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dailymed_tools.json', 'datacite': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/datacite_tools.json', 'dataone': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dataone_tools.json', 'dataset': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dataset_tools.json', 'dataverse': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dataverse_tools.json', 'dbfetch': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dbfetch_tools.json', 'dblp': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dblp_tools.json', 'dbpedia': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dbpedia_tools.json', 'dbsnp': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dbsnp_tools.json', 'deepgo': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/deepgo_tools.json', 'depmap': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/depmap_tools.json', 'dfam': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dfam_tools.json', 'dgidb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dgidb_tools.json', 'disease_ontology': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/disease_ontology_tools.json', 'disease_sh_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/disease_sh_ext_tools.json', 'disease_target_score': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/disease_target_score_tools.json', 'diseasesh': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/diseasesh_tools.json', 'disgenet': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/disgenet_tools.json', 'disprot': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/disprot_tools.json', 'dna_tools': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dna_tools.json', 'doaj': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/doaj_tools.json', 'dose_response': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dose_response_tools.json', 'drug_discovery_agents': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/drug_discovery_agents.json', 'drug_synergy': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/drug_synergy_tools.json', 'dryad': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/dryad_tools.json', 'ebi_proteins_coordinates': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ebi_proteins_coordinates_tools.json', 'ebi_proteins_epitope': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ebi_proteins_epitope_tools.json', 'ebi_proteins_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ebi_proteins_ext_tools.json', 'ebi_proteins_features': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ebi_proteins_features_tools.json', 'ebi_proteins_interactions': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ebi_proteins_interactions_tools.json', 'ebi_search': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ebi_search_tools.json', 'ebi_taxonomy': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ebi_taxonomy_tools.json', 'ebird_taxonomy': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ebird_taxonomy_tools.json', 'elixir_tess': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/elixir_tess_tools.json', 'embedding': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/embedding_tools.json', 'emdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/emdb_tools.json', 'emolecules': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/emolecules_tools.json', 'ena_browser': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ena_browser_tools.json', 'ena_portal': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ena_portal_tools.json', 'enamine': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/enamine_tools.json', 'encode': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/encode_tools.json', 'ensembl': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_tools.json', 'ensembl_archive': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_archive_tools.json', 'ensembl_compara': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_compara_tools.json', 'ensembl_info': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_info_tools.json', 'ensembl_ld': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_ld_tools.json', 'ensembl_map': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_map_tools.json', 'ensembl_overlap': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_overlap_tools.json', 'ensembl_phenotype': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_phenotype_tools.json', 'ensembl_regulation': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_regulation_tools.json', 'ensembl_sequence': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_sequence_tools.json', 'ensembl_variation_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_variation_ext_tools.json', 'ensembl_vep': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_vep_tools.json', 'ensembl_xrefs': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ensembl_xrefs_tools.json', 'eol': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/eol_tools.json', 'epigenomics': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/epigenomics_tools.json', 'epigraphdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/epigraphdb_tools.json', 'eqtl': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/eqtl_tools.json', 'erddap': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/erddap_tools.json', 'euhealth': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/euhealth_tools.json', 'europepmc_annotations': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/europepmc_annotations_tools.json', 'europepmc_citations': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/europepmc_citations_tools.json', 'eurostat': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/eurostat_tools.json', 'eva': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/eva_tools.json', 'eve': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/eve_tools.json', 'expression_atlas': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/expression_atlas_tools.json', 'faers_analytics': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/faers_analytics_tools.json', 'fatcat': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/fatcat_tools.json', 'fda_drug_adverse_event': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/fda_drug_adverse_event_tools.json', 'fda_drug_adverse_event_detail': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/fda_drug_adverse_event_detail_tools.json', 'fda_drug_label': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/fda_drug_labeling_tools.json', 'fda_orange_book': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/fda_orange_book_tools.json', 'fda_pharmacogenomic_biomarkers': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/fda_pharmacogenomic_biomarkers_tools.json', 'figshare': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/figshare_tools.json', 'file_download': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/file_download_tools.json', 'flybase': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/flybase_tools.json', 'flymine': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/flymine_tools.json', 'fooddata_central': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/fooddata_central_tools.json', 'fourdn': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/fourdn_tools.json', 'fpbase': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/fpbase_tools.json', 'gbif': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gbif_tools.json', 'gbif_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gbif_ext_tools.json', 'gdc': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gdc_tools.json', 'gene2phenotype': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gene2phenotype_tools.json', 'genenetwork': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/genenetwork_tools.json', 'genenetwork_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/genenetwork_ext_tools.json', 'genome_nexus': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/genome_nexus_tools.json', 'geo': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/geo_tools.json', 'github': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/github_tools.json', 'glygen': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/glygen_tools.json', 'gnomad': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gnomad_tools.json', 'gnps': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gnps_tools.json', 'go': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gene_ontology_tools.json', 'go_api': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/go_api_tools.json', 'gpcrdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gpcrdb_tools.json', 'gprofiler': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gprofiler_tools.json', 'gtex': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gtex_tools.json', 'gtex_v2': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gtex_v2_tools.json', 'gtopdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gtopdb_tools.json', 'guidelines': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/unified_guideline_tools.json', 'gwas': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gwas_tools.json', 'gxa': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/gxa_tools.json', 'hal': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/hal_tools.json', 'harmonizome': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/harmonizome_tools.json', 'hca_tools': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/hca_tools.json', 'health_disparities': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/health_disparities_tools.json', 'hgnc': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/hgnc_tools.json', 'hmdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/hmdb_tools.json', 'hpa': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/hpa_tools.json', 'hpo': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/hpo_tools.json', 'huggingface': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/huggingface_tools.json', 'humanmine': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/humanmine_tools.json', 'icd': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/icd_tools.json', 'icite': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/icite_tools.json', 'identifiers_org': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/identifiers_org_tools.json', 'idigbio': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/idigbio_tools.json', 'idmap': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/idmap_tools.json', 'idr': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/idr_tools.json', 'iedb_tools': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/iedb_tools.json', 'imgt': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/imgt_tools.json', 'impc': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/impc_tools.json', 'inaturalist': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/inaturalist_tools.json', 'inspirehep': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/inspirehep_tools.json', 'intact': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/intact_tools.json', 'interpro': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/interpro_tools.json', 'interpro_domain_arch': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/interpro_domain_arch_tools.json', 'interpro_entry': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/interpro_entry_tools.json', 'interpro_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/interpro_ext_tools.json', 'interproscan': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/interproscan_tools.json', 'itis': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/itis_tools.json', 'jaspar': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/jaspar_tools.json', 'jpl_horizons': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/jpl_horizons_tools.json', 'kegg': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/kegg_tools.json', 'kegg_brite': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/kegg_brite_tools.json', 'kegg_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/kegg_ext_tools.json', 'klifs': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/klifs_tools.json', 'l1000fwd': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/l1000fwd_tools.json', 'lipidmaps': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/lipidmaps_tools.json', 'literature_search': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/literature_search_tools.json', 'litvar': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/litvar_tools.json', 'lncrna': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/lncrna_tools.json', 'loinc': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/loinc_tools.json', 'lotus': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/lotus_tools.json', 'marine_regions': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/marine_regions_tools.json', 'markitdown': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/markitdown_tools.json', 'massbank': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/massbank_tools.json', 'mcp_auto_loader_boltz': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/boltz_mcp_loader_tools.json', 'mcp_auto_loader_esm': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/mcp_auto_loader_esm.json', 'mcp_auto_loader_expert_feedback': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/expert_feedback_tools.json', 'mcp_auto_loader_txagent': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/txagent_client_tools.json', 'mcp_auto_loader_uspto_downloader': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uspto_downloader_tools.json', 'medlineplus': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/medlineplus_tools.json', 'medrxiv': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/medrxiv_tools.json', 'mesh': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/mesh_tools.json', 'metabolights': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/metabolights_tools.json', 'metabolomics_workbench': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/metabolomics_workbench_tools.json', 'metacyc': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/metacyc_tools.json', 'metnorway': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/metnorway_tools.json', 'mgnify': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/mgnify_tools.json', 'mgnify_expanded': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/mgnify_expanded_tools.json', 'mibig': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/mibig_tools.json', 'mirna': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/mirna_tools.json', 'mobidb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/mobidb_tools.json', 'modeldb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/modeldb_tools.json', 'monarch': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/monarch_tools.json', 'monarch_v3': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/monarch_v3_tools.json', 'mousemine': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/mousemine_tools.json', 'mpd': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/mpd_tools.json', 'msigdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/msigdb_tools.json', 'mydisease': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/mydisease_tools.json', 'nasa_cmr': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nasa_cmr_tools.json', 'nasa_donki': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nasa_donki_tools.json', 'nasa_eonet': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nasa_eonet_tools.json', 'nasa_exoplanet': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nasa_exoplanet_tools.json', 'nasa_ned': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nasa_ned_tools.json', 'nasa_neows': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nasa_neows_tools.json', 'nasa_sbdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nasa_sbdb_tools.json', 'ncbi_datasets': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ncbi_datasets_tools.json', 'ncbi_gene': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ncbi_gene_tools.json', 'ncbi_nucleotide': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ncbi_nucleotide_tools.json', 'ncbi_sra': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ncbi_sra_tools.json', 'nci_drugdict': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nci_drugdict_tools.json', 'nci_thesaurus': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nci_thesaurus_tools.json', 'ndex': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ndex_tools.json', 'neuromorpho': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/neuromorpho_tools.json', 'neurovault': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/neurovault_tools.json', 'nextstrain': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nextstrain_tools.json', 'nhanes': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nhanes_tools.json', 'nominatim': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nominatim_tools.json', 'nvidia_nim': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nvidia_nim_tools.json', 'nws': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/nws_tools.json', 'obis': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/obis_tools.json', 'odphp': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/odphp_tools.json', 'ols': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ols_tools.json', 'oma': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/oma_tools.json', 'omicsdi': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/omicsdi_tools.json', 'omim': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/omim_tools.json', 'omnipath': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/omnipath_tools.json', 'oncokb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/oncokb_tools.json', 'open_meteo': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/open_meteo_tools.json', 'open_meteo_airquality': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/open_meteo_airquality_tools.json', 'open_meteo_climate': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/open_meteo_climate_tools.json', 'open_meteo_flood': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/open_meteo_flood_tools.json', 'open_meteo_marine': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/open_meteo_marine_tools.json', 'openaire': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/openaire_tools.json', 'opencitations': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/opencitations_tools.json', 'openfda': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/openfda_tools.json', 'openfda_labels': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/openfda_label_tools.json', 'openfoodfacts': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/openfoodfacts_tools.json', 'openml': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/openml_tools.json', 'openneuro': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/openneuro_tools.json', 'opentarget': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/opentarget_tools.json', 'opentarget_genetics': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/opentarget_genetics_tools.json', 'opentopodata': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/opentopodata_tools.json', 'opentree': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/opentree_tools.json', 'optimizer': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/optimizer_tools.json', 'orcid': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/orcid_tools.json', 'orphanet': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/orphanet_tools.json', 'orthodb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/orthodb_tools.json', 'osdr': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/osdr_tools.json', 'osf_preprints': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/osf_preprints_tools.json', 'output_summarization': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/output_summarization_tools.json', 'oxo': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/oxo_tools.json', 'package_discovery_tools': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/package_discovery_tools.json', 'paleobiology': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/paleobiology_tools.json', 'panelapp': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/panelapp_tools.json', 'panther': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/panther_tools.json', 'pathway_commons_tools': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pathway_commons_tools.json', 'pdb_redo': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pdb_redo_tools.json', 'pdbe_api': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pdbe_api_tools.json', 'pdbe_compound': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pdbe_compound_tools.json', 'pdbe_graph': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pdbe_graph_tools.json', 'pdbe_kb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pdbe_kb_tools.json', 'pdbe_ligands': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pdbe_ligands_tools.json', 'pdbe_search': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pdbe_search_tools.json', 'pdbe_sifts': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pdbe_sifts_tools.json', 'pdbe_validation': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pdbe_validation_tools.json', 'pfam': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pfam_tools.json', 'pharmgkb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pharmgkb_tools.json', 'pharmvar': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pharmvar_tools.json', 'pharos': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pharos_tools.json', 'plant_reactome': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/plant_reactome_tools.json', 'pmc': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pmc_tools.json', 'pombase': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pombase_tools.json', 'powo': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/powo_tools.json', 'ppi': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ppi_tools.json', 'pride': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pride_tools.json', 'protacdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/protacdb_tools.json', 'proteins_api': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/proteins_api_tools.json', 'proteinsplus': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/proteinsplus_tools.json', 'proteomexchange': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/proteomexchange_tools.json', 'pubchem': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pubchem_tools.json', 'pubchem_bioassay': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pubchem_bioassay_tools.json', 'pubchem_tox': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pubchem_tox_tools.json', 'pubmed': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pubmed_tools.json', 'pubtator': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pubtator_tools.json', 'pubtator3_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pubtator3_ext_tools.json', 'pypi_package_inspector_tools': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/pypi_package_inspector_tools.json', 'python_executor': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/python_executor_tools.json', 'quickgo': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/quickgo_tools.json', 'rcsb_advanced_search': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/rcsb_advanced_search_tools.json', 'rcsb_chemcomp': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/rcsb_chemcomp_tools.json', 'rcsb_data': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/rcsb_data_tools.json', 'rcsb_graphql': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/rcsb_graphql_tools.json', 'rcsb_pdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/rcsb_pdb_tools.json', 'rcsb_search': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/rcsb_search_tools.json', 'reactome': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/reactome_tools.json', 'reactome_analysis': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/reactome_analysis_tools.json', 'reactome_content': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/reactome_content_tools.json', 'reactome_interactors': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/reactome_interactors_tools.json', 'regulomedb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/regulomedb_tools.json', 'remap': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/remap_tools.json', 'rfam': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/rfam_tools.json', 'rhea': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/rhea_tools.json', 'rnacentral': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/rnacentral_tools.json', 'ror': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ror_tools.json', 'rxnorm': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/rxnorm_tools.json', 'sabdab': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/sabdab_tools.json', 'sasbdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/sasbdb_tools.json', 'scanprosite': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/scanprosite_tools.json', 'scite': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/scite_tools.json', 'screen': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/screen_tools.json', 'sdss': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/sdss_tools.json', 'semantic_scholar': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/semantic_scholar_tools.json', 'semantic_scholar_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/semantic_scholar_ext_tools.json', 'sgd': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/sgd_tools.json', 'simbad': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/simbad_tools.json', 'smolagents': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/smolagent_tools.json', 'software_bioinformatics': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/bioinformatics_core_tools.json', 'software_cheminformatics': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/cheminformatics_tools.json', 'software_earth_sciences': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/earth_sciences_tools.json', 'software_genomics': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/genomics_tools.json', 'software_image_processing': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/image_processing_tools.json', 'software_machine_learning': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/machine_learning_tools.json', 'software_neuroscience': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/neuroscience_tools.json', 'software_physics_astronomy': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/physics_astronomy_tools.json', 'software_scientific_computing': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/scientific_computing_tools.json', 'software_single_cell': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/single_cell_tools.json', 'software_structural_biology': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/structural_biology_tools.json', 'software_visualization': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/packages/visualization_tools.json', 'soilgrids': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/soilgrids_tools.json', 'special_tools': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/special_tools.json', 'spliceai': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/spliceai_tools.json', 'stitch': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/stitch_tools.json', 'string_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/string_ext_tools.json', 'string_network': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/string_network_tools.json', 'sunrise_sunset': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/sunrise_sunset_tools.json', 'survival': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/survival_tools.json', 'swissdock': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/swissdock_tools.json', 'swissmodel': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/swissmodel_tools.json', 'synbiohub': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/synbiohub_tools.json', 'targetmine': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/targetmine_tools.json', 'tcia': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/tcia_tools.json', 'therasabdab': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/therasabdab_tools.json', 'three_d_beacons': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/three_d_beacons_tools.json', 'timer': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/timer_tools.json', 'tool_composition': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/tool_composition_tools.json', 'tool_discovery_agents': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/tool_discovery_agents.json', 'tool_finder': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/finder_tools.json', 'ucsc_genome': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/ucsc_genome_tools.json', 'umls': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/umls_tools.json', 'unichem': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/unichem_tools.json', 'uniparc': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uniparc_tools.json', 'uniprot': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uniprot_tools.json', 'uniprot_idmapping': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uniprot_idmapping_tools.json', 'uniprot_locations': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uniprot_locations_tools.json', 'uniprot_proteomes': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uniprot_proteomes_tools.json', 'uniprot_ref': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uniprot_ref_tools.json', 'uniprot_taxonomy': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uniprot_taxonomy_tools.json', 'uniref': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uniref_tools.json', 'unpaywall': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/unpaywall_tools.json', 'url': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/url_fetch_tools.json', 'uscensus': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uscensus_tools.json', 'usgs_earthquake': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/usgs_earthquake_tools.json', 'usgs_water': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/usgs_water_tools.json', 'uspto': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/uspto_tools.json', 'variant_validator': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/variant_validator_tools.json', 'veupathdb': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/veupathdb_tools.json', 'visualization_molecule_2d': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/molecule_2d_tools.json', 'visualization_molecule_3d': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/molecule_3d_tools.json', 'visualization_protein_3d': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/protein_structure_3d_tools.json', 'waqi': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/waqi_tools.json', 'web_search_tools': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/web_search_tools.json', 'wfgy_promptbundle': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/wfgy_promptbundle_tools.json', 'who_gho': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/who_gho_tools.json', 'wikidata_entity': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/wikidata_entity_tools.json', 'wikidata_sparql': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/wikidata_sparql_tools.json', 'wikipathways': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/wikipathways_tools.json', 'wikipathways_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/wikipathways_ext_tools.json', 'wikipedia': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/wikipedia_tools.json', 'wikipedia_ext': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/wikipedia_ext_tools.json', 'worldbank': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/worldbank_tools.json', 'wormbase': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/wormbase_tools.json', 'worms': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/worms_tools.json', 'xml': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/xml_tools.json', 'zenodo': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/zenodo_tools.json', 'zfin': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/zfin_tools.json', 'zinc': '/home/runner/work/ToolUniverse/ToolUniverse/src/tooluniverse/data/zinc_tools.json'}, keep_default_tools=True, log_level=None, hooks_enabled=False, hook_config=None, hook_type=None, enable_name_shortening=False)[source]

Initialize the ToolUniverse with tool file configurations.

Parameters:
  • tool_files (dict, optional) – Dictionary mapping category names to JSON file paths. Defaults to default_tool_files.

  • keep_default_tools (bool, optional) – Whether to keep default tools when custom tool_files are provided. Defaults to True.

  • log_level (str, optional) – Log level for this instance. Can be ‘DEBUG’, ‘INFO’, ‘WARNING’, ‘ERROR’, ‘CRITICAL’. If None, uses global setting.

  • hooks_enabled (bool, optional) – Whether to enable output hooks. Defaults to False.

  • hook_config (dict, optional) – Configuration for hooks. If None, uses default config.

  • hook_type (str or list, optional) – Simple hook type selection. Can be ‘SummarizationHook’, ‘FileSaveHook’, or a list of both. Defaults to ‘SummarizationHook’. If both hook_config and hook_type are provided, hook_config takes precedence.

  • enable_name_shortening (bool, optional) – Whether to enable automatic tool name shortening for MCP compatibility. Defaults to False.

register_custom_tool(tool_class, tool_name=None, tool_config=None, instantiate=False, tool_instance=None)[source]

Register a custom tool class or instance at runtime.

Parameters:
  • tool_class – The tool class to register (required if tool_instance is None)

  • tool_name (str, optional) – Name to register under. Uses class name if None.

  • tool_config (dict, optional) – Tool configuration dictionary to add to all_tools

  • instantiate (bool, optional) – If True, immediately instantiate and cache the tool. Defaults to False for backward compatibility.

  • tool_instance (optional) – Pre-instantiated tool object. If provided, tool_class is inferred from the instance.

Returns:

The name the tool was registered under

Return type:

str

Examples

# Register tool class only (lazy instantiation) tu.register_custom_tool(MyTool, tool_config={…})

# Register and immediately instantiate tu.register_custom_tool(MyTool, tool_config={…}, instantiate=True)

# Register pre-instantiated tool instance = MyTool({…}) tu.register_custom_tool(tool_class=MyTool, tool_instance=instance, tool_config={…})

force_full_discovery()[source]

Force full tool discovery, importing all tool modules immediately.

This can be useful when you need to ensure all tools are available immediately, bypassing lazy loading.

Returns:

Updated tool registry with all discovered tools

Return type:

dict

get_lazy_loading_status()[source]

Get information about lazy loading status and available tools.

Returns:

Dictionary with lazy loading status and tool counts

Return type:

dict

get_tool_types()[source]

Get the types of tools available in the tool files.

Returns:

A list of tool type names (category keys).

Return type:

list

_get_api_key(key_name)[source]

Get API key from environment variables.

_check_api_key_requirements(tool_config)[source]

Check if a tool’s required API keys are available. Also supports optional_api_keys which enhance performance but don’t block loading.

Parameters:

tool_config (dict) – Tool configuration containing optional ‘required_api_keys’ and ‘optional_api_keys’ fields

Returns:

(bool, list) - (all_keys_available, missing_keys)

Return type:

tuple

generate_env_template(all_missing_keys, output_file='.env.template')[source]

Generate a template .env file with all required API keys

_create_hook_config_from_type(hook_type)[source]

Create hook configuration from simple hook_type parameter.

Parameters:

hook_type (str or list) – Hook type(s) to enable. Can be ‘SummarizationHook’, ‘FileSaveHook’, or a list of both.

Returns:

Generated hook configuration

Return type:

dict

load_tools(tool_type=None, exclude_tools=None, exclude_categories=None, include_tools=None, tool_config_files=None, tools_file=None, include_tool_types=None, exclude_tool_types=None)[source]

Loads tool definitions from JSON files into the instance’s tool registry.

If tool_type is None, loads all available tool categories from self.tool_files. Otherwise, loads only the specified tool categories.

After loading, deduplicates tools by their ‘name’ field and updates the internal tool list. Also refreshes the tool name and description mapping.

Parameters:
  • tool_type (list, optional) – List of tool category names to load. If None, loads all categories.

  • exclude_tools (list, optional) – List of specific tool names to exclude from loading.

  • exclude_categories (list, optional) – List of tool categories to exclude from loading.

  • include_tools (list or str, optional) – List of specific tool names to include, or path to a text file containing tool names (one per line). If provided, only these tools will be loaded regardless of categories.

  • tool_config_files (dict, optional) – Additional tool configuration files to load. Format: {“category_name”: “/path/to/config.json”}

  • tools_file (str, optional) – Path to a text file containing tool names to include (one per line). Alternative to include_tools when providing a file path.

  • include_tool_types (list, optional) – List of tool types to include (e.g., [“OpenTarget”, “ChEMBLTool”]). If provided, only tools with these types will be loaded.

  • exclude_tool_types (list, optional) – List of tool types to exclude (e.g., [“ToolFinderEmbedding”]). Tools with these types will be excluded.

Side Effects:
  • Updates self.all_tools with loaded and deduplicated tools.

  • Updates self.tool_category_dicts with loaded tools per category.

  • Calls self.refresh_tool_name_desc() to update tool name/description mapping.

  • Prints the number of tools before and after loading.

Examples

# Load specific tools by name tu.load_tools(include_tools=[“UniProt_get_entry_by_accession”, “ChEMBL_get_molecule_by_chembl_id”])

# Load tools from a file tu.load_tools(tools_file=”/path/to/tool_names.txt”)

# Include only specific tool types tu.load_tools(include_tool_types=[“OpenTarget”, “ChEMBLTool”])

# Exclude specific tool types tu.load_tools(exclude_tool_types=[“ToolFinderEmbedding”, “Unknown”])

# Load additional config files tu.load_tools(tool_config_files={“custom_tools”: “/path/to/custom_tools.json”})

# Combine multiple options tu.load_tools(

tool_type=[“uniprot”, “ChEMBL”], exclude_tools=[“problematic_tool”], exclude_tool_types=[“Unknown”], tool_config_files={“custom”: “/path/to/custom.json”}

)

_load_tool_names_from_file(file_path)[source]

Load tool names from a text file (one tool name per line).

Parameters:

file_path (str) – Path to the text file containing tool names

Returns:

List of tool names loaded from the file

Return type:

list

_filter_and_deduplicate_tools(exclude_tools_set, include_tools_set, include_tool_types_set=None, exclude_tool_types_set=None, existing_tool_names=None)[source]

Filter tools based on inclusion/exclusion criteria and remove duplicates.

Parameters:
  • exclude_tools_set (set) – Set of tool names to exclude

  • include_tools_set (set or None) – Set of tool names to include (if None, include all)

  • include_tool_types_set (set or None) – Set of tool types to include (if None, include all)

  • exclude_tool_types_set (set or None) – Set of tool types to exclude (if None, exclude none)

  • existing_tool_names (set or None) – Set of tool names that were already loaded before this call. These tools will be preserved even if not in include_tools_set. Used for merge mode when loading specific tools.

_load_auto_discovered_configs()[source]

Load auto-discovered configs from the decorator registry.

This method loads tool configurations that were registered automatically via the @register_tool decorator with config parameter.

_process_mcp_auto_loaders()[source]

Process any MCPAutoLoaderTool instances to automatically discover and register MCP tools.

This method scans through all loaded tools for MCPAutoLoaderTool instances and runs their auto-discovery process to find and register MCP tools from configured servers. It handles async operations properly with cleanup and error handling.

Side Effects:
  • May add new tools to the tool registry

  • Prints debug information about the discovery process

  • Updates tool counts after MCP registration

list_built_in_tools(mode='config', scan_all=False)[source]

List all built-in tool categories and their statistics with different modes.

This method provides a comprehensive overview of all available tools in the ToolUniverse, organized by categories. It reads directly from the default tool files to gather statistics, so it works even before calling load_tools().

Parameters:
  • mode (str, optional) – Organization mode for tools. Defaults to ‘config’. - ‘config’: Organize by config file categories (original behavior) - ‘type’: Organize by tool types (implementation classes) - ‘list_name’: Return a list of all tool names - ‘list_spec’: Return a list of all tool specifications

  • scan_all (bool, optional) – Whether to scan all JSON files in data directory recursively. If True, scans all JSON files in data/ and its subdirectories. If False (default), uses predefined tool file mappings.

Returns:

  • For ‘config’ and ‘type’ modes: A dictionary containing tool statistics

  • For ‘list_name’ mode: A list of all tool names

  • For ‘list_spec’ mode: A list of all tool specifications

Return type:

dict or list

Example

>>> tool_universe = ToolUniverse()
>>> # Group by config file categories (predefined files only)
>>> stats = tool_universe.list_built_in_tools(mode='config')
>>> # Scan all JSON files in data directory recursively
>>> stats = tool_universe.list_built_in_tools(mode='config', scan_all=True)
>>> # Get all tool names from all JSON files
>>> tool_names = tool_universe.list_built_in_tools(mode='list_name', scan_all=True)

Note

  • This method reads directly from tool files and works without calling load_tools()

  • Tools are deduplicated across categories, so the same tool won’t be counted multiple times

  • The summary is automatically printed to console when this method is called (except for list_name and list_spec modes)

  • When scan_all=True, all JSON files in data/ and subdirectories are scanned

_read_tools_from_file(file_path)[source]

Read tools from a single JSON file with error handling.

Parameters:

file_path (str) – Path to the JSON file

Returns:

List of tool configurations from the file

Return type:

list

_scan_predefined_files()[source]

Scan predefined tool files (original behavior).

Returns:

(all_tools, all_tool_names) where all_tools is a list of tool configs

and all_tool_names is a set of tool names for deduplication

Return type:

tuple

_scan_all_json_files()[source]

Recursively scan all JSON files in the data directory and its subdirectories.

Returns:

(all_tools, all_tool_names) where all_tools is a list of tool configs

and all_tool_names is a set of tool names for deduplication

Return type:

tuple

refresh_tool_name_desc(enable_full_desc=False, include_names=None, exclude_names=None, include_categories=None, exclude_categories=None)[source]

Refresh the tool name and description mappings with optional filtering.

This method rebuilds the internal tool dictionary and generates filtered lists of tool names and descriptions based on the provided filter criteria.

Parameters:
  • enable_full_desc (bool, optional) – If True, includes full tool JSON as description. If False, uses “name: description” format. Defaults to False.

  • include_names (list, optional) – List of tool names to include.

  • exclude_names (list, optional) – List of tool names to exclude.

  • include_categories (list, optional) – List of categories to include.

  • exclude_categories (list, optional) – List of categories to exclude.

Returns:

A tuple containing (tool_name_list, tool_desc_list) after filtering.

Return type:

tuple

prepare_one_tool_prompt(tool)[source]

Prepare a single tool configuration for prompt usage by filtering to essential keys.

Parameters:

tool (dict) – Tool configuration dictionary.

Returns:

Tool configuration with only essential keys for prompting.

Return type:

dict

prepare_tool_prompts(tool_list, mode='prompt', valid_keys=None)[source]

Prepare a list of tool configurations for different usage modes.

Parameters:
  • tool_list (list) – List of tool configuration dictionaries.

  • mode (str) – Preparation mode. Options: - ‘prompt’: Keep essential keys for prompting (name, description, parameter, required) - ‘example’: Keep extended keys for examples (name, description, parameter, required, query_schema, fields, label, type) - ‘custom’: Use custom valid_keys parameter

  • valid_keys (list, optional) – Custom list of keys to keep when mode=’custom’.

Returns:

List of tool configurations with only specified keys.

Return type:

list

get_tool_specification_by_names(tool_names, format='default')[source]

Retrieve tool specifications by their names using tool_specification method.

Parameters:
  • tool_names (list) – List of tool names to retrieve.

  • format (str, optional) – Output format. Options: ‘default’, ‘openai’. If ‘openai’, returns OpenAI function calling format. Defaults to ‘default’.

Returns:

List of tool specifications for the specified names.

Tools not found will be reported but not included in the result.

Return type:

list

get_one_tool_by_one_name(tool_name, return_prompt=True)[source]

Retrieve a single tool specification by name, optionally prepared for prompting.

This is a convenience method that calls get_one_tool_by_one_name.

Parameters:
  • tool_name (str) – Name of the tool to retrieve.

  • return_prompt (bool, optional) – If True, returns tool prepared for prompting. If False, returns full tool configuration. Defaults to True.

Returns:

Tool configuration if found, None otherwise.

Return type:

dict or None

_sanitize_schema_for_openai(schema)[source]

Recursively sanitize a JSON Schema object for OpenAI function calling compatibility.

Handles three categories of issues that cause OpenAI to reject schemas:

  1. Legacy required flagsrequired: True/False embedded on individual property schemas (not valid JSON Schema). Collected and rebuilt as a proper top-level required array on the enclosing object schema.

  2. Array type unionstype: ["string", "null"] (JSON Schema draft-4 shorthand). OpenAI only accepts a single string for type; this converts them to anyOf: [{"type": "string"}, {"type": "null"}].

  3. ``additionalProperties: True`` — OpenAI’s validator rejects this value; the key is removed.

Recurses into properties, items, and anyOf / oneOf / allOf so that deeply-nested sub-schemas are also cleaned up.

Parameters:

schema (dict) – A JSON Schema dict to sanitize (not mutated in place).

Returns:

A new dict with all issues resolved.

Return type:

dict

tool_specification(tool_name, return_prompt=False, format='default')[source]

Retrieve a single tool configuration by name.

Parameters:
  • tool_name (str) – Name of the tool to retrieve.

  • return_prompt (bool, optional) – If True, returns tool prepared for prompting. If False, returns full tool configuration. Defaults to False.

  • format (str, optional) – Output format. Options: ‘default’, ‘openai’. If ‘openai’, returns OpenAI function calling format. Defaults to ‘default’.

Returns:

Tool configuration if found, None otherwise.

Return type:

dict or None

get_tool_type_by_name(tool_name)[source]

Get the type of a tool by its name.

Parameters:

tool_name (str) – Name of the tool.

Returns:

The type of the tool.

Return type:

str

Raises:

KeyError – If the tool name is not found in loaded tools.

call_id_gen()[source]

Generate a random call ID for function calls.

Returns:

A random 9-character string composed of letters and digits.

Return type:

str

tool_to_str(tool_list)[source]

Convert a list of tool configurations to a formatted string.

Parameters:

tool_list (list) – List of tool configuration dictionaries.

Returns:

JSON-formatted string representation of the tools, with each tool

separated by double newlines.

Return type:

str

extract_function_call_json(lst, return_message=False, verbose=True, format='llama')[source]

Extract function call JSON from input data.

This method delegates to the utility function extract_function_call_json.

Parameters:
  • lst – Input data containing function call information.

  • return_message (bool, optional) – Whether to return message along with JSON. Defaults to False.

  • verbose (bool, optional) – Whether to enable verbose output. Defaults to True.

  • format (str, optional) – Format type for extraction. Defaults to ‘llama’.

Returns:

Function call JSON, optionally with message if return_message is True.

Return type:

dict or tuple

return_all_loaded_tools()[source]

Return a deep copy of all loaded tools.

Returns:

A deep copy of the all_tools list to prevent external modification.

Return type:

list

_execute_function_call_list(function_calls, stream_callback=None, use_cache=False, max_workers=None)[source]

Execute a list of function calls, optionally in parallel.

Parameters:
  • function_calls (List[Dict[str, Any]]) – Ordered list of function call dictionaries.

  • stream_callback – Optional streaming callback.

  • use_cache (bool) – Whether to enable cache lookups for each call.

  • max_workers (int | None) – Maximum parallel workers; values <=1 fall back to sequential execution.

Returns:

List of results aligned with function_calls order.

Return type:

List[Any]

_build_batch_jobs(function_calls)[source]
_prime_batch_cache(jobs, use_cache, results)[source]
_execute_batch_jobs(jobs_to_run, results, *, stream_callback, use_cache, max_workers)[source]
_ensure_tool_instance(job)[source]
_get_tool_semaphore(job, tool_semaphores)[source]
run(fcall_str, return_message=False, verbose=True, format='llama', stream_callback=None, use_cache=False, max_workers=None)[source]

Context-aware execution - works in both sync and async contexts.

In sync context:

result = tu.run(…) # Returns result directly (may block for async tools)

In async context:

result = await tu.run(…) # Returns coroutine, non-blocking

This method automatically detects the context and behaves appropriately.

Parameters:
  • fcall_str – Input string or data containing function call information.

  • return_message (bool, optional) – Whether to return formatted messages. Defaults to False.

  • verbose (bool, optional) – Whether to enable verbose output. Defaults to True.

  • format (str, optional) – Format type for parsing. Defaults to ‘llama’.

  • stream_callback – Optional callback for streaming responses.

  • use_cache (bool, optional) – Whether to use result caching. Defaults to False.

  • max_workers (Optional[int]) – Max workers for parallel batch execution (sync only).

Returns:

Result (sync) or coroutine (async) depending on context.

_run_sync(fcall_str, return_message=False, verbose=True, format='llama', stream_callback=None, use_cache=False, max_workers=None)[source]

Synchronous execution implementation (original run logic).

For async tools, this will create an event loop if needed.

_format_batch_as_messages(batch_results, function_call_json, message)[source]

Format batch results as tool/assistant message dicts for return_message mode.

async _run_async(fcall_str, return_message=False, verbose=True, format='llama', stream_callback=None, use_cache=False)[source]

Asynchronous execution implementation (non-blocking).

Handles both sync and async tools in async context.

async _execute_function_call_list_async(function_call_list, stream_callback=None, use_cache=False)[source]

Execute multiple function calls asynchronously and in parallel.

Uses return_exceptions=True so one failure does not abort others.

_resolve_tool_name(function_name)[source]

Resolve tool name to its primary identifier.

Uses the ToolNameMapper to handle: 1. Aliases (e.g., old tool names) -> primary name 2. Original names -> shortened names (if shortening enabled) 3. Already primary names -> return as-is

Parameters:

function_name (str) – Tool name (can be alias, original, or shortened)

Returns:

Resolved tool name (primary identifier in all_tool_dict)

Return type:

str

run_one_function(function_call_json, stream_callback=None, use_cache=False, validate=True)[source]

Execute a single function call.

This method validates the function call, initializes the tool if necessary, and executes it with the provided arguments. If hooks are enabled, it also applies output hooks to process the result.

Parameters:
  • function_call_json (dict) – Dictionary containing function name and arguments.

  • stream_callback (callable, optional) – Callback for streaming responses.

  • use_cache (bool, optional) – Whether to use result caching. Defaults to False.

  • validate (bool, optional) – Whether to validate parameters against schema. Defaults to True.

Returns:

Result from the tool execution, or error message if validation fails.

Return type:

str or dict

async run_one_function_async(function_call_json, stream_callback=None, use_cache=False, validate=True)[source]

Async version of run_one_function.

Execute a single function call asynchronously (non-blocking). Handles both sync and async tools intelligently.

_execute_tool_with_stream(tool_instance, arguments, stream_callback, use_cache=False, validate=True)[source]

Invoke a tool, forwarding stream callbacks and other parameters when supported.

async _invoke_tool_async(tool_instance, tool_arguments, **kwargs)[source]

Invoke tool.run, using await for async tools or a thread pool for sync tools.

async _execute_tool_with_stream_async(tool_instance, arguments, stream_callback, use_cache=False, validate=True)[source]

Async version of _execute_tool_with_stream.

Handles both sync and async tools: async tools are awaited directly, sync tools run in a thread pool.

toggle_hooks(enabled)[source]

Enable or disable output hooks globally.

This method allows runtime control of the hook system. When enabled, it initializes the HookManager if not already present. When disabled, it deactivates the HookManager.

Parameters:

enabled (bool) – True to enable hooks, False to disable

init_tool(tool=None, tool_name=None, add_to_cache=True)[source]

Initialize a tool instance from configuration or name.

This method creates a new tool instance using the tool type mappings and optionally caches it for future use. It handles special cases like the OpentargetToolDrugNameMatch which requires additional dependencies.

Parameters:
  • tool (dict, optional) – Tool configuration dictionary. Either this or tool_name must be provided.

  • tool_name (str, optional) – Name of the tool type to initialize. Either this or tool must be provided.

  • add_to_cache (bool, optional) – Whether to cache the initialized tool. Defaults to True.

Returns:

Initialized tool instance or None if initialization fails.

Return type:

object

Raises:

KeyError – If the tool type is not found in tool_type_mappings.

_get_tool_instance(function_name, cache=True)[source]

Get or create tool instance with optional caching.

_auto_load_tools_if_empty(function_name=None)[source]

Automatically load tools if the tools dictionary is empty.

Parameters:

function_name (str) – Optional tool name to check after loading

Returns:

True if tools were loaded successfully, False otherwise

Return type:

bool

_make_cache_key(function_name, arguments, tool_instance=None)[source]

Generate cache key by delegating to BaseTool.

Parameters:
  • function_name (str) – Name of the tool/function

  • arguments (dict) – Arguments passed to the tool

  • tool_instance – Optional pre-fetched tool instance to avoid recreation

Returns:

Cache key string

Return type:

str

_coerce_value_to_type(value, schema)[source]

Coerce a value to match the schema’s expected type.

This function attempts to convert string values to integers, floats, or booleans when the schema expects those types. This makes the system more lenient with user input from LLMs that provide numeric values as strings.

Parameters:
  • value (Any) – The value to coerce

  • schema (dict) – The JSON schema definition for this value

Returns:

The coerced value (or original if coercion fails or not applicable)

Return type:

Any

_coerce_arguments_to_schema(function_name, arguments)[source]

Coerce all arguments for a tool to match their schema expectations.

Parameters:
  • function_name (str) – Name of the tool

  • arguments (dict) – Dictionary of arguments to coerce

Returns:

New dictionary with coerced arguments

Return type:

dict

_validate_parameters(function_name, arguments)[source]

Validate parameters by delegating to BaseTool.

_check_basic_type(value, expected_type)[source]

Check if value matches expected basic type.

_classify_exception(exception, function_name, arguments)[source]

Classify exception by delegating to BaseTool.

_create_dual_format_error(error)[source]

Create dual-format error response for backward compatibility.

refresh_tools()[source]

Refresh tool discovery (re-discover MCP/remote tools, reload configs).

eager_load_tools(names=None)[source]

Pre-instantiate tools to reduce first-call latency.

property _cache

Access to the internal cache for testing purposes.

clear_cache()[source]

Clear the result cache.

clear_tools(clear_cache=False)[source]

Clear all loaded tools from the registry.

This method resets the tool registry to its initial empty state, allowing you to: - Free memory after loading many tools - Reset state between different workflows - Load a fresh set of tools for a new context - Control which tools are visible to tool finder

Parameters:

clear_cache (bool, optional) – Whether to also clear the result cache. Defaults to False.

Examples

# Clear tools but keep cached results tu.clear_tools()

# Clear both tools and cached results tu.clear_tools(clear_cache=True)

# Load specific tools after clearing tu.clear_tools() tu.load_tools(include_tools=[“UniProt_get_entry_by_accession”])

Note

  • This does not affect tool instances in callable_functions cache

  • Subsequent tool access will trigger on-demand loading

  • Use clear_cache=True if you also want to clear result cache

get_cache_stats()[source]

Return cache statistics.

dump_cache(namespace=None)[source]

Iterate over cached entries (persistent layer only).

close()[source]

Release resources.

get_tool_health(tool_name=None)[source]

Get health status for tool(s).

check_function_call(fcall_str, function_config=None, format='llama')[source]

Validate a function call against tool configuration.

This method checks if a function call is valid by verifying the function name exists and the arguments match the expected parameters.

Parameters:
  • fcall_str – Function call string or data to validate.

  • function_config (dict, optional) – Specific function configuration to validate against. If None, uses the loaded tool configuration.

  • format (str, optional) – Format type for parsing. Defaults to ‘llama’.

Returns:

A tuple of (is_valid, message) where:
  • is_valid (bool): True if the function call is valid, False otherwise

  • message (str): Error message if invalid, empty if valid

Return type:

tuple

export_tool_names(output_file, category_filter=None)[source]

Export tool names to a text file (one per line).

Parameters:
  • output_file (str) – Path to the output file

  • category_filter (list, optional) – List of categories to filter by

filter_tools(include_tools=None, exclude_tools=None, include_tool_types=None, exclude_tool_types=None)[source]

Filter tools based on inclusion/exclusion criteria.

Parameters:
  • include_tools (set, optional) – Set of tool names to include

  • exclude_tools (set, optional) – Set of tool names to exclude

  • include_tool_types (set, optional) – Set of tool types to include

  • exclude_tool_types (set, optional) – Set of tool types to exclude

Returns:

Filtered list of tool configurations

Return type:

list

get_required_parameters(tool_name)[source]

Get required parameters for a specific tool.

Parameters:

tool_name (str) – Name of the tool

Returns:

List of required parameter names

Return type:

list

get_available_tools(category_filter=None, name_only=True)[source]

Get available tools, optionally filtered by category.

Parameters:
  • category_filter (list, optional) – List of categories to filter by

  • name_only (bool) – If True, return only tool names; if False, return full configs

Returns:

List of tool names or tool configurations

Return type:

list

find_tools_by_pattern(pattern, search_in='name', case_sensitive=False)[source]

Find tools matching a pattern in their name or description.

Parameters:
  • pattern (str) – Pattern to search for

  • search_in (str) – Where to search - ‘name’, ‘description’, or ‘both’

  • case_sensitive (bool) – Whether search should be case sensitive

Returns:

List of matching tool configurations

Return type:

list

get_tool_by_name(tool_names, format='default')[source]

Retrieve tool configurations by their names.

DEPRECATED: Use tool_specification() instead.

Parameters:
  • tool_names (list) – List of tool names to retrieve.

  • format (str, optional) – Output format. Options: ‘default’, ‘openai’. If ‘openai’, returns OpenAI function calling format. Defaults to ‘default’.

Returns:

List of tool configurations for the specified names.

Tools not found will be reported but not included in the result.

Return type:

list

get_tool_description(tool_name)[source]

Get the description of a tool by its name.

DEPRECATED: Use tool_specification() instead.

Parameters:

tool_name (str) – Name of the tool.

Returns:

Tool configuration if found, None otherwise.

Return type:

dict or None

remove_keys(tool_list, invalid_keys)[source]

Remove specified keys from a list of tool configurations.

DEPRECATED: Use prepare_tool_prompts(mode=’custom’, valid_keys=…) instead.

Parameters:
  • tool_list (list) – List of tool configuration dictionaries.

  • invalid_keys (list) – List of keys to remove from each tool configuration.

Returns:

Deep copy of tool list with specified keys removed.

Return type:

list

prepare_tool_examples(tool_list)[source]

Prepare tool configurations for example usage by keeping extended set of keys.

DEPRECATED: Use prepare_tool_prompts(mode=’example’) instead.

Parameters:

tool_list (list) – List of tool configuration dictionaries.

Returns:

Deep copy of tool list with only example-relevant keys.

Return type:

list

select_tools(include_names=None, exclude_names=None, include_categories=None, exclude_categories=None)[source]

Select tools based on tool names and/or categories (tool_files keys).

DEPRECATED: Use filter_tools() instead.

Parameters:
  • include_names (list, optional) – List of tool names to include. If None, include all.

  • exclude_names (list, optional) – List of tool names to exclude.

  • include_categories (list, optional) – List of categories (tool_files keys) to include. If None, include all.

  • exclude_categories (list, optional) – List of categories (tool_files keys) to exclude.

Returns:

List of selected tool configurations.

Return type:

list

filter_tool_lists(tool_name_list, tool_desc_list, include_names=None, exclude_names=None, include_categories=None, exclude_categories=None)[source]

Directly filter tool name and description lists based on names and/or categories.

DEPRECATED: Use filter_tools() and manual list filtering instead.

Parameters:
  • tool_name_list (list) – List of tool names to filter.

  • tool_desc_list (list) – List of tool descriptions to filter (must correspond to tool_name_list).

  • include_names (list, optional) – List of tool names to include.

  • exclude_names (list, optional) – List of tool names to exclude.

  • include_categories (list, optional) – List of categories to include.

  • exclude_categories (list, optional) – List of categories to exclude.

Returns:

A tuple containing (filtered_tool_name_list, filtered_tool_desc_list).

Return type:

tuple

load_tools_from_names_list(tool_names, clear_existing=True)[source]

Load only specific tools by their names.

DEPRECATED: Use load_tools(include_tools=…) instead.

Parameters:
  • tool_names (list) – List of tool names to load

  • clear_existing (bool) – Whether to clear existing tools first

Returns:

Number of tools successfully loaded

Return type:

int

load_space(uri, **kwargs)[source]

Load Space configuration and apply it to the ToolUniverse instance.

This is a high-level method that loads a Space configuration from various sources (HuggingFace, local files, HTTP URLs) and applies the tool settings to the current instance.

Parameters:
  • uri (str) – Space URI (e.g., “hf:user/repo”, “./config.yaml”, “https://example.com/config.yaml”)

  • **kwargs – Additional parameters to override Space configuration (e.g., exclude_tools=[“tool1”], include_tools=[“tool2”])

Returns:

The loaded Space configuration

Return type:

dict

Examples

# Load from HuggingFace config = tu.load_space(“hf:community/proteomics-toolkit”)

# Load local file with overrides config = tu.load_space(“./my-config.yaml”, exclude_tools=[“slow_tool”])

# Load from HTTP URL config = tu.load_space(”https://example.com/config.yaml”)

_apply_llm_config(llm_config)[source]

Apply LLM configuration from Space.

Parameters:

llm_config (Dict[str, Any]) – LLM configuration dictionary

_apply_hooks_config(hooks_config)[source]

Apply hooks configuration from Space.

Parameters:

hooks_config (List[Dict[str, Any]]) – Hooks configuration list

_load_tools_from_mcp_server(server_url, config)

Load tools from a specific MCP server.

_store_space_metadata(config)[source]

Store Space metadata for reference.

Parameters:

config (Dict[str, Any]) – Space configuration dictionary

discover_mcp_tools(server_urls=None, **kwargs)

Discover available tools from MCP servers without loading them.

This method connects to MCP servers to discover what tools are available without actually registering them in ToolUniverse. Useful for exploration and selective tool loading.

Parameters:
  • server_urls (list of str, optional) – List of MCP server URLs to discover from

  • **kwargs – Additional options: - timeout (int): Connection timeout (default: 30) - include_schemas (bool): Include tool parameter schemas (default: True)

Returns:

Discovery results with tools organized by server

Return type:

dict

Examples

tu = ToolUniverse()

# Discover what's available
discovery = tu.discover_mcp_tools([
    "http://localhost:8001",
    "http://ml-server:8002"
])

# Show available tools
for server, info in discovery["servers"].items():
    print(f"\n{server}:")
    for tool in info.get("tools", []):
        print(f"  - {tool['name']}: {tool['description']}")
list_mcp_connections()

List all active MCP connections and loaded tools.

Returns:

Information about MCP connections, auto-loaders, and loaded tools

Return type:

dict

Examples

tu = ToolUniverse()
tu.load_mcp_tools(["http://localhost:8001"])

connections = tu.list_mcp_connections()
print(f"Active MCP connections: {len(connections['connections'])}")
load_mcp_tools(server_urls=None, **kwargs)

Load MCP tools from remote servers into this ToolUniverse instance.

This method automatically discovers tools from MCP servers and registers them as ToolUniverse tools, enabling seamless usage of remote capabilities.

Parameters:
  • server_urls (list of str, optional) –

    List of MCP server URLs to load tools from. Examples:

    If None, attempts to discover from local MCP tool registry.

  • **kwargs

    Additional configuration options:

    • tool_prefix (str): Prefix for loaded tool names (default: “mcp_”)

    • timeout (int): Connection timeout in seconds (default: 30)

    • auto_register (bool): Whether to auto-register discovered tools (default: True)

    • selected_tools (list): Specific tools to load from each server

    • categories (list): Tool categories to filter by

Returns:

Summary of loaded tools with counts and any errors encountered.

Return type:

dict

Examples

Load from specific servers:

tu = ToolUniverse()

# Load tools from multiple MCP servers
result = tu.load_mcp_tools([
    "http://localhost:8001",  # Local analysis server
    "http://ml-server:8002",  # Remote ML server
    "ws://realtime:9000"      # WebSocket server
])

print(f"Loaded {result['total_tools']} tools from {result['servers_connected']} servers")

Load with custom configuration:

tu.load_mcp_tools(
server_urls=["http://localhost:8001"],
tool_prefix="analysis\_",
timeout=60,
selected_tools=["protein_analysis", "drug_interaction"]

Auto-discovery from local registry: `python # If you have registered MCP tools locally, auto-discover their servers tu.load_mcp_tools()  # Uses servers from mcp_tool_registry `

get_space_llm_config()[source]

Get the current Space LLM configuration.

Returns:

LLM configuration dictionary or None if not set

Return type:

Dict[str, Any] | None

get_space_metadata()[source]

Get the current Space metadata.

Returns:

Space metadata dictionary or None if not set

Return type:

Dict[str, Any] | None

class tooluniverse.BaseTool[source]

Bases: object

STATIC_CACHE_VERSION = '1'
__init__(tool_config)[source]
classmethod get_default_config_file()[source]

Get the path to the default configuration file for this tool type.

This method uses a robust path resolution strategy that works across different installation scenarios:

  1. Installed packages: Uses importlib.resources for proper package resource access

  2. Development mode: Falls back to file-based path resolution

  3. Legacy Python: Handles importlib.resources and importlib_resources

Override this method in subclasses to specify a custom defaults file.

Returns

Path or resource object pointing to the defaults file

classmethod load_defaults_from_file()[source]

Load defaults from the configuration file

_apply_defaults(tool_config)[source]

Apply default configuration to the tool config

run(arguments=None, stream_callback=None, use_cache=False, validate=True)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

check_function_call(function_call_json)[source]
get_required_parameters()[source]

Retrieve required parameters from the endpoint definition. Returns list: List of required parameters for the given endpoint.

validate_parameters(arguments)[source]

Validate parameters against tool schema.

This method provides standard parameter validation using jsonschema. Subclasses can override this method to implement custom validation logic.

Parameters:

arguments (Dict[str, Any]) – Dictionary of arguments to validate

Returns

ToolError if validation fails, None if validation passes

_ERROR_CLASSIFICATION = [({'401', '403', 'api key', 'auth', 'token', 'unauthorized'}, <class 'tooluniverse.exceptions.ToolAuthError'>, 'Authentication failed'), ({'429', 'limit exceeded', 'quota', 'rate limit'}, <class 'tooluniverse.exceptions.ToolRateLimitError'>, 'Rate limit exceeded'), ({'404', 'connection', 'network', 'not found', 'timeout', 'unavailable'}, <class 'tooluniverse.exceptions.ToolUnavailableError'>, 'Tool unavailable'), ({'invalid', 'parameter', 'schema', 'validation'}, <class 'tooluniverse.exceptions.ToolValidationError'>, 'Validation error'), ({'config', 'configuration', 'setup'}, <class 'tooluniverse.exceptions.ToolConfigError'>, 'Configuration error'), ({'dependency', 'import', 'module', 'package'}, <class 'tooluniverse.exceptions.ToolDependencyError'>, 'Dependency error')]
handle_error(exception)[source]

Classify a raw exception into a structured ToolError.

This method provides standard error classification. Subclasses can override this method to implement custom error handling logic.

Parameters:

exception (Exception) – The raw exception to classify

Returns

Structured ToolError instance

get_cache_key(arguments)[source]

Generate a cache key for this tool call.

This method provides standard cache key generation. Subclasses can override this method to implement custom caching logic.

Parameters:

arguments (Dict[str, Any]) – Dictionary of arguments for the tool call

Returns

String cache key

supports_streaming()[source]

Check if this tool supports streaming responses.

Returns

True if tool supports streaming, False otherwise

supports_caching()[source]

Check if this tool’s results can be cached.

Returns

True if tool results can be cached, False otherwise

get_batch_concurrency_limit()[source]

Return maximum concurrent executions allowed during batch runs (0 = unlimited).

get_cache_namespace()[source]

Return cache namespace identifier for this tool.

get_cache_version()[source]

Return a stable cache version fingerprint for this tool.

get_cache_ttl(result=None)[source]

Return TTL (seconds) for cached results; None means no expiration.

get_tool_info()[source]

Get comprehensive information about this tool.

Returns

Dictionary containing tool metadata

tooluniverse.register_tool(tool_type_name=None, config=None)[source]

Decorator to automatically register tool classes and their configs.

Usage:

@register_tool(‘CustomToolName’, config={…}) class MyTool:

pass

tooluniverse.get_tool_registry()[source]

Get a copy of the current tool registry.

class tooluniverse.SMCP[source]

Bases: FastMCP

Scientific Model Context Protocol (SMCP) Server

SMCP is an enhanced MCP (Model Context Protocol) server that seamlessly integrates ToolUniverse’s extensive collection of scientific and scientific tools with the FastMCP framework. It provides a unified, AI-accessible interface for scientific computing, data analysis, and research workflows.

The SMCP server extends standard MCP capabilities with scientific domain expertise, intelligent tool discovery, and optimized configurations for research applications. It automatically handles the complex task of exposing hundreds of specialized tools through a consistent, well-documented interface.

Key Features:

🔬 Scientific Tool Integration: Native access to 350+ specialized tools covering

scientific databases, literature search, clinical data, genomics, proteomics, chemical informatics, and AI-powered analysis capabilities.

🧠 AI-Powered Tool Discovery: Multi-tiered intelligent search system using:
  • ToolFinderLLM: Cost-optimized LLM-based semantic understanding with pre-filtering

  • Tool_RAG: Embedding-based similarity search

  • Keyword Search: Simple text matching as reliable fallback

📡 Full MCP Protocol Support: Complete implementation of MCP specification with:
  • Standard methods (tools/list, tools/call, resources/, prompts/)

  • Custom scientific methods (tools/find, tools/search)

  • Multi-transport support (stdio, HTTP, SSE)

  • JSON-RPC 2.0 compliance with proper error handling

High-Performance Architecture: Production-ready features including:
  • Configurable thread pools for concurrent tool execution

  • Intelligent tool loading and caching

  • Resource management and graceful degradation

  • Comprehensive error handling and recovery

🔧 Developer-Friendly: Simplified configuration and deployment with:
  • Sensible defaults for scientific computing

  • Flexible customization options

  • Comprehensive documentation and examples

  • Built-in diagnostic and monitoring tools

Custom MCP Methods:

tools/find:

AI-powered tool discovery using natural language queries. Supports semantic search, category filtering, and flexible response formats.

tools/search:

Alternative endpoint for tool discovery with identical functionality to tools/find, provided for compatibility and convenience.

Parameters:

namestr, optional

Human-readable server name used in logs and identification. Default: “SMCP Server” Examples: “Scientific Research API”, “Drug Discovery Server”

tooluniverse_configToolUniverse or dict, optional

Either a pre-configured ToolUniverse instance or configuration dict. If None, creates a new ToolUniverse with default settings. Allows reuse of existing tool configurations and customizations.

tool_categorieslist of str, optional

Specific ToolUniverse categories to load. If None and auto_expose_tools=True, loads all available tools. Common combinations: - Scientific: [“ChEMBL”, “uniprot”, “opentarget”, “pubchem”, “hpa”] - Literature: [“EuropePMC”, “semantic_scholar”, “pubtator”, “agents”] - Clinical: [“fda_drug_label”, “clinical_trials”, “adverse_events”]

exclude_toolslist of str, optional

Specific tool names to exclude from loading. These tools will not be exposed via the MCP interface even if they are in the loaded categories. Useful for removing specific problematic or unwanted tools.

exclude_categorieslist of str, optional

Tool categories to exclude from loading. These entire categories will be skipped during tool loading. Can be combined with tool_categories to first select categories and then exclude specific ones.

include_toolslist of str, optional

Specific tool names to include. If provided, only these tools will be loaded regardless of categories. Overrides category-based selection.

tools_filestr, optional

Path to a text file containing tool names to include (one per line). Alternative to include_tools parameter. Comments (lines starting with #) and empty lines are ignored.

tool_config_filesdict of str, optional

Additional tool configuration files to load. Format: {“category_name”: “/path/to/config.json”}. These files will be loaded in addition to the default tool files.

include_tool_typeslist of str, optional

Specific tool types to include. If provided, only tools of these types will be loaded. Available types include: ‘OpenTarget’, ‘ToolFinderEmbedding’, ‘ToolFinderKeyword’, ‘ToolFinderLLM’, etc.

exclude_tool_typeslist of str, optional

Tool types to exclude from loading. These tool types will be skipped during tool loading. Useful for excluding entire categories of tools (e.g., all ToolFinder types or all OpenTarget tools).

spacestr or list of str, optional

Space configuration URI(s) to load. Can be a single URI string or a list of URIs for loading multiple Space configurations. Supported formats: - Local file: “./config.yaml” or “/path/to/config.yaml” - HuggingFace: “hf:username/repo” or “hf:username/repo/file.yaml” - HTTP URL: “https://example.com/config.yaml”

When provided, Space configurations are loaded after tool initialization, applying LLM settings, hooks, and tool selections from the configuration files. Multiple spaces can be loaded sequentially, with later configurations potentially overriding earlier ones.

Example: space=”./my-workspace.yaml” Example: space=[“hf:community/bio-tools”, “./custom-tools.yaml”]

auto_expose_toolsbool, default True

Whether to automatically expose ToolUniverse tools as MCP tools. When True, all loaded tools become available via the MCP interface with automatic schema conversion and execution wrapping.

search_enabledbool, default True

Enable AI-powered tool search functionality via tools/find method. Includes ToolFinderLLM (cost-optimized LLM-based), Tool_RAG (embedding-based), and simple keyword search capabilities with intelligent fallback.

max_workersint, default 5

Maximum number of concurrent worker threads for tool execution. Higher values allow more parallel tool calls but use more resources. Recommended: 5-20 depending on server capacity and expected load.

hooks_enabledbool, default False

Whether to enable output processing hooks for intelligent post-processing of tool outputs. When True, hooks can automatically summarize long outputs, save results to files, or apply other transformations.

hook_configdict, optional

Custom hook configuration dictionary. If provided, overrides default hook settings. Should contain ‘hooks’ list with hook definitions. Example: {“hooks”: [{“name”: “summarization_hook”, “type”: “SummarizationHook”, …}]}

hook_typestr, optional

Simple hook type selection. Can be ‘SummarizationHook’, ‘FileSaveHook’, or a list of both. Provides an easy way to enable hooks without full configuration. Takes precedence over hooks_enabled when specified.

compact_modebool, default False

Enable compact mode that only exposes core tools to prevent context window overflow. When True: - Only exposes search tools (find_tools), execute tool (execute_tool),

and tool discovery tools (list_tools, grep_tools, get_tool_info)

  • All tools are still loaded in background for execute_tool to work

  • Prevents automatic exposure of all tools, reducing context window usage

  • Maintains full functionality through search and execute capabilities

  • Tool discovery tools enable progressive disclosure: start with minimal info, request details when needed

  • Agent-friendly features: simple text search (no regex required), natural language task discovery, combined search+detail tools to reduce tool call overhead

kwargs

Additional arguments passed to the underlying FastMCP server instance. Supports all FastMCP configuration options for advanced customization.

Raises:

ImportError

If FastMCP is not installed. FastMCP is a required dependency for SMCP. Install with: pip install fastmcp

Notes:

  • SMCP automatically handles ToolUniverse tool loading and MCP conversion

  • Tool search uses ToolFinderLLM (optimized for cost) when available, gracefully falls back to simpler methods

  • All tools support JSON argument passing for maximum flexibility

  • Server supports graceful shutdown and comprehensive resource cleanup

  • Thread pool execution ensures non-blocking operation for concurrent requests

  • Built-in error handling provides informative debugging information

__init__(name=None, tooluniverse_config=None, tool_categories=None, exclude_tools=None, exclude_categories=None, include_tools=None, tools_file=None, tool_config_files=None, include_tool_types=None, exclude_tool_types=None, space=None, auto_expose_tools=True, search_enabled=True, max_workers=5, hooks_enabled=False, hook_config=None, hook_type=None, compact_mode=False, **kwargs)[source]
_load_space_configs(space)[source]

Load Space configurations.

This method loads Space configuration(s) and retrieves the LLM config and metadata from ToolUniverse. It completely reuses ToolUniverse’s load_space functionality without reimplementing any logic.

Parameters:

space (str | List[str]) – Space URI or list of URIs (e.g., “./config.yaml”, “hf:user/repo”, or [“config1.yaml”, “config2.yaml”])

get_llm_config()[source]

Get the current Space LLM configuration.

Returns:

LLM configuration dictionary or None if not set

Return type:

Dict[str, Any] | None

_register_custom_mcp_methods()[source]

Register custom MCP protocol methods for enhanced functionality.

This method extends the standard MCP protocol by registering custom handlers for scientific tool discovery and search operations, as well as MCP Tasks support for long-running operations.

Custom Methods Registered:

  • tools/find: AI-powered tool discovery using natural language queries

  • tools/search: Alternative endpoint for tool search (alias for tools/find)

  • tasks/get: Get current task status

  • tasks/list: List all tasks

  • tasks/cancel: Cancel a running task

  • tasks/result: Wait for task completion and get result

Implementation Details:

  • Uses FastMCP’s middleware system instead of request handler patching

  • Implements custom middleware methods for tools/find and tools/search

  • Adds MCP Tasks protocol support for long-running tool operations

  • Standard MCP methods (tools/list, tools/call) are handled by FastMCP

  • Implements proper error handling and JSON-RPC 2.0 compliance

Notes:

This method is called automatically during SMCP initialization and should not be called manually.

_get_valid_categories()[source]

Get valid tool categories from ToolUniverse.

_load_tools_with_filters(tool_type=None)[source]

Load tools with the common set of filter parameters.

Centralizes the repeated pattern of calling load_tools with the same exclude/include/tools_file/config kwargs used across _setup_smcp_tools.

_ensure_compact_mode_categories()[source]

Load tool discovery categories required for compact mode.

_load_by_categories()[source]

Load tools for the requested categories with validation and fallback.

async _tools_find_middleware(context, call_next)[source]

Middleware for handling tools/find and tools/search requests.

This middleware intercepts tools/find and tools/search requests and provides AI-powered tool discovery functionality.

async _handle_tools_find(request_id, params)[source]

Handle the custom tools/find MCP method.

Searches for tools by natural language query and returns a JSON-RPC 2.0 response in either detailed (default) or mcp_standard format.

async _ensure_task_manager()[source]

Start the task manager if it has not been started yet.

async handle_tasks_get(task_id, auth_context=None)[source]

Get current task status.

async handle_tasks_list(auth_context=None, cursor=None)[source]

List all tasks.

async handle_tasks_cancel(task_id, auth_context=None)[source]

Cancel a running task.

async handle_tasks_result(task_id, auth_context=None, timeout=None)[source]

Wait for task completion and return its result.

Execute tool search using the most appropriate search method available.

Simplified unified interface that leverages the consistent tool interfaces. All search tools now return JSON format directly.

Parameters:

querystr

Natural language query describing the desired tool functionality

categorieslist of str, optional

Tool categories to filter results by

limitint

Maximum number of tools to return

use_advanced_searchbool

Whether to prefer AI-powered search when available

search_methodstr, default ‘auto’

Specific search method: ‘auto’, ‘llm’, ‘embedding’, ‘keyword’

Returns:

str

JSON string containing search results

_select_search_tool(search_method, use_advanced_search)[source]

Select the appropriate search tool based on method and availability.

Returns:

Tool name to use for search

Return type:

str

_setup_smcp_tools()[source]

Initialize ToolUniverse tools, expose them as MCP tools, and set up search.

Handles: pre-loaded tool detection, category validation and loading with fallback, compact mode discovery categories, tool exposure to MCP, search initialization, and utility tool registration.

_expose_tooluniverse_tools()[source]

Convert and register loaded ToolUniverse tools as MCP-compatible tools.

Skips meta-tools (MCPAutoLoaderTool, MCPClientTool) and tracks already-exposed tools to prevent duplicates. Individual tool failures are logged but do not halt the process.

_expose_core_discovery_tools()[source]

Expose only core tool discovery tools in compact mode.

_add_search_tools()[source]

Register the find_tools MCP tool for AI-powered tool discovery.

Initializes the tool finder (ToolFinderLLM > Tool_RAG > keyword fallback) and registers a find_tools MCP tool that delegates to _perform_tool_search.

_init_tool_finder()[source]

Initialize the best available tool finder (LLM > RAG > keyword).

Sets self.tool_finder_available and self.tool_finder_type. Attempts to load the tool_finder category if no search tools are found among the already-loaded tools.

_add_utility_tools()[source]

Register utility tools (currently a no-op; execute_tool is a native ToolUniverse tool).

add_custom_tool(name, function, description=None, **kwargs)[source]

Add a custom Python function as an MCP tool.

Parameters:
  • name (str) – Unique tool name for the MCP interface.

  • function (Callable) – Sync or async callable to register.

  • description (str | None) – If provided, overrides the function’s docstring.

  • **kwargs – Additional FastMCP tool configuration options.

Returns:

The decorated function registered with FastMCP.

_get_tool_annotations(tool_config)[source]

Get MCP tool annotations from tool config.

Annotations should already be computed and stored in tool_config[‘mcp_annotations’] during tool registration. This method simply retrieves them, with a fallback to compute them if they’re missing (for backward compatibility).

Parameters:

tool_config (dict) – Tool configuration dictionary

Returns:

Dictionary with readOnlyHint and destructiveHint boolean values

Return type:

dict

async close()[source]

Gracefully shut down the SMCP server, stopping the task manager and thread pool.

_print_tooluniverse_banner()[source]

Print ToolUniverse branding banner after FastMCP banner with dynamic information.

run(*args, **kwargs)[source]

Override run method to display ToolUniverse banner after FastMCP banner.

This method intercepts the parent’s run() call to inject our custom banner immediately after FastMCP displays its startup banner.

run_simple(transport='http', host='0.0.0.0', port=7000, **kwargs)[source]

Start the SMCP server with the given transport.

Parameters:
  • transport (Literal['stdio', 'http', 'sse']) – Communication protocol - “stdio”, “http”, or “sse”.

  • host (str) – Bind address for HTTP/SSE transports.

  • port (int) – Port for HTTP/SSE transports.

  • **kwargs – Additional arguments passed to FastMCP’s run().

_SIMPLE_TYPE_MAP = {'array': <class 'list'>, 'boolean': typing.Union[bool, str], 'integer': typing.Union[int, str], 'number': typing.Union[float, str], 'object': <class 'dict'>, 'string': <class 'str'>}
static _resolve_oneof_type(param_info)[source]

Convert a JSON Schema oneOf spec to (python_type, field_kwargs_update).

Returns:

(python_type, extra_field_kwargs) where extra_field_kwargs may contain json_schema_extra with the oneOf schema.

Return type:

tuple

classmethod _resolve_param_type(param_info)[source]

Map a single JSON Schema parameter to (python_type, extra_field_kwargs).

Handles oneOf, simple types, array items cleanup, and nested object cleanup.

_create_mcp_tool_from_tooluniverse(tool_config, mcp_name=None)[source]

Create an MCP tool from a ToolUniverse tool configuration.

This method creates a function with proper parameter signatures that match the ToolUniverse tool schema, enabling FastMCP’s automatic parameter validation.

Parameters:
  • tool_config (Dict[str, Any]) – ToolUniverse tool configuration dictionary

  • mcp_name (str | None) – Optional shortened name for MCP exposure (if None, uses original name)

tooluniverse.create_smcp_server(name='SMCP Server', tool_categories=None, search_enabled=True, **kwargs)[source]

Create a configured SMCP server instance.

Convenience wrapper around SMCP(...) with sensible defaults.

Parameters:
  • name (str) – Human-readable server name.

  • tool_categories (List[str] | None) – ToolUniverse categories to load (None loads all).

  • search_enabled (bool) – Enable AI-powered tool discovery.

  • **kwargs – Additional SMCP / FastMCP configuration options.

Returns:

Configured SMCP server instance ready to run.

Return type:

SMCP

class tooluniverse.ToolUniverseClient[source]

Bases: object

Standalone client that mirrors ALL ToolUniverse methods via HTTP.

Uses __getattr__ magic to dynamically proxy any method call to the server. When you call client.some_method(**kwargs), it makes an HTTP POST to the server with the method name and arguments.

Benefits: - No need to update client when ToolUniverse changes - Standalone (only needs ‘requests’, no ToolUniverse package) - Automatic method discovery - Identical API to local ToolUniverse

Example

client = ToolUniverseClient(”http://localhost:8080”)

# These all work automatically: client.load_tools(tool_type=[‘uniprot’, ‘ChEMBL’]) prompts = client.prepare_tool_prompts(tool_list, mode=”prompt”) result = client.run_one_function(function_call_json)

# Tomorrow you add a new method to ToolUniverse? # It automatically works: client.your_new_method(param=”value”)

__init__(base_url='http://localhost:8080')[source]

Initialize client.

Parameters:

base_url (str) – Base URL of ToolUniverse HTTP API server

_get_available_methods()[source]

Fetch list of available methods from server (cached)

__getattr__(method_name)[source]

Magic method that intercepts attribute access.

When you call client.some_method(**kwargs), Python: 1. Looks for ‘some_method’ attribute - doesn’t find it 2. Calls this __getattr__(“some_method”) 3. We return a function that makes HTTP call 4. That function gets called with your arguments 5. HTTP request sent to server with method name + args 6. Server calls tu.some_method(**kwargs) 7. Result returned to client

This means ANY ToolUniverse method works automatically! No need to define methods in this class.

list_available_methods()[source]

List all available ToolUniverse methods from the server.

Returns:

  • name: Method name

  • parameters: List of parameter info

  • docstring: Method documentation

Return type:

List of method information dicts with

Example

methods = client.list_available_methods() for m in methods:

print(f”{m[‘name’]}: {m[‘docstring’]}”)

help(method_name=None)[source]

Get help about available methods.

Parameters:

method_name (str | None) – Optional specific method to get help for. If None, lists all methods.

Example

client.help() # List all methods client.help(“load_tools”) # Help for specific method

reset_server(config=None)[source]

Reset the ToolUniverse instance on the server.

Parameters:

config (Dict[str, Any] | None) – Optional configuration for the new instance

Example

client.reset_server() # Reset with default config client.reset_server({“log_level”: “DEBUG”}) # With custom config

health_check()[source]

Check server health status.

Returns:

Health status information

Return type:

Dict[str, Any]

close()[source]

Close the HTTP session.

__enter__()[source]

Context manager entry.

__exit__(exc_type, exc_val, exc_tb)[source]

Context manager exit.

class tooluniverse.ADAStandardsTool[source]

Bases: BaseTool

American Diabetes Association (ADA) Standards of Care tools.

Supports three operations: - list_sections: List all sections of the current ADA Standards of Care - search: Search ADA guidelines by topic via PubMed - get_section: Fetch content of a specific ADA Standards section via PMC

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_list_sections(arguments)[source]

List all sections of the current ADA Standards of Care via PubMed.

Search ADA guidelines by topic using PubMed.

_get_section(arguments)[source]

Fetch content of a specific ADA Standards section via PMC.

class tooluniverse.ADMETAITool[source]

Bases: BaseTool

Tool to predict ADMET properties for a given SMILES string using the admet-ai Python package.

__init__(**kwargs)[source]
_predict(smiles)[source]

Gets ADMET predictions for the given smiles

run(arguments)[source]

Predicts ADMET properties for a given SMILES string.

Parameters:

smiles – The SMILES string(s) of the molecule(s).

Returns

A dictionary mapping each SMILES string to a subdictionary of selected ADMET properties and their predicted values.

class tooluniverse.AHAACCGuidelineTool[source]

Bases: BaseTool

American Heart Association (AHA) and American College of Cardiology (ACC) guideline tools. Uses PubMed to search and list clinical practice guidelines.

Supports three operations: - search: Search AHA/ACC guidelines by topic - list_aha: List recent AHA guidelines - list_acc: List recent ACC guidelines

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

Search AHA/ACC guidelines by topic.

_get_guideline(arguments)[source]

Fetch full text of an AHA/ACC guideline from PMC by PMID.

_list_org(arguments, org_name)[source]

List recent guidelines from a specific organization.

class tooluniverse.AgenticTool[source]

Bases: BaseTool

Generic wrapper around LLM prompting supporting JSON-defined configs with prompts and input arguments.

STREAM_FLAG_KEY = '_tooluniverse_stream'
static has_any_api_keys()[source]

Check if any API keys are available across all supported API types.

Returns

bool: True if at least one API type has all required keys, False otherwise

__init__(tool_config)[source]
_get_global_fallback_chain()[source]

Get the global fallback chain from environment or use default.

_try_initialize_api()[source]

Try to initialize the primary API, fallback to secondary if configured.

_try_api(api_type, model_id, server_url=None)[source]

Try to initialize a specific API and model.

_validate_model_config()[source]
run(arguments, stream_callback=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

static _iter_chunks(text, size=800)[source]
_emit_stream_chunk(chunk, stream_callback)[source]
_validate_arguments(arguments)[source]
_format_prompt(arguments)[source]
get_prompt_preview(arguments)[source]
get_model_info()[source]
is_available()[source]

Check if the tool is available for use.

get_availability_status()[source]

Get detailed availability status of the tool.

retry_initialization()[source]

Attempt to reinitialize the tool (useful if API keys were updated).

get_prompt_template()[source]
get_input_arguments()[source]
validate_configuration()[source]
estimate_token_usage(arguments)[source]
class tooluniverse.AllenBrainTool[source]

Bases: BaseTool

Tool for querying the Allen Brain Atlas REST API.

Provides access to: - Gene information and expression datasets - Brain structure ontology (mouse and human) - Section data sets for gene expression images - Spatial expression quantification

The API uses RMA (RESTful Model Access) query syntax. No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Allen Brain Atlas API call.

_make_rma_query(criteria, num_rows=50, start_row=0, include=None)[source]

Execute an RMA query against the Allen Brain Atlas API.

_search_genes(arguments)[source]

Search for genes by acronym or name.

_search_structures(arguments)[source]

Search for brain structures by acronym or name.

_get_expression_data(arguments)[source]

Get gene expression data sets for a gene.

_get_structure_by_id(arguments)[source]

Get a brain structure by its numeric ID.

class tooluniverse.AllianceGenomeTool[source]

Bases: BaseTool

Tool for querying the Alliance of Genome Resources API.

Provides cross-species gene information across 7 model organisms (yeast, fly, worm, zebrafish, rat, mouse, frog) plus human. Supports gene detail, disease associations, phenotypes, and search.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Alliance of Genome Resources API call.

_query(arguments)[source]

Route to the appropriate Alliance endpoint.

_get_gene_detail(arguments)[source]

Get detailed gene information from Alliance.

_search_genes(arguments)[source]

Search for genes across all model organisms.

_get_gene_phenotypes(arguments)[source]

Get phenotype annotations for a gene.

_get_disease_genes(arguments)[source]

Get genes associated with a disease by Disease Ontology ID.

_get_disease_detail(arguments)[source]

Get disease summary information by Disease Ontology ID.

_get_gene_orthologs(arguments)[source]

Get ortholog genes across species for a given gene.

_get_gene_alleles(arguments)[source]

Get alleles and variants for a gene.

_get_gene_expression_summary(arguments)[source]

Get expression summary (ribbon) for a gene.

_get_gene_interactions(arguments)[source]

Get molecular or genetic interactions for a gene.

_get_gene_disease_models(arguments)[source]

Get disease models involving a gene.

_get_allele_detail(arguments)[source]

Get detailed information about a specific allele.

class tooluniverse.AlphaFoldRESTTool[source]

Bases: BaseTool

AlphaFold Protein Structure Database API tool. Generic wrapper for AlphaFold API endpoints from alphafold_tools.json.

__init__(tool_config)[source]
_build_url(arguments)[source]
_make_request(url)[source]

Perform a GET request and handle common errors.

run(arguments)[source]

Execute the tool with provided arguments.

class tooluniverse.AlphaMissenseTool[source]

Bases: BaseTool

Tool for querying AlphaMissense pathogenicity predictions.

AlphaMissense uses deep learning trained on evolutionary data to predict the pathogenicity of all possible single amino acid substitutions in human proteins.

Classification thresholds: - Pathogenic: score > 0.564 - Ambiguous: 0.34 <= score <= 0.564 - Benign: score < 0.34

No authentication required. Free for academic/research use.

PATHOGENIC_THRESHOLD = 0.564
BENIGN_THRESHOLD = 0.34
__init__(tool_config)[source]
run(arguments)[source]

Execute the AlphaMissense API call.

_classify_score(score)[source]

Classify pathogenicity based on AlphaMissense thresholds.

_get_protein_scores(arguments)[source]

Get AlphaMissense scores for a protein by UniProt ID.

Note: The AlphaMissense API requires querying individual residue positions. This method demonstrates access to the data by sampling the first position. For complete protein-wide analysis, use get_residue_scores for each position.

_get_variant_score(arguments)[source]

Get AlphaMissense pathogenicity score for a specific variant.

Variant format: p.X123Y where X is reference amino acid, 123 is position, and Y is the variant amino acid.

_get_residue_scores(arguments)[source]

Get AlphaMissense scores for all possible substitutions at a specific residue.

Returns scores for all 20 amino acid substitutions at the given position.

class tooluniverse.ArXivPDFSnippetsTool[source]

Bases: BaseTool

Fetch an arXiv paper’s PDF and return bounded text snippets around user-provided terms. Uses markitdown to convert PDF to markdown text.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.ArXivTool[source]

Bases: BaseTool

Search arXiv for papers by keyword using the public arXiv API.

__init__(tool_config, base_url='http://export.arxiv.org/api/query')[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_respect_rate_limit()[source]

arXiv asks clients to avoid rapid-fire requests; keep a 3s gap.

class tooluniverse.ArrayExpressRESTTool[source]

Bases: BaseTool

ArrayExpress REST API tool - Original ArrayExpress Database.

Accesses the official ArrayExpress functional genomics database. ArrayExpress is the authoritative source for gene expression data, microarray experiments, and RNA-seq studies from EBI.

The database infrastructure uses BioStudies backend for improved performance and integration, but this tool specifically queries the ArrayExpress collection to maintain the original data source.

__init__(tool_config)[source]
_build_url(args)[source]

Build URL from endpoint template and arguments (BioStudies API)

_build_params(args)[source]

Build query parameters for BioStudies API

run(arguments)[source]

Execute the BioStudies API call for ArrayExpress data

_extract_files_from_section(section)[source]

Extract files from a BioStudies section

_extract_samples_from_section(section)[source]

Extract sample information from a BioStudies section

class tooluniverse.BRENDATool[source]

Bases: BaseTool

Tool for querying BRENDA enzyme database.

BRENDA provides: - Enzyme kinetic parameters (Km, kcat, Ki) - Substrate/product information - Enzyme inhibitors and activators - Organism-specific data

Uses BRENDA SPARQL endpoint. No authentication required.

__init__(tool_config)[source]
_make_sparql_query(query)[source]

Execute a SPARQL query against BRENDA endpoint.

run(arguments)[source]

Execute BRENDA API call based on operation type.

_get_km(arguments)[source]

Get Km (Michaelis constant) values for an enzyme.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - ec_number: EC number (e.g., 1.1.1.1 for alcohol dehydrogenase) - organism: Optional organism filter

_get_kcat(arguments)[source]

Get kcat (turnover number) values for an enzyme.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - ec_number: EC number - organism: Optional organism filter

_get_inhibitors(arguments)[source]

Get inhibitor data for an enzyme.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - ec_number: EC number - organism: Optional organism filter

_get_enzyme_info(arguments)[source]

Get general enzyme information by EC number.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - ec_number: EC number

class tooluniverse.BVBRCTool[source]

Bases: BaseTool

Tool for querying the BV-BRC pathogen genomics database.

BV-BRC provides comprehensive pathogen genome data including genome metadata, antimicrobial resistance phenotypes, and annotated genome features. Covers bacteria and viruses with rich AMR surveillance data.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the BV-BRC API call.

_query(arguments)[source]

Route to appropriate query method.

_build_query_string(conditions, limit=25, select_fields=None)[source]

Build BV-BRC SOLR-like query string.

_make_request(endpoint, query)[source]

Make a request to BV-BRC API.

_get_genome(arguments)[source]

Get a specific genome by ID.

_search_genomes(arguments)[source]

Search for genomes by keyword.

_search_amr(arguments)[source]

Search for antimicrobial resistance data.

_search_features(arguments)[source]

Search for genome features (genes, CDS).

_search_epitopes(arguments)[source]

Search for pathogen epitopes (B-cell and T-cell).

_search_surveillance(arguments)[source]

Search influenza/pathogen surveillance data.

_search_specialty_genes(arguments)[source]

Search for specialty genes (virulence factors, AMR genes, drug targets).

_get_protein_structure(arguments)[source]

Get a specific protein structure by PDB ID.

_search_protein_structures(arguments)[source]

Search for pathogen protein structures.

_get_taxonomy(arguments)[source]

Get taxonomy details by taxon ID.

_search_taxonomy(arguments)[source]

Search pathogen taxonomy.

_search_pathways(arguments)[source]

Search for metabolic pathways in pathogen genomes.

_search_subsystems(arguments)[source]

Search for functional subsystems in pathogen genomes.

class tooluniverse.BaseMCPClient[source]

Bases: object

Base MCP client with common functionality shared between MCPClientTool and MCPAutoLoaderTool. Provides session management, request handling, and async cleanup patterns.

__init__(server_url, transport='http', timeout=30)[source]
async _close_session()[source]

Placeholder for compatibility; HTTP client calls are scoped per request.

_get_mcp_endpoint(path)[source]

Get the full MCP endpoint URL

async _make_mcp_request(method, params=None)[source]

Make an MCP JSON-RPC request

_run_with_cleanup(async_func)[source]

Common async execution pattern with proper cleanup

class tooluniverse.BasePythonExecutor[source]

Bases: object

Base class for Python execution tools with shared security features.

SAFE_BUILTINS = {'__import__', 'abs', 'all', 'any', 'bool', 'callable', 'dict', 'enumerate', 'filter', 'float', 'getattr', 'hasattr', 'int', 'isinstance', 'len', 'list', 'map', 'max', 'min', 'print', 'range', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'str', 'sum', 'tuple', 'type', 'zip'}
DEFAULT_ALLOWED_MODULES = {'collections', 'dataclasses', 'datetime', 'decimal', 'fractions', 'itertools', 'json', 'math', 'matplotlib', 'numpy', 'random', 're', 'scipy', 'statistics', 'sympy', 'typing'}
FORBIDDEN_AST_NODES = {'Attribute': ['__import__', 'open', 'file'], 'Call': ['open', 'eval', 'exec', 'compile', '__import__', 'input', 'raw_input'], 'Import': ['os', 'sys', 'subprocess', 'socket', 'urllib', 'requests', 'http']}
__init__(tool_config)[source]

Initialize the executor with tool configuration.

_check_ast_safety(code)[source]

Check code AST for dangerous operations.

Returns:

(is_safe, warnings)

Return type:

tuple[bool, List[str]]

_create_safe_globals(additional_vars=None)[source]

Create a safe globals dictionary with restricted builtins.

_capture_output(func, *args, **kwargs)[source]

Capture stdout and stderr during function execution.

_handle_timeout(signum, frame)[source]

Handle execution timeout.

_execute_with_timeout(func, timeout_seconds, *args, **kwargs)[source]

Execute function with timeout using signal or threading.

_format_error_response(error, error_type, stdout='', stderr='', execution_time=0)[source]

Format error response with detailed information.

_format_success_response(result, stdout, stderr, execution_time, code_lines=0, ast_warnings=None)[source]

Format success response with execution details.

_get_package_to_install(package)[source]

Get the actual package name to install (parent package for submodules)

_check_and_install_dependencies(dependencies, auto_install=False, require_confirmation=True)[source]

Check and optionally install missing dependencies with user confirmation.

class tooluniverse.BaseRESTTool[source]

Bases: BaseTool

Base class for REST API tools with common HTTP request handling.

Provides reusable methods for: - Building URLs with path parameters (e.g., {id}, {doi}) - Constructing query parameters - Making HTTP requests with retry logic - Standard error handling and response formatting

Subclasses should override: - _get_param_mapping() - to customize parameter name mappings - _process_response() - to customize response processing - _handle_special_endpoint() - for endpoint-specific logic

__init__(tool_config)[source]
_get_param_mapping()[source]

Get parameter name mappings from argument names to API parameter names.

Override this in subclasses to provide custom mappings. Example: {“limit”: “rows”, “query”: “q”}

_build_url(args)[source]

Build URL by replacing path parameters like {id}, {doi}, {accession}.

Parameters:

args (Dict[str, Any]) – Tool arguments dictionary

Returns:

Complete URL with path parameters substituted

Return type:

str

_build_params(args)[source]

Build query parameters from arguments.

Parameters:

args (Dict[str, Any]) – Tool arguments dictionary

Returns:

Query parameters dictionary

Return type:

Dict[str, Any]

_process_response(response, url)[source]

Process successful API response.

Override this in subclasses for API-specific response handling.

Parameters:
  • response (Response) – HTTP response object

  • url (str) – Request URL

Returns:

Processed response dictionary

Return type:

Dict[str, Any]

_handle_special_endpoint(url, response, arguments)[source]

Handle special endpoints that need custom processing.

Override this for endpoint-specific logic (e.g., download endpoints). Return None to use default processing.

Parameters:
  • url (str) – Request URL

  • response (Response) – HTTP response object

  • arguments (Dict[str, Any]) – Original arguments

Returns:

Custom result dictionary or None for default processing

Return type:

Dict[str, Any] | None

run(arguments)[source]

Execute the API request.

Parameters:

arguments (Dict[str, Any]) – Tool arguments dictionary

Returns:

Result dictionary with status, data, url, and optional error info

Return type:

Dict[str, Any]

class tooluniverse.BgeeTool[source]

Bases: BaseTool

Tool for querying the Bgee gene expression database.

Bgee integrates expression data from multiple data types (RNA-Seq, Affymetrix, EST, in situ hybridization) and provides curated present/absent expression calls across tissues and developmental stages.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Bgee API call.

_query(arguments)[source]

Route to appropriate Bgee endpoint.

Search for genes by name or symbol across species.

_gene_expression(arguments)[source]

Get expression data for a gene across tissues/organs.

_species_list(arguments)[source]

List all species available in Bgee.

class tooluniverse.BiGGModelsTool[source]

Bases: BaseTool

BiGG Models API tool for metabolic modeling.

Provides access to: - Genome-scale metabolic models (85+ organisms) - Reactions, metabolites, and genes - Universal reaction/metabolite databases - Model downloads in multiple formats

__init__(tool_config)[source]
run(arguments)[source]

Execute the BiGG Models API tool.

_list_models(arguments)[source]

List all available metabolic models.

_get_model(arguments)[source]

Get details for a specific model.

_get_model_reactions(arguments)[source]

Get reactions in a model.

_get_model_metabolites(arguments)[source]

Get metabolites in a model.

_get_model_genes(arguments)[source]

Get genes in a model.

_get_reaction(arguments)[source]

Get reaction details.

_get_metabolite(arguments)[source]

Get metabolite details.

_get_gene(arguments)[source]

Get gene details from a model.

Search BiGG database.

_get_database_version(arguments)[source]

Get BiGG database version information.

class tooluniverse.BinaryDownloadTool[source]

Bases: BaseTool

Download binary files with chunked streaming.

Optimized for large binary files like images, videos, executables. Supports chunked downloads for better memory management.

Expects: {“url”: “https://…”, “output_path”: “/path/to/save”} Optional: {“chunk_size”: bytes, “timeout”: seconds} Returns: {“file_path”: “…”, “size”: bytes, “content_type”: “…”}

__init__(tool_config)[source]
run(arguments)[source]

Download binary file from URL.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing url and optional parameters

Returns:

Dictionary with file_path and metadata, or error

Return type:

Dict[str, Any]

class tooluniverse.BindingDBTool[source]

Bases: BaseTool

Tool for querying BindingDB binding affinity database.

BASE_URL = 'https://www.bindingdb.org/rest'
__init__(tool_config)[source]
run(arguments)[source]

Route to appropriate operation handler.

_get_ligands_by_uniprot(arguments)[source]

Get binding data for a single UniProt protein.

_get_ligands_by_uniprots(arguments)[source]

Get binding data for multiple UniProt proteins.

_get_ligands_by_pdb(arguments)[source]

Get binding data for proteins by PDB ID.

_get_targets_by_compound(arguments)[source]

Get binding targets for a compound by SMILES.

class tooluniverse.BioGRIDRESTTool[source]

Bases: BaseTool

BioGRID Database REST API tool. Generic wrapper for BioGRID API endpoints defined in ppi_tools.json.

__init__(tool_config)[source]
_build_url()[source]

Build URL for BioGRID API request.

_ORGANISM_MAP = {'homo sapiens': 9606, 'mus musculus': 10090, 'saccharomyces cerevisiae': 559292}
_LIST_PARAM_MAP = {'chemical_names': 'chemicalList', 'evidence_types': 'evidenceList', 'gene_names': 'geneList', 'ptm_type': 'ptmType', 'pubmed_ids': 'pubmedList'}
_build_params(arguments)[source]

Build parameters for BioGRID API request.

_make_request(url, params)[source]

Perform a GET request and handle common errors.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.BioImageArchiveTool[source]

Bases: BaseTool

Tool for querying the BioImage Archive at EBI.

Provides access to biological imaging datasets including fluorescence microscopy, cryo-EM, confocal imaging, and other life sciences imaging modalities. Supports searching studies and retrieving detailed metadata.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the BioImage Archive API call.

_query(arguments)[source]

Route to appropriate query method.

Search for biological imaging studies.

_get_study(arguments)[source]

Get detailed information about a specific study.

_search_bioimages(arguments)[source]

Search the BioImages-specific collection.

class tooluniverse.BioModelsRESTTool[source]

Bases: BaseRESTTool

Generic REST tool for BioModels API endpoints.

_get_param_mapping()[source]

Map BioModels-specific parameter names.

_handle_special_endpoint(url, response, arguments)[source]

Handle download endpoints specially.

_process_response(response, url)[source]

Process BioModels API response.

class tooluniverse.BioPortalTool[source]

Bases: BaseTool

Tool for querying BioPortal, the largest biomedical ontology repository.

BioPortal hosts 900+ ontologies covering diseases (DOID, MONDO), phenotypes (HPO), gene function (GO), chemicals (CHEBI), anatomy (UBERON), drugs (RXNORM), and more.

Supports: cross-ontology search, concept detail lookup, text annotation with ontology terms, and concept hierarchy traversal.

Uses public demo API key (no registration required).

__init__(tool_config)[source]
run(arguments)[source]

Execute the BioPortal API call.

_query(arguments)[source]

Route to appropriate BioPortal endpoint.

Search across all (or specific) ontologies for terms.

_get_concept(arguments)[source]

Get detailed information for a specific ontology concept.

_annotate_text(arguments)[source]

Annotate biomedical text with ontology terms (named entity recognition).

_get_hierarchy(arguments)[source]

Get children or ancestors of an ontology concept.

class tooluniverse.BioRxivTool[source]

Bases: BaseTool

Get bioRxiv or medRxiv preprint metadata by DOI.

This tool retrieves full metadata for a specific preprint using the bioRxiv API. For searching preprints by keywords, use EuropePMC_search_articles with ‘SRC:PPR’ filter instead.

Parameters:
  • doi (str) – bioRxiv or medRxiv DOI (e.g., ‘10.1101/2023.12.01.569554’ or ‘2023.12.01.569554’)

  • server (str) – Server name - ‘biorxiv’ or ‘medrxiv’ (default: ‘biorxiv’)

__init__(tool_config, base_url='https://api.biorxiv.org/details')[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.BioSamplesTool[source]

Bases: BaseTool

Tool for querying EBI BioSamples database.

Provides access to biological sample metadata including organism, tissue type, disease state, and links to associated data archives.

No authentication required for read access.

__init__(tool_config)[source]
run(arguments)[source]

Execute the BioSamples API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_get_sample(arguments)[source]

Get a specific biological sample by accession.

Search BioSamples by text query.

_search_by_filter(arguments)[source]

Search BioSamples with attribute filters.

class tooluniverse.BioStudiesRESTTool[source]

Bases: BaseTool

BioStudies REST API tool.

BioStudies is a general-purpose repository for biological studies at EMBL-EBI. It provides access to diverse study types including genomics, transcriptomics, proteomics, imaging, and more.

__init__(tool_config)[source]
_build_url(args)[source]

Build URL from arguments

_build_params(args)[source]

Build query parameters for BioStudies API

_convert_html_to_markdown(html_content, url)[source]

Convert HTML content to Markdown using markitdown

run(arguments)[source]

Execute the BioStudies API call

_extract_files(data)[source]

Extract file list from BioStudies response

_extract_files_from_section(section)[source]

Extract files from a BioStudies section (recursive)

class tooluniverse.Boltz2DockingTool[source]

Bases: BaseTool

Tool to perform protein-ligand docking and affinity prediction using the local Boltz-2 model. This tool constructs a YAML input file, runs the boltz predict command, and parses the output to return the predicted structure and affinity.

__init__(tool_config)[source]

Initializes the BoltzDockingTool. Checks if the ‘boltz’ command is available in the system’s PATH.

_build_yaml_input(arguments)[source]

Constructs the YAML data structure for the Boltz input.

run(arguments=None, timeout=1200)[source]

Executes the Boltz prediction.

Parameters:
  • arguments (dict) – A dictionary containing the necessary inputs. - protein_sequence (str): The amino acid sequence of the protein. - ligands (list[dict]): A list of ligands, each with a ‘smiles’ or ‘ccd’ key. - constraints (list[dict], optional): Covalent bonds or other constraints. - templates (list[dict], optional): Structural templates. - other optional boltz CLI flags (e.g., ‘recycling_steps’).

  • timeout (int) – The maximum time in seconds to wait for the Boltz command to complete.

Returns

dict: A dictionary containing the path to the predicted structure and affinity data, or an error.

class tooluniverse.CADDTool[source]

Bases: BaseTool

Tool for querying CADD API for variant deleteriousness scores.

CADD integrates diverse annotations into a single metric (PHRED score) by contrasting variants that survived natural selection with simulated mutations.

PHRED score interpretation: - >= 10: Top 10% most deleterious (likely damaging) - >= 20: Top 1% most deleterious (damaging) - >= 30: Top 0.1% most deleterious (highly damaging) - Common pathogenic threshold: 15-20

Supported genome builds: GRCh37, GRCh38 Current version: v1.7

No authentication required. API is experimental.

DEFAULT_VERSION = 'GRCh38-v1.7'
__init__(tool_config)[source]
run(arguments)[source]

Execute the CADD API call.

_interpret_phred(phred)[source]

Interpret PHRED score for user-friendly output.

_get_variant_score(arguments)[source]

Get CADD score for a specific SNV.

Query format: chrom:pos_ref_alt (e.g., 7:140453136_A_T for BRAF V600E)

_get_position_scores(arguments)[source]

Get CADD scores for all possible SNVs at a genomic position.

Returns scores for A, C, G, T substitutions at the given position.

_get_range_scores(arguments)[source]

Get CADD scores for a genomic range (max 100bp).

Returns all pre-computed scores in the specified range.

class tooluniverse.CATHTool[source]

Bases: BaseTool

Tool for querying the CATH protein structure classification database.

CATH classifies protein domain structures into a hierarchy: Class -> Architecture -> Topology -> Homologous superfamily. Covers 500,000+ domains from PDB and AFDB structures.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the CATH API call.

_query(arguments)[source]

Route to appropriate CATH endpoint.

_get_superfamily(arguments)[source]

Get CATH superfamily information by CATH ID.

_get_domain_summary(arguments)[source]

Get domain summary for a CATH domain ID (PDB chain domain).

class tooluniverse.CBioPortalRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
_build_url(args)[source]
_get_gene_entrez_ids(gene_symbols)[source]

Convert gene symbols to Entrez IDs

_get_mutation_profile_id(study_id)[source]

Get the mutation molecular profile ID for a study

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.CDCRESTTool[source]

Bases: BaseTool

CDC Data.CDC.gov REST API tool (Socrata-based open data portal).

__init__(tool_config)[source]
_build_url(arguments)[source]

Build the full CDC Data API URL with path parameters and query string.

_make_request(arguments)[source]

Make HTTP request to CDC Data API.

run(arguments)[source]

Execute the CDC Data tool.

class tooluniverse.CELLxGENECensusTool[source]

Bases: BaseTool

CELLxGENE Census API tool for accessing single-cell RNA-seq data. Provides access to cell metadata, gene expression, and embeddings.

run(arguments)[source]

Execute the tool with given arguments.

_get_census_versions()[source]

Get list of available Census versions.

_get_obs_metadata(arguments, census_version)[source]

Get observation (cell) metadata.

_get_var_metadata(arguments, census_version)[source]

Get variable (gene) metadata.

_get_anndata(arguments, census_version)[source]

Get expression data as AnnData object summary.

_get_presence_matrix(arguments, census_version)[source]

Get feature presence matrix.

_get_embeddings(arguments, census_version)[source]

Get pre-calculated embeddings.

_download_h5ad(arguments, census_version)[source]

Download source H5AD file.

class tooluniverse.CellPaintingTool[source]

Bases: BaseTool

Tool for querying Cell Painting datasets hosted on the Image Data Resource (IDR).

Provides access to: - Available Cell Painting screens (studies) - Plates within a screen - Well-level metadata and image links for a plate

__init__(tool_config)[source]
run(arguments)[source]

Execute the Cell Painting IDR tool with given arguments.

_make_request(path, params=None)[source]

Make a GET request to the IDR API.

_search_screens(arguments)[source]

List available Cell Painting screens in IDR, optionally filtered by keyword.

_get_screen_plates(arguments)[source]

Get plates belonging to a given screen.

_get_well_data(arguments)[source]

Get well-level metadata and image links for a plate.

class tooluniverse.CIViCTool[source]

Bases: BaseTool

Tool for querying CIViC (Clinical Interpretation of Variants in Cancer).

CIViC provides: - Expert-curated cancer variant interpretations - Clinical evidence levels - Drug-variant associations - Disease-variant associations

Uses GraphQL API. No authentication required. Free for academic/research use.

__init__(tool_config)[source]
_build_graphql_query(arguments)[source]

Build GraphQL query from template and arguments.

run(arguments)[source]

Execute the CIViC GraphQL API call.

class tooluniverse.CMAGuidelinesTool[source]

Bases: BaseTool

Canadian clinical practice guidelines search tool. Searches PubMed for Canadian clinical practice guidelines published by Canadian healthcare organizations including CMA, Canadian Task Force, and others.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_search_cma_guidelines(query, limit)[source]

Search Canadian clinical guidelines via PubMed.

_extract_guideline_content(url)[source]

Extract actual content from a guideline URL.

class tooluniverse.COSMICTool[source]

Bases: BaseTool

Tool for querying COSMIC (Catalogue of Somatic Mutations in Cancer).

COSMIC provides: - Somatic mutation data in human cancers - Gene-level mutation information - Mutation coordinates and amino acid changes - Associated cancer types

Uses NLM Clinical Tables API. No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the COSMIC API call based on operation type.

_search_mutations(arguments)[source]

Search COSMIC for mutations by term.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - terms: Search query (gene name, mutation, etc.) - max_results: Maximum results to return (default 20, max 500) - genome_build: Genome build version (37 or 38, default 37)

_get_mutations_by_gene(arguments)[source]

Get all mutations for a specific gene.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - gene: Gene symbol (e.g., BRAF, TP53) - max_results: Maximum results (default 100, max 500) - genome_build: Genome build version (37 or 38)

class tooluniverse.CTDTool[source]

Bases: BaseTool

Tool for querying the Comparative Toxicogenomics Database (CTD).

CTD curates chemical-gene, chemical-disease, and gene-disease relationships from peer-reviewed literature. Supports queries by chemical names, gene symbols, disease names, or their standard identifiers.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the CTD batch query API call.

_query(arguments)[source]

Execute a CTD batch query and return structured results.

class tooluniverse.CTFPHCListGuidelinesTool[source]

Bases: BaseTool

List all published guidelines from the Canadian Task Force on Preventive Health Care (CTFPHC). Fetches the official published-guidelines index page and returns title, URL, and year for each guideline.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.CTFPHCSearchGuidelinesTool[source]

Bases: BaseTool

Search published guidelines from the Canadian Task Force on Preventive Health Care (CTFPHC) by keyword. Fetches the official index and filters client-side by title match.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.CTGovAPITool[source]

Bases: BaseRESTTool

Tool for querying the ClinicalTrials.gov API v2.

Provides access to 572,000+ clinical trial records including: - Study protocol information (design, eligibility, interventions) - Recruitment status and enrollment data - Results and outcome measures - Sponsor and contact information

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the ClinicalTrials.gov API call.

_query(arguments)[source]

Route to the appropriate endpoint.

_search_studies(arguments)[source]

Search for clinical trials with various filters.

_get_study(arguments)[source]

Get full details for a single study by NCT ID.

_get_stats_size()[source]

Get aggregate statistics about the ClinicalTrials.gov database.

_get_field_values(arguments)[source]

Get value distribution for a specific field across studies.

class tooluniverse.CellosaurusGetCellLineInfoTool[source]

Bases: BaseTool

Tool to get detailed information about a specific cell line using its accession number.

__init__(tool_config, base_url='https://api.cellosaurus.org')[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_get_cell_line_info(accession, format_type, fields)[source]

Get detailed cell line information by accession number.

class tooluniverse.CellosaurusQueryConverterTool[source]

Bases: BaseTool

Tool to convert natural language queries to Solr syntax for Cellosaurus API.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_calculate_similarity(term, text)[source]

Calculate similarity between a term and text using SequenceMatcher.

_map_term_to_field(term)[source]

Map a natural language term to Cellosaurus fields based on semantic similarity.

_extract_field_terms(query)[source]

Extract field-specific terms from the query using semantic mapping.

_apply_boolean_operators(query)[source]

Convert natural language boolean operators to Solr syntax.

_apply_range_queries(query)[source]

Convert natural language ranges to Solr range syntax.

_apply_wildcards(query)[source]

Convert natural language wildcard patterns to Solr syntax.

_construct_solr_query(terms, original_query)[source]

Construct the final Solr query from extracted terms.

_validate_solr_query(query)[source]

Basic validation of Solr query syntax.

_convert_query(natural_query, include_explanation=True)[source]

Convert natural language query to Solr syntax using systematic field mapping.

class tooluniverse.CellosaurusSearchTool[source]

Bases: BaseTool

Tool to search Cellosaurus cell lines using the official API.

__init__(tool_config, base_url='https://api.cellosaurus.org')[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_search_cell_lines(query, offset, size)[source]

Search Cellosaurus cell lines using the /search/cell-line endpoint.

class tooluniverse.CellxGeneDiscoveryTool[source]

Bases: BaseTool

Tool for CZI CellxGene Discovery API providing access to single-cell RNA-seq datasets and curated collections.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the CellxGene Discovery API call.

_query(arguments)[source]

Route to appropriate endpoint.

_list_collections(arguments)[source]

List curated single-cell collections.

_get_collection(arguments)[source]

Get detailed collection information with datasets.

_search_datasets(arguments)[source]

Search single-cell datasets by tissue, disease, or organism.

class tooluniverse.ChEBITool[source]

Bases: BaseTool

Tool for querying ChEBI (Chemical Entities of Biological Interest).

Provides compound lookup, text search, and ontology navigation for small molecules of biological relevance.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the ChEBI API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_get_compound(arguments)[source]

Get detailed compound information by ChEBI ID.

Search ChEBI by name, formula, or keyword using advanced search.

_ontology_children(arguments)[source]

Get ontology children of a ChEBI compound.

class tooluniverse.ChEMBLRESTTool[source]

Bases: BaseTool

Generic ChEMBL REST API tool. Wrapper for ChEMBL API endpoints defined in chembl_tools.json. Supports all ChEMBL data resources: molecules, targets, assays, activities, drugs, etc.

__init__(tool_config)[source]
_build_url(args)[source]

Build URL from endpoint template and arguments

_build_params(args)[source]

Build query parameters for ChEMBL API

run(arguments)[source]

Execute the ChEMBL API call

class tooluniverse.ChEMBLTool[source]

Bases: BaseTool

Tool to search for molecules similar to a given compound name or SMILES using the ChEMBL Web Services API.

Note: This tool is designed for small molecule compounds only. Biologics (antibodies, proteins, oligonucleotides, etc.) do not have SMILES structures and cannot be used for structure-based similarity search. The tool will provide detailed error messages when biologics are queried, explaining the reason and suggesting alternative tools.

__init__(tool_config, base_url='https://www.ebi.ac.uk/chembl/api/data')[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

get_chembl_id_by_name(compound_name)[source]

Search ChEMBL for a compound by name and return the ChEMBL ID of the first match.

get_smiles_pref_name_by_chembl_id(query)[source]

Given a ChEMBL ID, return a dict with canonical SMILES and preferred name.

get_chembl_smiles_pref_name_id_by_name(compound_name)[source]

Search ChEMBL for a compound by name and return a list of dicts with ChEMBL ID, canonical SMILES, and preferred name for the top 5 matches.

_search_similar_molecules(query, similarity_threshold, max_results)[source]
class tooluniverse.ChIPAtlasTool[source]

Bases: BaseTool

ChIP-Atlas API tool for accessing chromatin data. Provides enrichment analysis, peak browsing, and dataset search.

run(arguments)[source]

Execute the tool with given arguments.

_enrichment_analysis(arguments)[source]

Perform enrichment analysis on genomic regions, motifs, or gene lists. Identifies proteins bound to input regions more often than expected.

_get_experiment_list(arguments)[source]

Get metadata for all ChIP-Atlas experiments.

Note: The experimentList.tab file is 344MB+ (433k+ experiments). This method provides guidance on accessing the data rather than downloading.

_get_peak_data(arguments)[source]

Get URL for peak-call data (BigWig or BED format).

_search_datasets(arguments)[source]

Search for datasets by antigen or cell type.

class tooluniverse.ClinGenARTool[source]

Bases: BaseTool

Tool for querying the ClinGen Allele Registry.

The Allele Registry normalizes variant nomenclature and provides canonical allele identifiers (CA IDs) that link to ClinVar, dbSNP, COSMIC, gnomAD, and other variant databases. Supports HGVS notation lookup and external record retrieval.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the ClinGen Allele Registry API call.

_query(arguments)[source]

Route to appropriate ClinGen AR endpoint.

_lookup_allele(arguments)[source]

Look up a variant by HGVS notation.

_get_external_records(arguments)[source]

Get external database records for a canonical allele ID.

class tooluniverse.ClinGenDosageTool[source]

Bases: BaseTool

ClinGen Dosage Sensitivity JSON API tool.

Uses the search.clinicalgenome.org/api/dosage endpoint which returns structured JSON with detailed dosage sensitivity curations.

__init__(tool_config)[source]
run(arguments)[source]

Route to operation handler based on config.

_dosage_by_gene(arguments)[source]

Search ClinGen dosage sensitivity curations by gene symbol.

Search dosage curations by genomic region.

class tooluniverse.ClinGenTool[source]

Bases: BaseTool

ClinGen Database REST API tool.

Provides access to ClinGen curated data including gene-disease validity, dosage sensitivity, and clinical actionability.

__init__(tool_config)[source]
run(arguments)[source]

Route to operation handler based on config.

_get_gene_validity(arguments)[source]

Get all gene-disease validity curations from ClinGen.

_search_gene_validity(arguments)[source]

Search gene-disease validity curations by gene symbol.

_get_dosage_sensitivity(arguments)[source]

Get all dosage sensitivity curations from ClinGen.

_search_dosage_sensitivity(arguments)[source]

Search dosage sensitivity curations by gene symbol.

_get_actionability_adult(arguments)[source]

Get clinical actionability curations for adult context.

_get_actionability_pediatric(arguments)[source]

Get clinical actionability curations for pediatric context.

_get_actionability(arguments, context)[source]

Get clinical actionability curations for a specific context.

_search_actionability(arguments)[source]

Search clinical actionability across both adult and pediatric contexts.

_get_variant_classifications(arguments)[source]

Get variant pathogenicity classifications from ClinGen Evidence Repository.

_parse_csv(csv_text)[source]

Parse CSV text into list of dictionaries.

Handles ClinGen’s special CSV format which has metadata headers before the actual data rows.

class tooluniverse.ClinVarGetClinicalSignificance[source]

Bases: ClinVarRESTTool

Get clinical significance information for variants.

__init__(tool_config)[source]
run(arguments)[source]

Get clinical significance by variant ID.

class tooluniverse.ClinVarGetVariantDetails[source]

Bases: ClinVarRESTTool

Get detailed variant information by ClinVar ID.

__init__(tool_config)[source]
run(arguments)[source]

Get variant details by ClinVar ID.

class tooluniverse.ClinVarRESTTool[source]

Bases: BaseTool

Base class for ClinVar REST API tools.

__init__(tool_config)[source]
_make_request(endpoint, params=None, max_retries=3)[source]

Make a request to the ClinVar API with automatic retry for rate limiting.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.ClinVarSearchVariants[source]

Bases: ClinVarRESTTool

Search for variants in ClinVar by gene or condition.

__init__(tool_config)[source]
run(arguments)[source]

Search variants by gene or condition.

class tooluniverse.ClinicalTrialsDetailsTool[source]

Bases: ClinicalTrialsTool

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_simplify_output(study, query_type)[source]

Manually extract generally most useful information

_extract_outcomes_from_output(study, outcome_measure)[source]
_extract_safety_from_output(study, organs, adverse_event_type)[source]
_remove_empty_values(obj)[source]
class tooluniverse.ClinicalTrialsGovTool[source]

Bases: BaseTool

Tool for searching clinical trials using ClinicalTrials.gov API v2.

BASE_URL = 'https://clinicaltrials.gov/api/v2/studies'
run(arguments)[source]

Executes the ClinicalTrials tool action.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing the action and its parameters. Expected keys: - action (str): “search_studies” or “get_study_details” - condition (str, optional): Condition to search for. - intervention (str, optional): Intervention/Drug to search for. - nct_id (str, optional): NCT ID for details. - limit (int, optional): Max results (default 10).

Returns:

The results.

Return type:

Dict[str, Any]

search_studies(condition=None, intervention=None, limit=10)[source]

Search for clinical trials.

get_study_details(nct_id)[source]

Get full details for a study.

class tooluniverse.ClinicalTrialsSearchTool[source]

Bases: ClinicalTrialsTool

__init__(tool_config)[source]
run(arguments)[source]

Executes the search query for clinical trials.

Parameters:

arguments (dict) – A dictionary containing parameters provided by the user/LLM

Returns
dict or str: The JSON response from the API as a dictionary,

or raw text for non-JSON responses, or an error dictionary.

_simplify_output(response)[source]
class tooluniverse.ClinicalTrialsTool[source]

Bases: RESTfulTool

_BASE_URL = 'https://clinicaltrials.gov/api/v2'
_OPERATION_URLS = {'field_values': '/stats/field-values', 'get_study': '/studies', 'search': '/studies', 'stats_size': '/stats/size'}
__init__(tool_config)[source]
_map_param_names(arguments)[source]

Maps the parameter names in the arguments dictionary to the expected parameter names defined in the tool’s JSON configuration.

Parameters:

arguments (dict) – Runtime arguments provided to the tool’s run method.

Returns

dict: A new dictionary with mapped parameter names.

_prepare_api_params(arguments)[source]

Prepares the dictionary of parameters for the API query string based on tool config and runtime arguments.

Parameters:

arguments (dict) – Runtime arguments provided to the tool’s run method.

Returns

dict: A dictionary of parameters ready for the API requests.

_format_endpoint_url(arguments)[source]

Formats the endpoint URL by substituting path parameters (like {nctId}) with values from the arguments dictionary.

Parameters:

arguments (dict) – Runtime arguments provided to the tool’s run method.

Returns

str: The formatted endpoint URL.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

Handle search operations (search_studies, search_by_intervention, search_by_sponsor).

_run_get_study(arguments)[source]

Get full details for a single study by NCT ID.

_run_stats_size(arguments)[source]

Get aggregate ClinicalTrials.gov database statistics.

_run_field_values(arguments)[source]

Get value distribution for a specific field.

class tooluniverse.ChemComputeTool[source]

Bases: BaseTool

Local computational chemistry tools using RDKit.

No external API calls. Provides: - Synthetic Accessibility (SA) Score computation

__init__(tool_config)[source]
run(arguments)[source]

Execute chem compute tool with given arguments.

_sa_score(arguments)[source]

Calculate the Synthetic Accessibility (SA) score for a SMILES string.

class tooluniverse.ClueTool[source]

Bases: BaseTool

Tool for querying the CLUE.io L1000 Connectivity Map API.

Provides access to: - Perturbation signatures (genetic and chemical) - Gene expression profiles - Cell line information - Compound/drug information

__init__(tool_config)[source]
run(arguments)[source]

Execute the CLUE.io API tool with given arguments.

_get_headers()[source]
_make_request(endpoint, params=None)[source]

Make GET request to CLUE.io API.

_unwrap_list(data)[source]

Extract the list payload from an API response that may be a list or a dict with a ‘data’ key.

_list_response(result)[source]

Build a standard success response with unwrapped list data, or an error response.

_search_signatures(arguments)[source]

Search L1000 perturbation signatures.

_get_perturbation(arguments)[source]

Get perturbation details by ID or name.

_get_gene_expression(arguments)[source]

Get gene information from L1000.

_get_cell_lines(arguments)[source]

Get cell line information from L1000.

_search_compounds(arguments)[source]

Search chemical compounds in L1000.

class tooluniverse.ComplexPortalTool[source]

Bases: BaseTool

Tool for querying the EBI Complex Portal for curated protein complexes.

Provides access to: - Protein complex search by gene/protein name - Detailed complex compositions and stoichiometry - Complex function, disease associations, and cross-references - Data from CORUM and other curated complex databases

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Complex Portal API call.

_search_complexes(arguments)[source]

Search for protein complexes containing a given gene/protein.

Queries the Complex Portal search endpoint.

_get_complex(arguments)[source]

Get detailed information for a specific protein complex by its Complex Portal ID.

Returns full complex data including subunit composition, function, and cross-references.

class tooluniverse.ComposeTool[source]

Bases: BaseTool

A flexible tool that can compose other tools using custom code logic. Supports both inline composition_code and external Python files. Features intelligent dependency management with automatic tool loading.

__init__(tool_config, tooluniverse=None)[source]

Initialize the ComposeTool.

Parameters:
  • tool_config (dict) – Tool configuration containing composition code or file reference

  • tooluniverse (ToolUniverse) – Reference to the ToolUniverse instance

_discover_tool_dependencies()[source]

Automatically discover tool dependencies from composition code.

Returns

set: Set of tool names that this composition calls

_get_tool_category_mapping()[source]

Create a mapping from tool names to their categories.

Returns

dict: Mapping of tool names to category names

_load_missing_dependencies(missing_tools)[source]

Automatically load missing tool dependencies.

Parameters:

missing_tools (set) – Set of missing tool names

Returns

tuple: (successfully_loaded, failed_to_load)

_load_code_from_file()[source]

Load composition code from external Python file.

Returns

str: The composition code as a string

run(arguments, stream_callback=None)[source]

Execute the composed tool with custom code logic.

Parameters:
  • arguments (dict) – Input arguments for the composition

  • stream_callback (callable, optional) – Callback function for streaming output

Returns

Any: Result from the composition execution

_emit_stream_chunk(chunk, stream_callback)[source]

Emit a stream chunk if callback is provided.

Parameters:
  • chunk (str) – The chunk to emit

  • stream_callback (callable, optional) – Callback function for streaming output

_create_event_emitter(stream_callback)[source]

Create an event emitter function for the compose script.

Parameters:

stream_callback (callable, optional) – Callback function for streaming output

Returns

callable: Event emitter function

_execute_from_file(arguments, stream_callback=None)[source]

Execute composition code from external file.

Parameters:
  • arguments (dict) – Input arguments

  • stream_callback (callable, optional) – Callback function for streaming output

Returns

Any: Result from the composition execution

_execute_inline_code(arguments, stream_callback=None)[source]

Execute inline composition code (existing behavior).

Parameters:
  • arguments (dict) – Input arguments

  • stream_callback (callable, optional) – Callback function for streaming output

Returns

Any: Result from the composition execution

_call_tool(tool_name, arguments)[source]

Helper function to call other tools from within composition code.

Parameters:
  • tool_name (str) – Name of the tool to call

  • arguments (dict) – Arguments to pass to the tool

Returns

Any: Result from the tool execution

class tooluniverse.CorePDFSnippetsTool[source]

Bases: BaseTool

Fetch an open-access PDF (commonly returned by CORE) and return bounded text snippets around user-provided terms.

Extraction backends (fastest first when extractor=”auto”): - PyMuPDF (fitz) - pypdf - markitdown

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.CoreTool[source]

Bases: BaseTool

Tool for searching CORE open access academic papers.

__init__(tool_config=None)[source]

Search for papers using CORE API.

Parameters:
  • query (str) – Search query

  • limit (int) – Maximum number of results

  • year_from (int | None) – Start year filter

  • year_to (int | None) – End year filter

  • language (str | None) – Language filter (e.g., ‘en’, ‘es’, ‘fr’)

Returns

List of paper dictionaries

_extract_authors(authors)[source]

Extract author names from CORE API response.

_extract_year(published_date)[source]

Extract year from published date.

run(tool_arguments)[source]

Execute the CORE search.

Parameters:

tool_arguments – Dictionary containing search parameters

Returns

List of paper dictionaries

class tooluniverse.CrossrefRESTTool[source]

Bases: BaseRESTTool

Generic REST tool for Crossref API endpoints.

_get_param_mapping()[source]

Map Crossref-specific parameter names.

_process_response(response, url)[source]

Process Crossref API response, extracting message wrapper.

class tooluniverse.CustomTool[source]

Bases: BaseTool

CustomTool class for executing dynamically generated tools

__init__(tool_config)[source]
_load_external_code()[source]

Load the execute_tool function from external Python file

_load_embedded_code(implementation)[source]

Load the execute_tool function from embedded source code

run(arguments=None)[source]

Execute the custom tool

Parameters:

arguments (Any) – Input arguments for the tool

Returns

Dict containing the result of tool execution

class tooluniverse.DBLPTool[source]

Bases: BaseTool

Search DBLP Computer Science Bibliography for publications.

__init__(tool_config, base_url='https://dblp.org/search/publ/api')[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.DBpediaSPARQLTool[source]

Bases: BaseTool

Run SPARQL queries against DBpedia to retrieve structured knowledge.

DBpedia is a project that extracts structured information from Wikipedia and makes it available as linked data. This tool is particularly useful for querying information about people, places, organizations, works, and other entities, especially in humanities and social sciences domains.

Parameters (arguments):

sparql (str): SPARQL query string max_results (int): Optional result limit override

__init__(tool_config)[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.DGIdbTool[source]

Bases: BaseTool

Tool for querying DGIdb REST API.

DGIdb provides drug-gene interaction data including: - Drug-gene interactions from 30+ sources - Druggability annotations - Gene categories (kinase, ion channel, etc.)

No authentication required. Free for academic/research use.

__init__(tool_config)[source]
run(arguments)[source]

Execute the DGIdb API call.

_get_interactions(arguments)[source]

Get drug-gene interactions for genes using GraphQL.

_get_genes(arguments)[source]

Get gene information including druggability using GraphQL.

_get_drugs(arguments)[source]

Get drug information using GraphQL.

_get_gene_categories(arguments)[source]

Get gene categories (druggability annotations) using GraphQL.

class tooluniverse.DNATool[source]

Bases: BaseTool

Local DNA sequence analysis and design tools.

No external API calls. Provides: - Restriction site detection (NEB enzyme library) - Open reading frame (ORF) finding - GC content calculation - Reverse complement generation - DNA to protein translation

__init__(tool_config)[source]
run(arguments)[source]

Execute DNA analysis tool with given arguments.

_validate_dna_sequence(seq)[source]

Validate DNA sequence, returns error message or None if valid.

_find_restriction_sites(arguments)[source]

Find restriction enzyme recognition sites in a DNA sequence.

_find_orfs(arguments)[source]

Find open reading frames (ORFs) in a DNA sequence.

_calculate_gc_content(arguments)[source]

Calculate GC content and nucleotide composition of a DNA sequence.

_reverse_complement(arguments)[source]

Generate the reverse complement of a DNA sequence.

_translate_sequence(arguments)[source]

Translate a DNA sequence to protein using the standard codon table.

_codon_optimize(arguments)[source]

Codon-optimize an amino acid sequence for expression in a target species.

_virtual_digest(arguments)[source]

Perform a virtual restriction digest of a DNA sequence.

_calc_tm_nn(primer)[source]

Calculate melting temperature using SantaLucia 1998 nearest-neighbor model.

_primer_design(arguments)[source]

Design PCR primers for a target region using nearest-neighbor Tm calculation.

_gibson_design(arguments)[source]

Design Gibson Assembly overlaps for a set of DNA fragments.

_golden_gate_design(arguments)[source]

Design Golden Gate Assembly parts with BsaI or BbsI overhangs.

class tooluniverse.DOAJTool[source]

Bases: BaseTool

Search DOAJ (Directory of Open Access Journals) articles and journals.

Parameters (arguments):

query (str): Query string (Lucene syntax supported by DOAJ) max_results (int): Max number of results (default 10, max 100) type (str): “articles” or “journals” (default: “articles”)

__init__(tool_config)[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.DailyMedSPLParserTool[source]

Bases: BaseTool

Parse DailyMed SPL XML into structured data (adverse reactions, dosing, contraindications, interactions, PK).

__init__(tool_config)[source]
run(arguments)[source]

Route to parser based on operation.

_with_data_payload(result)[source]

Ensure successful operation responses include a standardized data wrapper.

_fetch_spl_xml(setid)[source]

Fetch SPL XML from DailyMed API.

_parse_adverse_reactions(root)[source]

Parse adverse reactions section into structured table.

_parse_dosing(root)[source]

Parse dosage and administration section.

_parse_contraindications(root)[source]

Parse contraindications section.

_parse_drug_interactions(root)[source]

Parse drug interactions section.

_parse_clinical_pharmacology(root)[source]

Parse clinical pharmacology section.

_extract_table_data(table_element)[source]

Extract structured data from table element.

class tooluniverse.DatasetTool[source]

Bases: BaseTool

Tool to search and filter the DrugBank vocabulary dataset. Provides functionality to search drugs by name, ID, synonyms and filter by various criteria.

__init__(tool_config)[source]
_load_dataset()[source]

Load the drugbank vocabulary CSV dataset.

run(arguments)[source]

Main entry point for the tool.

Search drugs by name, ID, synonyms, or other fields using text-based queries.

This function is dedicated to text-based searching across specified fields. It performs substring or exact matching based on user preferences.

Parameters:

arguments (dict) – Search parameters including: - query (str): Text to search for - search_fields (list): Fields to search in - case_sensitive (bool): Whether search is case sensitive - exact_match (bool): Whether to perform exact matching - limit (int): Maximum number of results

Returns

dict: Search results with matched records and metadata

_drugbank_filter(arguments)[source]

Filter drugs based on specific criteria and field-based conditions.

This function is dedicated to criteria-based filtering using simple field-condition-value parameters. It supports filter types like contains, starts_with, ends_with, exact, not_empty.

Parameters:

arguments (dict) – Filter parameters including: - field (str): Field name to filter on - condition (str): Type of condition (contains, starts_with, ends_with, exact, not_empty) - value (str): Value to filter by (optional for not_empty condition) - limit (int): Maximum number of results

Returns

dict: Filtered results with matched records and applied filters

get_dataset_info()[source]

Get information about the loaded dataset.

class tooluniverse.DbfetchRESTTool[source]

Bases: BaseTool

Dbfetch REST API tool. Generic wrapper for Dbfetch API endpoints defined in dbfetch_tools.json.

__init__(tool_config)[source]
_build_params(args)[source]

Build query parameters for Dbfetch API

run(arguments)[source]

Execute the Dbfetch API call

class tooluniverse.DeepGOTool[source]

Bases: BaseTool

Tool for predicting protein function using DeepGO.

BASE_URL = 'https://deepgo.cbrc.kaust.edu.sa/deepgo'
API_VERSION = '1.0.26'
__init__(tool_config)[source]
run(arguments)[source]

Route to appropriate operation handler.

_predict_function(arguments)[source]

Predict protein function from sequence.

class tooluniverse.DepMapTool[source]

Bases: BaseTool

Tool for querying DepMap/Sanger Cell Model Passports API.

Provides access to: - Cancer cell line dependency data (CRISPR screens) - Drug sensitivity profiles - Cell line metadata and annotations - Gene effect scores for target validation

No authentication required for non-commercial use.

__init__(tool_config)[source]
run(arguments)[source]

Execute the DepMap API call.

_get_cell_lines(arguments)[source]

Get list of cancer cell lines with metadata.

Filter by tissue type or cancer type.

_get_cell_line(arguments)[source]

Get detailed information for a specific cell line.

Returns metadata, mutations, and available data types.

_search_cell_lines(arguments)[source]

Search cell lines by name or identifier.

_get_gene_dependencies(arguments)[source]

Get CRISPR gene dependency data.

Returns gene effect scores indicating essentiality in cancer cell lines. Negative scores indicate the gene is essential (cell death upon knockout).

_search_genes(arguments)[source]

Search for genes in DepMap by symbol.

The Sanger Cell Model Passports API gene filter is limited, so this method fetches sorted gene batches and filters client-side.

_get_drug_response(arguments)[source]

Get drug sensitivity data for cell lines.

Returns IC50/AUC values for drug-cell line combinations.

class tooluniverse.DetailedTermInfo[source]

Bases: TermInfo

Extended term details in OLS.

description: List[str] | None
synonyms: List[str] | None
_abc_impl = <_abc._abc_data object>
model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tooluniverse.DfamTool[source]

Bases: BaseTool

Tool for querying Dfam transposable element / repeat element database.

Supports: - Search TE families by name prefix, clade (taxon ID), and repeat type - Get detailed family info including consensus sequence and classification - Get TE annotation hits for genomic regions

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Dfam API call.

_query(arguments)[source]

Route to appropriate endpoint.

_search_families(arguments)[source]

Search Dfam TE families by name prefix, clade, or repeat type.

_get_family(arguments)[source]

Get detailed info for a specific Dfam TE family.

_get_annotations(arguments)[source]

Get TE annotation hits for a genomic region.

class tooluniverse.DisGeNETTool[source]

Bases: BaseTool

Tool for querying DisGeNET gene-disease association database.

DisGeNET provides: - Gene-disease associations (GDAs) - Variant-disease associations (VDAs) - Disease-disease associations - Aggregated evidence scores

Requires API key via DISGENET_API_KEY environment variable. Register for free at https://www.disgenet.org/

__init__(tool_config)[source]
_get_headers()[source]

Get request headers with authentication.

run(arguments)[source]

Execute DisGeNET API call based on operation type.

_search_gene(arguments)[source]

Search for gene-disease associations by gene symbol.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - gene: Gene symbol (e.g., BRCA1, TP53) - limit: Maximum results (default 10)

_search_disease(arguments)[source]

Search for disease information and associated genes.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - disease: Disease name or ID (UMLS CUI, e.g., C0006142 for breast cancer) - limit: Maximum results (default 10)

_get_gene_disease_associations(arguments)[source]

Get gene-disease associations with filtering options.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - gene: Gene symbol (optional if disease provided) - disease: Disease ID (optional if gene provided) - source: Data source filter (CURATED, ANIMAL_MODELS, LITERATURE, etc.) - min_score: Minimum GDA score (0-1) - limit: Maximum results

_get_variant_disease_associations(arguments)[source]

Get variant-disease associations.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - variant: Variant ID (rsID, e.g., rs1234) - gene: Gene symbol to get all variants - limit: Maximum results

_get_disease_genes(arguments)[source]

Get all genes associated with a disease.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - disease: Disease ID (UMLS CUI) or disease name - min_score: Minimum association score (0-1) - limit: Maximum results

class tooluniverse.DisProtTool[source]

Bases: BaseTool

Tool for querying DisProt intrinsically disordered protein database.

Supports: - Search disordered proteins by text query - Get detailed disorder region annotations for a specific protein

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the DisProt API call.

_query(arguments)[source]

Route to appropriate endpoint.

Search DisProt for disordered proteins.

_get_entry(arguments)[source]

Get detailed disorder regions for a DisProt entry.

class tooluniverse.DiseaseOntologyTool[source]

Bases: BaseTool

Tool for querying the Disease Ontology (DO) REST API.

The Disease Ontology semantically integrates disease and medical vocabularies through cross-mapping of DO terms to MeSH, ICD, NCI Thesaurus, SNOMED CT, and OMIM.

Supports: term lookup, parent hierarchy navigation.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Disease Ontology API call.

_query(arguments)[source]

Route to appropriate Disease Ontology endpoint.

_fetch_term(doid)[source]

Fetch a single DO term by DOID.

_get_term(arguments)[source]

Get detailed information about a Disease Ontology term.

_get_parents(arguments)[source]

Get parent terms for a Disease Ontology term with hierarchy navigation.

class tooluniverse.DiseaseTargetScoreTool[source]

Bases: GraphQLTool

Tool to extract disease-target association scores from specific data sources

__init__(tool_config, datasource_id=None)[source]
run(arguments)[source]

Extract disease-target scores for a specific datasource Arguments should contain: efoId, datasourceId (optional), pageSize (optional)

class tooluniverse.DoseResponseTool[source]

Bases: BaseTool

Local dose-response curve fitting and IC50 calculation tools.

Implements the 4-Parameter Logistic (4PL) model: f(x) = Bottom + (Top - Bottom) / (1 + (IC50/x)^Hill)

No external API required. Uses scipy.optimize for curve fitting.

__init__(tool_config)[source]
run(arguments)[source]

Execute dose-response analysis.

_fit_4pl(concentrations, responses)[source]

Fit Hill / 4PL sigmoidal model to dose-response data.

_fit_curve(arguments)[source]

Fit 4PL dose-response curve and return all parameters.

_calculate_ic50(arguments)[source]

Extract IC50 from dose-response data via 4PL fitting.

static _interpret_potency(fold_shift)[source]

Return a human-readable potency comparison string.

_compare_potency(arguments)[source]

Compare IC50 fold-shift between two compounds.

class tooluniverse.DrugSynergyTool[source]

Bases: BaseTool

Local drug combination synergy analysis tools.

Implements standard pharmacological synergy models: - Bliss Independence model - Highest Single Agent (HSA) model - ZIP (Zero Interaction Potency) model

No external API required. Uses numpy for computation.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_interpret_synergy_score(score, model)[source]
_calculate_bliss(arguments)[source]

Calculate Bliss Independence synergy score.

Bliss model: E_expected = E_a + E_b - E_a * E_b Synergy score = E_combination - E_expected Positive score = synergy; Negative = antagonism.

Effects should be expressed as fractional inhibition (0-1).

_calculate_hsa(arguments)[source]

Calculate Highest Single Agent (HSA) synergy score.

HSA model: E_expected = max(E_a, E_b) at each dose point Synergy = E_combination - max single agent effect.

_calculate_zip(arguments)[source]

Calculate ZIP (Zero Interaction Potency) synergy score.

ZIP model uses dose-response curves to calculate delta scores. Input: doses_a, doses_b (1D arrays), viability_matrix (2D). Output: ZIP delta synergy score.

class tooluniverse.DynamicPackageDiscovery[source]

Bases: BaseTool

Searches PyPI and evaluates packages dynamically based on requirements

__init__(tool_config)[source]
_search_pypi_via_web(query)[source]

Search PyPI using web search tool

_evaluate_package(package_name)[source]

Evaluate a package’s suitability by fetching PyPI metadata

_rank_packages(packages, requirements, functionality)[source]

Rank packages by relevance and quality

run(arguments)[source]

Dynamically discover and evaluate packages

Parameters:
  • requirements – Description of what’s needed

  • functionality – Specific functionality required

  • constraints – Any constraints (Python version, license, etc.)

class tooluniverse.EBIProteinsCoordinatesTool[source]

Bases: BaseTool

Tool for querying EBI Proteins API coordinate mappings.

Supports: - Map protein positions to genomic coordinates (exon-level) - Get protein-to-genome coordinate mappings for a UniProt accession

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the EBI Proteins Coordinates API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_coordinates(arguments)[source]

Get protein-to-genomic coordinate mappings.

class tooluniverse.EBIProteinsEpitopeTool[source]

Bases: BaseTool

Tool for querying protein epitope data from the EBI Proteins API.

Epitopes are regions of proteins recognized by the immune system (antibodies, T cells). This tool retrieves experimentally-determined epitope regions from the Immune Epitope Database (IEDB), including epitope sequences, positions, and supporting literature.

Useful for: vaccine design, therapeutic antibody development, immunogenicity assessment, B-cell/T-cell epitope mapping.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the EBI Proteins epitope API call.

_get_epitopes(arguments)[source]

Get epitope features for a protein by UniProt accession.

class tooluniverse.EBIProteinsExtTool[source]

Bases: BaseTool

Extended tool for EBI Proteins API covering mutagenesis and PTM data.

These endpoints provide detailed mutagenesis experiment results and mass spectrometry-based post-translational modification evidence mapped to UniProt protein sequences.

Supports: mutagenesis data, proteomics PTM evidence.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the EBI Proteins API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_mutagenesis(arguments)[source]

Get mutagenesis experiment data for a protein.

_get_proteomics_ptm(arguments)[source]

Get post-translational modification evidence from mass spec proteomics.

_get_variation(arguments)[source]

Get protein sequence variants from multiple sources.

_get_features(arguments)[source]

Get protein features filtered by category.

_get_antigen(arguments)[source]

Get antigenic regions for a protein (useful for antibody design).

_get_coordinates(arguments)[source]

Get genomic coordinates for a protein.

_get_proteomics(arguments)[source]

Get proteomics peptide evidence for a protein.

class tooluniverse.EBIProteinsFeaturesTool[source]

Bases: BaseTool

Tool for retrieving category-specific protein features from EBI Proteins API.

Different from EBIProteinsExtTool (mutagenesis, PTM) - this covers domain/site annotations, molecule processing info, and secondary structure.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the EBI Proteins API features call.

_get_features(arguments)[source]

Get features for a specific category.

class tooluniverse.EBIProteinsInteractionsTool[source]

Bases: BaseTool

Tool for querying EBI Proteins protein-protein interaction data.

Supports: - Get interaction partners for a protein (from IntAct) - Get detailed protein info with interactions, diseases, locations

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the EBI Proteins Interactions API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_interactions(arguments)[source]

Get protein-protein interaction partners.

_get_interaction_details(arguments)[source]

Get protein info with interactions, diseases, and locations.

class tooluniverse.EBISearchRESTTool[source]

Bases: BaseTool

EBI Search API tool. Generic wrapper for EBI Search API endpoints defined in ebi_search_tools.json.

__init__(tool_config)[source]
_build_url(args)[source]

Build URL from endpoint template and arguments

_build_params(args)[source]

Build query parameters for EBI Search API

_find_entry_id_via_search(domain, query)[source]

Find entry ID via search and return entry data

_extract_data(data, extract_path=None)[source]

Extract specific data from API response

run(arguments)[source]

Execute the EBI Search API call

class tooluniverse.EBITaxonomyTool[source]

Bases: BaseTool

Tool for querying the EBI Taxonomy REST API.

Provides taxonomy lookup by ID, scientific name, common/any name, and name suggestion for search or submission. Returns taxonomic classification including lineage, rank, division, and genetic codes.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the EBI Taxonomy API call.

_query(arguments)[source]

Route to the appropriate EBI Taxonomy endpoint.

_get_by_tax_id(arguments)[source]

Get taxonomy information by NCBI Taxonomy ID.

_get_by_scientific_name(arguments)[source]

Get taxonomy information by scientific name.

_get_by_any_name(arguments)[source]

Get taxonomy by any name (scientific, common, synonym).

_get_suggestions(arguments)[source]

Get taxonomy name suggestions for search.

class tooluniverse.EFOTool[source]

Bases: BaseTool

Tool to lookup Experimental Factor Ontology (EFO) IDs for diseases via the EMBL-EBI OLS API.

__init__(tool_config, base_url='https://www.ebi.ac.uk/ols4/api/search')[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.EMDBRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
_build_url(args)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.EMoleculesTool[source]

Bases: BaseTool

Tool for searching eMolecules vendor aggregator.

eMolecules provides: - Multi-vendor compound search - Pricing and availability - Structure search - Building block sourcing

Note: Full API access may require registration. Basic search functionality available without API key.

__init__(tool_config)[source]
run(arguments)[source]

Execute eMolecules query based on operation type.

Search eMolecules by keyword or compound name.

Note: eMolecules does not provide a public API. This tool returns search URLs for the eMolecules web interface.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - query: Search query - max_results: Maximum results (default 20)

_search_smiles(arguments)[source]

Search eMolecules by SMILES structure.

Note: eMolecules does not provide a public API. This tool returns search URLs for the eMolecules web interface.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - smiles: SMILES string - search_type: exact, substructure, similarity (default: similarity)

_get_vendors(arguments)[source]

Get list of vendors for a compound.

Note: eMolecules does not provide a public API. This tool returns search URLs for vendor lookup on the eMolecules web interface.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - smiles: SMILES string

_get_compound(arguments)[source]

Get compound details by eMolecules ID.

Note: eMolecules does not provide a public API. This tool returns URLs for viewing compound details on the eMolecules web interface.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - emol_id: eMolecules compound ID

class tooluniverse.ENABrowserRESTTool[source]

Bases: BaseTool

ENA Browser API REST tool. Generic wrapper for ENA Browser API endpoints defined in ena_browser_tools.json.

__init__(tool_config)[source]
_build_url(args)[source]

Build URL from endpoint template and arguments

_build_params(args)[source]

Build query parameters for ENA Browser API

run(arguments)[source]

Execute the ENA Browser API call

class tooluniverse.ENAPortalTool[source]

Bases: BaseTool

Tool for querying the European Nucleotide Archive (ENA) Portal API.

Supports searching for studies, samples, and sequences with flexible filtering by taxonomy, text content, and custom field selection.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the ENA Portal API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_search_studies(arguments)[source]

Search ENA studies by text query or taxonomy.

_search_samples(arguments)[source]

Search ENA samples by text query or taxonomy.

_count(arguments)[source]

Count records matching a query in ENA.

class tooluniverse.ENCODERESTTool[source]

Bases: BaseRESTTool

Generic REST tool for ENCODE detail endpoints.

run(arguments)[source]

ENCODE uses custom _http_get helper, so we override the full run method.

class tooluniverse.ENCODESearchTool[source]

Bases: object

Generic search tool for ENCODE database.

Searches experiments, files, or biosamples depending on search_type in config. Consolidates ENCODESearchTool, ENCODEFilesTool, and ENCODESearchBiosamplesTool.

__init__(tool_config=None)[source]
handle_error(exception)[source]

Classify exceptions into structured ToolError.

run(arguments)[source]
class tooluniverse.EOLTool[source]

Bases: BaseTool

Tool for querying the Encyclopedia of Life (EOL).

EOL aggregates biodiversity data from hundreds of sources into a comprehensive knowledge base covering ~3.6 million species pages. Provides species search, detailed taxon pages with media (images, text descriptions), taxonomy hierarchies from multiple classification systems, and curated collections.

Supports: species search, taxon page details, taxonomy hierarchy, collections browse.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the EOL API call.

_query(arguments)[source]

Route to appropriate EOL endpoint.

Search for species/taxa by name.

static _strip_html(text)[source]

Remove HTML tags from text.

_get_page(arguments)[source]

Get detailed species/taxon page by EOL page ID.

_get_hierarchy_entry(arguments)[source]

Get taxonomy hierarchy for a specific classification entry.

_get_collection(arguments)[source]

Get EOL curated collection details.

class tooluniverse.EVETool[source]

Bases: BaseTool

Tool for querying EVE variant effect predictions.

EVE provides: - Unsupervised pathogenicity predictions trained on evolutionary data - Scores from 0 (benign) to 1 (pathogenic) - Predictions for single amino acid variants

EVE scores complement supervised methods like ClinVar annotations. Uses Ensembl VEP API with EVE plugin for variant scoring.

PATHOGENIC_THRESHOLD = 0.5
__init__(tool_config)[source]
run(arguments)[source]

Execute the EVE API call.

_classify_score(score)[source]

Classify EVE score.

_get_variant_score(arguments)[source]

Get EVE score for a variant using Ensembl VEP.

Supports both genomic coordinates and HGVS notation.

_get_gene_info(arguments)[source]

Check if EVE scores are available for a gene.

EVE provides predictions for ~3,000 disease-related genes.

class tooluniverse.EmbeddingCollectionSearchTool[source]

Bases: BaseTool

Generic search tool for any embedding datastore collection.

Runtime arguments

querystr (required)

Search query text.

methodstr = “hybrid”

One of: “keyword”, “embedding”, “hybrid”.

top_kint = 10

Number of results to return.

alphafloat = 0.5

Balance for hybrid search (0=keyword only, 1=embedding only).

returns:
  • doc_id

  • doc_key

  • text

  • metadata

  • score

  • snippet (first ~280 chars)

rtype:

List[dict] with keys

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.EmbeddingDatabase[source]

Bases: BaseTool

Exposes actions:
  • create_from_docs

  • add_docs

  • search

Backed by SQLiteStore + VectorStore + Embedder.

__init__(tool_config)[source]
_paths(name)[source]
_stores(name)[source]
_embedder(provider, model)[source]
_get_collection_meta(store, name)[source]
_existing_vector_doc_ids(vs, collection, doc_ids)[source]
static _validate_doc_args(args)[source]

Validate and extract common arguments for document operations.

Returns (error_dict, name, docs, metas) where error_dict is None on success.

static _build_doc_rows(docs, metas)[source]

Build (doc_key, text, meta, text_hash) rows and the corresponding key list.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_create_from_documents(args)[source]
_add_documents(args)[source]
class tooluniverse.EmbeddingSync[source]

Bases: BaseTool

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_upload(args)[source]
_download(args)[source]
class tooluniverse.EnamineTool[source]

Bases: BaseTool

Tool for searching Enamine compound libraries.

Enamine provides: - Make-on-demand compounds (REAL database) - Building blocks - Screening libraries - Fragment libraries

Note: Full API access may require registration. Basic search functionality available without API key.

__init__(tool_config)[source]
run(arguments)[source]

Execute Enamine query based on operation type.

_search_catalog(arguments)[source]

Search Enamine catalog by keyword or compound name.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - query: Search query - catalog: Catalog type (REAL, BB, SCR) - default: all

_get_compound(arguments)[source]

Get compound by Enamine ID.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - enamine_id: Enamine compound ID (e.g., Z1234567890)

_search_smiles(arguments)[source]

Search Enamine by SMILES structure.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - smiles: SMILES string - search_type: exact, substructure, similarity (default: similarity)

_get_libraries(arguments)[source]

Get available Enamine compound libraries.

Returns information about Enamine’s screening libraries.

class tooluniverse.EnrichrTool[source]

Bases: BaseTool

Tool to perform gene enrichment analysis using Enrichr.

__init__(tool_config)[source]
run(arguments)[source]

Main entry point for the tool.

get_official_gene_name(gene_name)[source]

Retrieve the official gene symbol for a given gene name or synonym using the MyGene.info API.

Parameters

gene_name (str): The gene name or synonym to query.

Returns

str: The official gene symbol if found; otherwise, raises an Exception.

submit_gene_list(gene_list)[source]

Submit the gene list to Enrichr and return the user list ID.

Parameters

gene_list (str): Newline-separated string of gene names.

Returns

str: The user list ID from Enrichr.

get_enrichment_results(user_list_id, library)[source]

Fetch enrichment results for a specific library.

Parameters

user_list_id (str): The user list ID from Enrichr. library (str): The name of the enrichment library.

Returns

dict: The enrichment results.

build_graph(genes, enrichment_results)[source]

Initialize and build the graph with gene nodes and enriched terms.

Parameters

genes (list): List of gene names. enrichment_results (dict): Dictionary of enrichment results by library.

Returns

networkx.Graph: The constructed graph.

rank_paths_by_weight(G, source, target)[source]

Find and rank paths between source and target based on total edge weight.

Parameters

G (networkx.Graph): The graph to search. source (str): The source node. target (str): The target node.

Returns

list: List of tuples (path, weight) sorted by weight descending.

rank_paths_to_term(G, gene, term)[source]

Find and rank paths from each gene to a specified term based on total edge weight.

Parameters

G (networkx.Graph): The graph to search. gene (str): The source gene. term (str): The target term.

Returns

list or None: List of tuples (path, weight) sorted by weight descending, or None if no paths.

enrichr_api(genes, libs)[source]

Main API function to perform gene enrichment analysis.

Parameters

genes (list): List of gene names. libs (list): List of enrichment libraries to use.

Returns

tuple: (connected_path, connections) dictionaries.

class tooluniverse.EnsemblArchiveTool[source]

Bases: BaseTool

Tool for Ensembl Archive API providing stable ID history tracking and batch ID version lookups.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl Archive API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_id_history(arguments)[source]

Get version history for a single Ensembl stable ID.

_batch_lookup(arguments)[source]

Batch lookup version histories for multiple Ensembl IDs.

class tooluniverse.EnsemblComparaTool[source]

Bases: BaseTool

Tool for querying Ensembl Compara comparative genomics data.

Ensembl Compara contains whole-genome alignments, gene trees, and homology data for vertebrates and other eukaryotes. Supports finding orthologues (between-species homologs) and paralogues (within-species gene duplications).

Supports: orthologue search, paralogue search, gene tree retrieval.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl Compara API call.

_query(arguments)[source]

Route to appropriate Ensembl Compara endpoint.

_get_orthologues(arguments)[source]

Get orthologues for a gene across species.

_get_paralogues(arguments)[source]

Get within-species paralogues (gene duplicates) for a gene.

_get_gene_tree(arguments)[source]

Get gene tree (phylogenetic tree of homologous genes).

_collect_members(node, members, max_members=200)[source]

Recursively collect leaf members from gene tree.

class tooluniverse.EnsemblGetSequence[source]

Bases: EnsemblRESTTool

Legacy: Get DNA or protein sequences. Use EnsemblRESTTool with endpoint=’/sequence/id/{id}’ instead.

__init__(tool_config)[source]
class tooluniverse.EnsemblGetVariants[source]

Bases: EnsemblRESTTool

Legacy: Get variant information. Use EnsemblRESTTool with endpoint=’/overlap/region/{species}/{region}’ instead.

__init__(tool_config)[source]
class tooluniverse.EnsemblInfoTool[source]

Bases: BaseTool

Tool for Ensembl info endpoints providing genome assembly metadata and species catalog.

These endpoints complement existing Ensembl tools (sequence, variation, overlap, xrefs, etc.) by providing assembly-level and species-level information needed for genomic coordinate interpretation.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl info API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_assembly_info(arguments)[source]

Get genome assembly metadata for a species.

_get_species_info(arguments)[source]

Get list of species available in Ensembl with genome info.

class tooluniverse.EnsemblLDTool[source]

Bases: BaseTool

Tool for querying linkage disequilibrium data from Ensembl REST API.

Provides LD statistics (r2, D’) between variants using 1000 Genomes Phase 3 population data across 26 populations.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl LD API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_ld_variants(arguments)[source]

Get all variants in LD with a query variant in a population.

_ld_pairwise(arguments)[source]

Get pairwise LD statistics between two variants across populations.

class tooluniverse.EnsemblLookupGene[source]

Bases: EnsemblRESTTool

Legacy: Lookup gene information by ID or symbol. Use EnsemblRESTTool with endpoint=’/lookup/id/{id}’ instead.

__init__(tool_config)[source]
class tooluniverse.EnsemblMapTool[source]

Bases: BaseTool

Tool for Ensembl coordinate mapping operations.

Supports: - Assembly-to-assembly coordinate conversion (GRCh37 <-> GRCh38) - Protein position to genomic coordinate mapping - cDNA position to genomic coordinate mapping

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl mapping API call.

_query(arguments)[source]

Route to appropriate endpoint.

_assembly_map(arguments)[source]

Convert coordinates between genome assemblies.

_translate_coords(arguments)[source]

Map protein or cDNA positions to genomic coordinates.

class tooluniverse.EnsemblOverlapTool[source]

Bases: BaseTool

Tool for querying Ensembl Overlap API.

Supports: - Get features overlapping a genomic region (genes, transcripts, regulatory) - Get features overlapping an Ensembl gene ID

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl Overlap API call.

_query(arguments)[source]

Route to appropriate endpoint.

_overlap_region(arguments)[source]

Get features overlapping a genomic region.

_overlap_gene(arguments)[source]

Get features overlapping an Ensembl gene ID.

class tooluniverse.EnsemblPhenotypeTool[source]

Bases: BaseTool

Tool for querying phenotype/disease associations from Ensembl REST API.

Provides gene-phenotype, region-phenotype, and variant-phenotype lookups. No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl Phenotype API call.

_dispatch(arguments)[source]

Route to appropriate endpoint.

_phenotype_gene(arguments)[source]

Get phenotype associations for a gene.

_phenotype_region(arguments)[source]

Get phenotype associations for a genomic region.

_phenotype_variant(arguments)[source]

Get phenotype associations for a variant via the variation endpoint.

class tooluniverse.EnsemblRESTTool[source]

Bases: BaseTool

Generic Ensembl REST API tool. Handles all Ensembl endpoints based on endpoint template in JSON config. Supports path parameters (e.g., {species}, {id}) and query parameters.

__init__(tool_config)[source]
_build_url(arguments)[source]

Combines endpoint_template (containing {xxx}) with path parameters from arguments. For example endpoint_template=”/lookup/id/{id}”, arguments={“id”:”ENSG00000139618”} → Returns “https://rest.ensembl.org/lookup/id/ENSG00000139618

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.EnsemblRegulationTool[source]

Bases: BaseTool

Tool for querying regulatory and conservation features from Ensembl REST API.

Provides TF binding motifs, constrained elements, and binding matrices. No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl Regulation API call.

_dispatch(arguments)[source]

Route to appropriate endpoint.

_motif_features(arguments)[source]

Get TF binding motif features in a genomic region.

_constrained_elements(arguments)[source]

Get evolutionarily constrained elements in a genomic region.

_binding_matrix(arguments)[source]

Get a TF binding matrix by stable ID.

class tooluniverse.EnsemblSequenceTool[source]

Bases: BaseTool

Tool for Ensembl sequence retrieval endpoints providing DNA and protein sequences for genes, transcripts, proteins, and genomic regions.

Complements existing Ensembl tools by providing direct sequence access for specific region coordinates and protein/cDNA sequence retrieval.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl sequence API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_region_sequence(arguments)[source]

Get DNA sequence for a genomic region.

_get_id_sequence(arguments)[source]

Get sequence for an Ensembl ID (gene, transcript, or protein).

class tooluniverse.EnsemblVEPTool[source]

Bases: BaseTool

Tool for Ensembl VEP variant annotation and Variant Recoder ID conversion.

Supports three modes: - vep_hgvs: Annotate variants using HGVS notation (e.g., BRAF:p.Val600Glu) - vep_id: Annotate variants using dbSNP rsID (e.g., rs7903146) - variant_recoder: Convert variant IDs between formats (rsID -> HGVS, SPDI)

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl VEP or Variant Recoder API call.

_query(arguments)[source]

Route to appropriate Ensembl endpoint based on mode.

_vep_hgvs(arguments)[source]

Annotate a variant using HGVS notation.

_vep_id(arguments)[source]

Annotate a variant using dbSNP rsID.

_variant_recoder(arguments)[source]

Convert variant identifiers between formats.

_format_vep_result(result)[source]

Format a VEP result to extract key information.

class tooluniverse.EnsemblVariationExtTool[source]

Bases: BaseTool

Tool for querying Ensembl variant population frequencies and detailed variant info.

Supports: - Allele frequency data across gnomAD and 1000 Genomes populations - Detailed variant records with consequences, synonyms, and evidence

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl Variation API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_population_frequencies(arguments)[source]

Get allele frequencies across global populations.

_get_variant_detail(arguments)[source]

Get detailed variant information.

class tooluniverse.EnsemblXrefsTool[source]

Bases: BaseTool

Tool for querying Ensembl cross-references API.

Supports: - Get all external database cross-references for an Ensembl ID - Filter by external database name

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Ensembl Xrefs API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_xrefs(arguments)[source]

Get external cross-references for an Ensembl ID.

_get_xrefs_by_symbol(arguments)[source]

Look up Ensembl IDs for a gene symbol via external databases.

class tooluniverse.EpiGraphDBTool[source]

Bases: BaseRESTTool

Tool for querying the EpiGraphDB API.

Provides access to: - Mendelian Randomization (MR) results between GWAS traits - Genetic correlations between traits - Drug repurposing via genetic evidence (drugs targeting risk factor genes) - GWAS trait to EFO/disease ontology mapping - Gene druggability information via PPI network - Gene-drug associations from pharmacogenomics databases - OpenGWAS GWAS study search

Uses IEU OpenGWAS trait IDs (e.g., ‘ieu-a-2’ for BMI, ‘ieu-a-7’ for CHD). No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the EpiGraphDB API call.

_query(arguments)[source]

Route to the appropriate endpoint.

_get_mr(arguments)[source]

Get Mendelian Randomization results between exposure and outcome traits.

_get_genetic_cor(arguments)[source]

Get genetic correlations between a trait and other GWAS traits.

_get_drugs_risk_factors(arguments)[source]

Get drugs associated with a risk factor trait via genetic evidence.

_get_gwas_efo(arguments)[source]

Map GWAS traits to EFO (Experimental Factor Ontology) terms.

_get_disease_efo(arguments)[source]

Map a disease label to EFO terms and associated GWAS studies.

_search_gene(arguments)[source]

Search for genes in EpiGraphDB by name or Ensembl ID.

_get_gene_drugs(arguments)[source]

Get drug-gene associations from pharmacogenomics databases.

_search_opengwas(arguments)[source]

Search OpenGWAS database for GWAS studies by trait name using NLP.

class tooluniverse.EpigenomicsTool[source]

Bases: BaseTool

Tool for epigenomics and methylation analysis across multiple databases.

Supports: - ENCODE histone ChIP-seq, methylation (WGBS/RRBS), chromatin accessibility - ENCODE annotations (cCREs, chromatin states) - GEO methylation and ChIP-seq dataset search - Ensembl regulatory features

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the epigenomics API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

Generic ENCODE search helper.

Search ENCODE histone ChIP-seq experiments.

Search ENCODE methylation experiments (WGBS/RRBS).

Search ENCODE chromatin accessibility experiments (ATAC-seq / DNase-seq).

Search ENCODE annotations (cCREs, chromatin states).

Search ENCODE chromatin state annotations (ChromHMM).

_geo_esearch(term, limit=20)[source]

Search GEO datasets via NCBI E-utilities.

_geo_esummary(ids)[source]

Get summary for GEO dataset IDs via NCBI E-utilities.

Search GEO for methylation array datasets.

Search GEO for ChIP-seq datasets.

_geo_dataset_details(arguments)[source]

Get detailed metadata for a GEO dataset.

_ensembl_regulatory_features(arguments)[source]

Get Ensembl regulatory features for a genomic region.

class tooluniverse.EuHealthDeepDiveTool[source]

Bases: BaseTool

Wrapper for the EU Health deep dive function.

You can dive:
  • explicit UUIds: uuids=[…]

  • or a topic: topic=”euhealthinfo_search_cancer”

Supported arguments:
  • uuids: Optional[List[str]]

  • topic: Optional[str]

  • limit: int

  • links_per: int

  • method: “keyword” | “embedding” | “hybrid”

  • alpha: float

  • top_k: int

  • country: Optional[str]

  • language: Optional[str]

  • term_override: Optional[str]

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.EuHealthTopicSearchTool[source]

Bases: BaseTool

Generic wrapper for all EU Health ‘topic search’ tools.

The associated JSON config supplies:

fields.topic = “euhealthinfo_search_cancer” (for example)

Supported arguments:
  • limit: int

  • method: “keyword” | “embedding” | “hybrid”

  • alpha: float

  • top_k: int

  • country: Optional[str]

  • language: Optional[str]

  • term_override: Optional[str]

Returns:

{“warning”: “…”, “results”: […]} (fallback) or

[… shaped rows …]

Return type:

Either

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.EuroPMCAnnotationsTool[source]

Bases: BaseTool

Tool for extracting text-mined annotations from scientific articles via the Europe PMC Annotations API.

Supports annotation types: Chemicals, Organisms, Gene Ontology, Diseases, Genes & Proteins, Accession Numbers.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Europe PMC Annotations API call.

_dispatch(arguments)[source]

Route to appropriate endpoint.

_fetch_annotations(article_ids, annotation_type=None, page_size=None)[source]

Fetch annotations from the API.

_by_article(arguments)[source]

Get annotations from a single article.

_batch_by_type(arguments)[source]

Get annotations of a specific type from multiple articles.

_chemicals_shortcut(arguments)[source]

Extract chemical mentions from an article.

class tooluniverse.EuropePMCFullTextFetchTool[source]

Bases: BaseTool

Fetch full text content for a PMC article with deterministic fallbacks and machine-readable provenance (retrieval_trace).

This tool is intended for machine consumption: it always returns a structured status payload and, when successful, includes source/format/content_type.

__init__(tool_config)[source]
_build_fulltext_xml_url(arguments)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.EuropePMCFullTextSnippetsTool[source]

Bases: BaseTool

Fetch Europe PMC fullTextXML (open access) and return bounded text snippets around user-provided terms. This helps answer questions where the crucial detail is present in the full text (e.g., methods/section titles) but not necessarily in the abstract.

__init__(tool_config)[source]
_build_pmc_html_url(pmcid)[source]
_build_pmc_oai_url(pmcid)[source]
_build_fulltext_xml_url(arguments)[source]
_extract_text(xml_text)[source]
_extract_text_from_html(html_text)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.EuropePMCGuidelinesTool[source]

Bases: BaseTool

Search Europe PMC for clinical guidelines. Europe PMC provides access to life science literature including guidelines.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_search_europepmc_guidelines(query, limit)[source]

Search Europe PMC for guideline publications.

_get_europepmc_abstract(pmid)[source]

Get abstract for a specific PMID using PubMed API.

_get_europepmc_full_content(pmid, pmcid)[source]

Get more detailed content from Europe PMC.

class tooluniverse.EuropePMCRESTTool[source]

Bases: BaseTool

Generic REST tool for Europe PMC API endpoints. Supports citations, references, and other article-related endpoints.

__init__(tool_config)[source]
_build_url(arguments)[source]

Build URL from endpoint template and arguments.

run(arguments)[source]

Execute the Europe PMC REST API request.

class tooluniverse.EuropePMCTool[source]

Bases: BaseTool

Tool to search for articles on Europe PMC including abstracts.

__init__(tool_config, base_url='https://www.ebi.ac.uk/europepmc/webservices/rest/search')[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_local_name(tag)[source]
_extract_abstract_from_fulltext_xml(xml_text)[source]
_build_fulltext_xml_url(*, source_db, article_id, pmcid)[source]
_build_pmc_oai_url(pmcid)[source]

Build an NCBI PMC OAI-PMH URL to retrieve JATS XML for a PMC article.

Europe PMC fullTextXML is not always available even when an article is in PMC. The OAI endpoint provides a robust fallback for extracting full text/abstract.

_fetch_fulltext_with_trace(*, fulltext_url, pmcid, timeout=20)[source]
tooluniverse.ExecuteTool

alias of ExecuteToolTool

class tooluniverse.ExecuteToolTool[source]

Bases: BaseTool

Execute a ToolUniverse tool directly with custom arguments.

__init__(tool_config, tooluniverse=None)[source]
run(arguments)[source]

Execute a ToolUniverse tool directly with custom arguments.

Parameters:

arguments (dict) –

Dictionary containing: - tool_name (str): Name of the tool to execute - arguments (dict|str): Arguments to pass to the tool.

Accepts: 1) JSON object/dict: {“param1”: “value1”, “param2”: 5} 2) JSON string that parses to object:

”{“param1”: “value1”, “param2”: 5}”

Returns:

Tool execution result. If result is already a dict,

return as-is. If it’s a string (JSON), parse and return as dict.

Return type:

dict or str

class tooluniverse.ExpressionAtlasTool[source]

Bases: BaseTool

Tool for querying EBI Expression Atlas gene expression data.

Provides access to: - Baseline gene expression across tissues and cell types - Differential expression in disease and treatment contexts - Experiment search and metadata - Both bulk RNA-seq and single-cell data

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Expression Atlas API call.

_get_baseline_expression(arguments)[source]

Get baseline expression experiments for a gene.

Uses EBI Search to find experiments mentioning the gene, then filters the Expression Atlas experiment catalog for baseline experiments in the specified species.

_search_differential_experiments(arguments)[source]

Search for differential expression experiments by gene and/or condition.

_search_experiments(arguments)[source]

Search Expression Atlas experiments by gene and/or condition.

Uses EBI Search for gene-specific queries and filters the full experiment catalog by species and condition text.

_get_experiment(arguments)[source]

Get detailed metadata for a specific Expression Atlas experiment.

Returns experiment design, assays, and analysis information.

class tooluniverse.FAERSAnalyticsTool[source]

Bases: BaseTool

FAERS Analytics Tool for statistical signal detection in adverse event data.

Provides: - Disproportionality analysis (ROR, PRR, IC, EBGM) - Demographic stratification - Serious event filtering - Drug comparison - Temporal trend analysis - MedDRA hierarchy rollups

__init__(tool_config)[source]
run(arguments)[source]

Route to analytics operation.

_with_data_payload(result)[source]

Ensure successful operation responses include a standardized data wrapper.

_calculate_disproportionality(arguments)[source]

Calculate disproportionality measures (ROR, PRR, IC) with 95% confidence intervals.

Uses 2x2 contingency table:

Event+ Event-

Drug+ a b Drug- c d

_stratify_by_demographics(arguments)[source]

Stratify adverse event data by demographics (age, sex, country).

_filter_serious_events(arguments)[source]

Filter for serious adverse events (death, hospitalization, disability, life-threatening).

_compare_drugs(arguments)[source]

Compare safety profiles of two drugs for the same adverse event.

Analyze temporal trends in adverse event reporting.

_rollup_meddra_hierarchy(arguments)[source]

Aggregate adverse events by MedDRA hierarchy levels (PT → HLT → SOC).

_get_faers_count(drug_name=None, adverse_event=None)[source]

Get count of FAERS reports matching criteria.

_get_faers_total_count()[source]

Get total number of reports in FAERS database.

_calculate_ror_ci(a, b, c, d)[source]

Calculate 95% confidence interval for ROR.

_calculate_prr_ci(a, b, c, d)[source]

Calculate 95% confidence interval for PRR.

_calculate_ic(a, b, c, d)[source]

Calculate Information Component (IC).

_calculate_ic_ci(a, b, c, d)[source]

Calculate 95% confidence interval for IC.

class tooluniverse.FDACountAdditiveReactionsTool[source]

Bases: FDADrugAdverseEventTool

Leverage openFDA API to count adverse reaction events across multiple drugs in one request.

__init__(tool_config, endpoint_url='https://api.fda.gov/drug/event.json', api_key=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.FDADrugAdverseEventDetailTool[source]

Bases: BaseTool

Tool for retrieving detailed adverse event reports from FAERS. Uses limit/skip parameters instead of count aggregation.

__init__(tool_config, endpoint_url='https://api.fda.gov/drug/event.json', api_key=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

validate_enum_arguments(arguments)[source]

Validate that enum-based arguments match the allowed values

_extract_essential_fields(report)[source]

Extract only essential fields from a FAERS report. Removes verbose metadata like openfda to keep output concise. Can be customized via tool_config[‘fields’][‘essential_fields’].

_extract_custom_fields(report, field_config)[source]

Extract fields based on custom configuration. field_config can be a list of field paths or a dict with inclusion rules.

_get_nested_value(obj, path)[source]

Get value from nested dict using dot notation path

_set_nested_value(obj, path, value)[source]

Set value in nested dict using dot notation path

_map_value(param_name, value)[source]
class tooluniverse.FDADrugAdverseEventTool[source]

Bases: BaseTool

__init__(tool_config, endpoint_url='https://api.fda.gov/drug/event.json', api_key=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

validate_enum_arguments(arguments)[source]

Validate that enum-based arguments match the allowed values

_post_process(response, reaction_filter=None)[source]
_map_value(param_name, value)[source]
class tooluniverse.FDADrugInteractionDetailTool[source]

Bases: BaseTool

Tool for retrieving detailed adverse event reports involving multiple drugs (drug interactions). Uses limit/skip parameters instead of count aggregation.

__init__(tool_config, endpoint_url='https://api.fda.gov/drug/event.json', api_key=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

validate_enum_arguments(arguments)[source]

Validate that enum-based arguments match the allowed values

_extract_essential_fields(report)[source]

Extract only essential fields from a FAERS report. Removes verbose metadata like openfda to keep output concise. Can be customized via tool_config[‘fields’][‘essential_fields’].

_extract_custom_fields(report, field_config)[source]

Extract fields based on custom configuration. field_config can be a list of field paths or a dict with inclusion rules.

_get_nested_value(obj, path)[source]

Get value from nested dict using dot notation path

_set_nested_value(obj, path, value)[source]

Set value in nested dict using dot notation path

_map_value(param_name, value)[source]
tooluniverse.FDADrugLabel

alias of FDADrugLabelTool

tooluniverse.FDADrugLabelAggregated

alias of FDADrugLabelGetDrugNamesByIndicationAggregated

class tooluniverse.FDADrugLabelFieldValueTool[source]

Bases: BaseTool

Search the openFDA drug label dataset by specifying a single openFDA field (e.g., “openfda.generic_name”) and a corresponding field_value.

This tool is intentionally generic and does not modify any existing FDA tools.

__init__(tool_config, api_key=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.FDADrugLabelGetDrugGenericNameTool[source]

Bases: FDADrugLabelTool

__init__(tool_config=None, api_key=None)[source]
run(arguments)[source]

Override run to support ChEMBL ID conversion

class tooluniverse.FDADrugLabelGetDrugNamesByIndicationAggregated[source]

Bases: FDADrugLabelTool

Enhanced version of FDA_get_drug_names_by_indication that: - Iterates through all results in batches of 100 (no limit) - Aggregates results by generic name - Returns one entry per generic name with indication and all brand names

__init__(tool_config, api_key=None)[source]
run(arguments)[source]

Run the aggregated drug names search by indication.

Iterates through all results in batches of 100, aggregates by generic name, and returns a list where each entry contains: - generic_name: The generic drug name - indication: The indication (from input) - brand_names: List of all brand names for this generic name

class tooluniverse.FDADrugLabelGetDrugNamesByIndicationStats[source]

Bases: FDADrugLabelTool

Enhanced version using FDA count API to efficiently aggregate drug names by indication. Uses count mechanism to get brand_name and generic_name distributions without fetching full records.

__init__(tool_config, api_key=None)[source]
run(arguments)[source]

Run the aggregated drug names search using count API.

Uses count API to: 1. Get all unique generic names for the indication 2. For each generic name, get corresponding brand names 3. Return aggregated results

class tooluniverse.FDADrugLabelSearchIDTool[source]

Bases: FDATool

__init__(tool_config=None, api_key=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.FDADrugLabelSearchTool[source]

Bases: FDATool

__init__(tool_config=None, api_key=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

tooluniverse.FDADrugLabelStats

alias of FDADrugLabelGetDrugNamesByIndicationStats

class tooluniverse.FDADrugLabelTool[source]

Bases: FDATool

__init__(tool_config, api_key=None)[source]
_is_chembl_id(value)[source]

Check if the value looks like a ChEMBL ID

_convert_id_to_drug_name(chembl_id)[source]

Convert ChEMBL ID to drug name using OpenTargets API

run(arguments)[source]

Override run to support ChEMBL ID conversion

class tooluniverse.FDALabelTool[source]

Bases: BaseTool

Tool for querying FDA-approved drug label (prescribing information).

Supports searching by drug name, indication, or listing drug classes. Returns official FDA clinical content: indications, dosing, contraindications, warnings, drug interactions, and adverse reactions.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_get_label(arguments)[source]
_list_classes(arguments)[source]
class tooluniverse.FDAOrangeBookTool[source]

Bases: BaseTool

FDA Orange Book and Drugs@FDA tool for drug approval information.

Provides: - Drug approval history - Patent information - Exclusivity dates - Therapeutic equivalence (TE) codes - Generic availability - Regulatory review documents

__init__(tool_config)[source]
run(arguments)[source]

Route to operation handler.

_with_data_payload(result)[source]

Ensure successful operation responses include a standardized data wrapper.

_search_drug(arguments)[source]

Search for drugs by brand name, generic name, or application number.

_get_approval_history(arguments)[source]

Get approval history and submission details for an application.

_get_patent_info(arguments)[source]

Get patent information for a drug (Note: Full patent data requires Orange Book download).

_get_exclusivity(arguments)[source]

Get exclusivity information for a drug.

_check_generic_availability(arguments)[source]

Check if generic versions are approved/available.

_get_te_code(arguments)[source]

Get therapeutic equivalence (TE) code information.

_interpret_te_code(te_code)[source]

Interpret TE code meaning.

class tooluniverse.FDAPharmacogenomicBiomarkersTool[source]

Bases: BaseTool

Tool to retrieve data from the FDA’s Table of Pharmacogenomic Biomarkers in Drug Labeling. Fetches the table from the FDA website and provides filtering capabilities.

FDA_URL = 'https://www.fda.gov/drugs/science-and-research-drugs/table-pharmacogenomic-biomarkers-drug-labeling'
HEADERS = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'}
run(arguments)[source]

Executes the tool to retrieve and filter pharmacogenomic biomarkers.

Parameters:

arguments (Dict[str, Any]) –

  • drug_name (str, optional): Filter by drug name (case-insensitive partial match).

  • biomarker (str, optional): Filter by biomarker (case-insensitive partial match).

  • limit (int, optional): Maximum number of results to return (default: 10).

Returns:

A dictionary containing the ‘count’ and ‘results’ list.

Return type:

Dict[str, Any]

_parse_html_table(html_content)[source]

Parses the HTML content to extract the biomarkers table. Uses regex/simple parsing to avoid heavy dependencies like BeautifulSoup if possible, or assumes BeautifulSoup is available in the environment (it usually is in this project).

class tooluniverse.FDATool[source]

Bases: BaseTool

__init__(tool_config, endpoint_url, api_key=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.FatcatMetadataParser[source]

Bases: HTMLParser

Extract metadata from Fatcat release page meta tags.

__init__()[source]

Initialize and reset this instance.

If convert_charrefs is True (the default), all character references are automatically converted to the corresponding Unicode characters.

handle_starttag(tag, attrs)[source]
class tooluniverse.FatcatResultParser[source]

Bases: HTMLParser

Parse Fatcat search results from HTML.

__init__()[source]

Initialize and reset this instance.

If convert_charrefs is True (the default), all character references are automatically converted to the corresponding Unicode characters.

handle_starttag(tag, attrs)[source]
handle_data(data)[source]
handle_endtag(tag)[source]
class tooluniverse.FatcatScholarTool[source]

Bases: BaseTool

Search Internet Archive Scholar via Fatcat releases search.

Uses web scraping of the scholar.archive.org interface to retrieve bibliographic information about research papers and publications.

Parameters (arguments):

query (str): Query string max_results (int): Max results (default 10, max 100)

__init__(tool_config)[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.FederalRegisterTool[source]

Bases: BaseRESTTool

REST tool for Federal Register API with bracket-notation parameter mapping.

_get_param_mapping()[source]

Get parameter name mappings from argument names to API parameter names.

Override this in subclasses to provide custom mappings. Example: {“limit”: “rows”, “query”: “q”}

class tooluniverse.FileDownloadTool[source]

Bases: BaseTool

Download files from HTTP/HTTPS URLs - similar to curl.

Supports: - Direct file downloads to specified or temporary locations - Binary and text file handling - Progress tracking (optional) - Cross-platform (Windows, Mac, Linux)

Expects: {“url”: “https://…”, “output_path”: “/path/to/save”} Optional: {“timeout”: seconds, “return_content”: bool} Returns: {“file_path”: “…”, “file_size”: bytes} or {“error”: “…”}

__init__(tool_config)[source]
run(arguments)[source]

Download a file from a URL.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing: - url (str): URL to download from - output_path (str, optional): Path to save the file - timeout (int, optional): Request timeout (default: 30) - return_content (bool): Return as text (default: False) - chunk_size (int, optional): Chunk size (default: 8192) - follow_redirects (bool): Follow redirects (default: True)

Returns:

Dict with file_path and file_size, or content, or error

Return type:

Dict[str, Any]

_normalize_path(path)[source]

Normalize file path for cross-platform compatibility.

Parameters:

path (str) – File path to normalize

Returns:

Normalized path

Return type:

str

class tooluniverse.FoodDataCentralTool[source]

Bases: BaseTool

Tool for querying the USDA FoodData Central API.

FoodData Central provides comprehensive food and nutrient data including: - Food search by name/keyword - Detailed food nutrient profiles - Food listing with pagination - Multiple data types: Foundation, SR Legacy, Branded, Survey (FNDDS)

Authentication: Requires a free API key from data.gov. Rate limit: 1,000 requests per hour per IP address. Set the FDC_API_KEY environment variable, or use ‘DEMO_KEY’ for testing.

__init__(tool_config)[source]
run(arguments)[source]

Execute the FoodData Central API call based on the configured operation.

_make_get_request(endpoint, params=None)[source]

Make a GET request to FDC API with authentication.

_search_foods(arguments)[source]

Search for foods by keyword/query string.

_get_food_detail(arguments)[source]

Get detailed food information by FDC ID.

_list_foods(arguments)[source]

List foods in abridged format with pagination.

_get_food_nutrients(arguments)[source]

Get only nutrients for a food by FDC ID (detailed nutrient profile).

class tooluniverse.FourDNTool[source]

Bases: BaseTool

4DN Data Portal API tool for accessing Hi-C and chromatin conformation data.

run(arguments)[source]

Execute the tool with given arguments.

Search 4DN data portal for files or experiments.

_get_file_metadata(arguments)[source]

Get metadata for a specific file.

_get_experiment_metadata(arguments)[source]

Get metadata for a specific experiment.

_download_file_url(arguments)[source]

Get download URL for file (requires authentication).

class tooluniverse.GBIFOccurrenceTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GBIFTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GDCCNVTool[source]

Bases: object

Query copy number variation data from GDC.

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GDCCasesTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GDCFilesTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GDCGeneExpressionTool[source]

Bases: object

Query gene expression files from GDC.

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GDCMutationFrequencyTool[source]

Bases: object

Get mutation frequency for a gene across cancer types.

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GDCProjectsTool[source]

Bases: object

List GDC projects including TCGA and TARGET cohorts.

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GDCSSMTool[source]

Bases: object

Query somatic mutations from GDC/TCGA.

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GEOGetDatasetInfo[source]

Bases: GEORESTTool

Get detailed information about a specific GEO dataset.

__init__(tool_config)[source]
_build_params(arguments)[source]

Build parameters for GEO dataset info retrieval.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.GEOGetSampleInfo[source]

Bases: GEORESTTool

Get sample information for a GEO dataset.

__init__(tool_config)[source]
_build_params(arguments)[source]

Build parameters for GEO sample info retrieval.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.GEORESTTool[source]

Bases: NCBIEUtilsTool

GEO Database REST API tool with rate limiting. Generic wrapper for GEO API endpoints defined in expression_tools.json.

__init__(tool_config)[source]
_build_url(arguments)[source]

Build URL for GEO API request.

_build_params(arguments)[source]

Build parameters for GEO API request.

_detect_database(dataset_id)[source]

Return the appropriate NCBI GEO database name.

For NCBI E-utilities, GEO records (GDS, GSE, GSM, GPL) are all accessed through the single gds database. The accession prefix (GDS/GSE/GSM) is used in the search term, not as the database name.

_accession_to_uid(dataset_id, db)[source]

Convert accession number (e.g. GSE/GDS/GSM) to numeric UID using esearch.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.GEOSearchDatasets[source]

Bases: GEORESTTool

Search GEO datasets by various criteria.

__init__(tool_config)[source]
_build_params(arguments)[source]

Build parameters for GEO dataset search.

class tooluniverse.GINGuidelinesTool[source]

Bases: BaseTool

Guidelines International Network (GIN) Guidelines Search Tool. Searches the global guidelines database with 6400+ guidelines from various organizations.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_search_gin_guidelines(query, limit)[source]

Search GIN guidelines via the EBM Portal.

class tooluniverse.GNPSTool[source]

Bases: BaseTool

Tool for querying GNPS mass spectrometry spectral data.

Provides access to reference MS/MS spectra through Universal Spectrum Identifiers (USIs) for metabolomics compound identification.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the GNPS API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_get_spectrum(arguments)[source]

Get MS/MS spectrum by Universal Spectrum Identifier (USI).

_compare_spectra(arguments)[source]

Compare two spectra using USI mirror plot endpoint.

class tooluniverse.GOAPITool[source]

Bases: BaseTool

Tool for querying the Gene Ontology (GO) REST API.

The GO API provides access to three major ontology domains: - Biological Process (BP): cellular/organismal processes - Molecular Function (MF): molecular-level activities - Cellular Component (CC): locations of gene products

Supports: GO term lookup, gene GO annotations, gene function associations.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the GO API call.

_query(arguments)[source]

Route to appropriate GO endpoint.

_get_term(arguments)[source]

Get GO term details by GO ID.

_get_gene_functions(arguments)[source]

Get GO annotations (functions/processes/components) for a gene.

_search_annotations(arguments)[source]

Search for genes annotated with a specific GO term.

class tooluniverse.GPCRdbTool[source]

Bases: BaseTool

Tool for querying GPCRdb GPCR database.

GPCRdb provides: - GPCR protein information and classification - Structure data for GPCR crystal/cryo-EM structures - Ligand binding data - Mutation data and effects - Sequence alignments

No authentication required. Free public access.

__init__(tool_config)[source]
run(arguments)[source]

Execute GPCRdb API call based on operation type.

_get_protein(arguments)[source]

Get detailed protein information for a GPCR.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - protein: Protein entry name (e.g., adrb2_human) or UniProt accession

_list_proteins(arguments)[source]

List GPCR protein families from GPCRdb.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - family: GPCR family (e.g., “001” for Class A). If provided, returns proteins in that family. - species: Species (ignored if no family specified)

Note: GPCRdb API does not support listing all proteins by species alone. Without family, returns list of protein families.

_get_structures(arguments)[source]

Get GPCR structure information.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - protein: Protein entry name (optional - if not provided, returns all structures) - state: Receptor state filter (active, inactive, intermediate)

_get_ligands(arguments)[source]

Get ligands associated with a GPCR.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - protein: Protein entry name (e.g., adrb2_human)

_get_mutations(arguments)[source]

Get mutation data for a GPCR.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - protein: Protein entry name (e.g., adrb2_human)

class tooluniverse.GProfilerTool[source]

Bases: BaseTool

Tool for g:Profiler functional enrichment, ID conversion, and ortholog mapping.

Supports: - g:GOSt: Functional enrichment analysis (GO, KEGG, Reactome, WP, HP, MIRNA, CORUM) - g:Convert: Gene ID conversion between namespaces - g:Orth: Cross-species ortholog mapping

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the g:Profiler API call.

_query(arguments)[source]

Route to appropriate endpoint.

_parse_gene_list(gene_list_str)[source]

Parse comma-separated gene list into a list.

_enrichment(arguments)[source]

Perform functional enrichment analysis (g:GOSt).

_convert_ids(arguments)[source]

Convert gene identifiers between namespaces (g:Convert).

_find_orthologs(arguments)[source]

Find orthologs across species (g:Orth).

_snpense(arguments)[source]

Map SNP rsIDs to genes and annotate consequences (g:SNPense).

class tooluniverse.GTExEQTLTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GTExExpressionTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.GTExV2Tool[source]

Bases: BaseTool

GTEx Portal API V2 tool for gene expression and eQTL analysis.

Provides access to: - Gene expression data (median, per-sample) - eQTL associations (single-tissue, multi-tissue) - Tissue and sample metadata - Dataset information

__init__(tool_config)[source]
run(arguments)[source]

Execute the GTEx API tool with given arguments.

_get_median_gene_expression(arguments)[source]

Get median gene expression across tissues.

_get_gene_expression(arguments)[source]

Get gene expression data at sample level.

_get_tissue_sites(arguments)[source]

Get tissue site information.

_get_dataset_info(arguments)[source]

Get GTEx dataset information.

_get_eqtl_genes(arguments)[source]

Get eQTL genes (eGenes) with significant cis-eQTLs.

_get_single_tissue_eqtls(arguments)[source]

Get significant single-tissue eQTLs.

_get_multi_tissue_eqtls(arguments)[source]

Get multi-tissue eQTL Metasoft results.

_calculate_eqtl(arguments)[source]

Calculate dynamic eQTL for gene-variant pair.

_get_sample_info(arguments)[source]

Get sample information and metadata.

_get_top_expressed_genes(arguments)[source]

Get top expressed genes for a tissue.

class tooluniverse.GWASAssociationByID[source]

Bases: GWASRESTTool

Get a specific GWAS association by its ID.

__init__(tool_config)[source]
run(arguments)[source]

Get association by ID.

class tooluniverse.GWASAssociationSearch[source]

Bases: GWASRESTTool

Search for GWAS associations by various criteria.

__init__(tool_config)[source]
run(arguments)[source]

Search for associations with optional filters.

class tooluniverse.GWASAssociationsForSNP[source]

Bases: GWASRESTTool

Get all associations for a specific SNP.

__init__(tool_config)[source]
run(arguments)[source]

Get associations for a SNP.

class tooluniverse.GWASAssociationsForStudy[source]

Bases: GWASRESTTool

Get all associations for a specific study.

__init__(tool_config)[source]
run(arguments)[source]

Get associations for a study.

class tooluniverse.GWASAssociationsForTrait[source]

Bases: GWASRESTTool

Get all associations for a specific trait, sorted by p-value.

__init__(tool_config)[source]
run(arguments)[source]

Get associations for a trait, sorted by significance.

class tooluniverse.GWASGeneSearch[source]

Bases: BaseTool

Local tool wrapper for GWAS Catalog REST API. Searches associations by gene name.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.GWASRESTTool[source]

Bases: BaseTool

Base class for GWAS Catalog REST API tools.

__init__(tool_config)[source]
_make_request(endpoint, params=None)[source]

Make a request to the GWAS Catalog API.

_coerce_str(value)[source]

Return a stripped string, or None.

_coerce_int(value)[source]
_efo_id_from_uri_or_id(value)[source]

Best-effort normalize an EFO/OBA/etc identifier.

Accepts either a full URI (e.g., ‘http://www.ebi.ac.uk/efo/OBA_2050062’) or a bare ID (e.g., ‘OBA_2050062’ or ‘OBA:2050062’).

Note: The GWAS Catalog v2 REST API supports filtering by efo_id (and sometimes efo_trait) on associations/studies endpoints. Passing a full URI via efo_uri is not consistently supported; we normalize to efo_id.

_extract_embedded_data(data, data_type)[source]

Extract data from the _embedded structure and add metadata.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.GWASSNPByID[source]

Bases: GWASRESTTool

Get a specific GWAS SNP by its rs ID.

__init__(tool_config)[source]
run(arguments)[source]

Get SNP by rs ID.

class tooluniverse.GWASSNPSearch[source]

Bases: GWASRESTTool

Search for GWAS single nucleotide polymorphisms (SNPs).

__init__(tool_config)[source]
run(arguments)[source]

Search for SNPs with optional filters.

class tooluniverse.GWASSNPsForGene[source]

Bases: GWASRESTTool

Get SNPs mapped to a specific gene.

__init__(tool_config)[source]
run(arguments)[source]

Get SNPs for a gene.

class tooluniverse.GWASStudiesForTrait[source]

Bases: GWASRESTTool

Get studies for a specific trait with optional filters.

__init__(tool_config)[source]
run(arguments)[source]

Get studies for a trait with optional filters.

class tooluniverse.GWASStudyByID[source]

Bases: GWASRESTTool

Get a specific GWAS study by its ID.

__init__(tool_config)[source]
run(arguments)[source]

Get study by ID.

class tooluniverse.GWASStudySearch[source]

Bases: GWASRESTTool

Search for GWAS studies by various criteria.

__init__(tool_config)[source]
run(arguments)[source]

Search for studies with optional filters.

class tooluniverse.GWASVariantsForTrait[source]

Bases: GWASRESTTool

Get all variants associated with a specific trait.

__init__(tool_config)[source]
run(arguments)[source]

Get variants for a trait with pagination support.

class tooluniverse.GeneOntologyTool[source]

Bases: BaseTool

A general-purpose tool for calling the Gene Ontology (GO) API. It is configured via a dictionary that defines the specific API endpoint.

__init__(tool_config)[source]

Initializes the tool with a configuration.

Parameters:

tool_config (Dict) – A dictionary containing ‘fields’ with an ‘endpoint’.

_build_url(args)[source]

Builds the request URL from arguments.

_extract_data(data, extract_path)[source]

Extract specific data from the GO API response using custom paths.

run(arguments=None)[source]

Executes the API call and returns the data.

Parameters:

arguments (Dict[str, Any]) – Parameters for the API call.

Returns

Any: The JSON data from the API or an error dictionary.

search_terms(query)[source]
get_term_details(id)[source]
get_genes_for_term(id, taxon=None, rows=None)[source]
get_terms_for_gene(id)[source]
class tooluniverse.GenomeNexusTool[source]

Bases: BaseTool

Tool for annotating cancer variants using Genome Nexus (MSK).

Supports: - Full variant annotation (VEP + SIFT + PolyPhen + AlphaMissense + hotspots) - Cancer hotspot lookup - Canonical transcript retrieval - Coordinate-based mutation annotation

No authentication required. All coordinates in GRCh37/hg19.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Genome Nexus API call.

_query(arguments)[source]

Route to appropriate endpoint.

_annotate_variant(arguments)[source]

Annotate a variant by HGVS genomic notation.

_annotate_mutation(arguments)[source]

Annotate a mutation by genomic coordinates.

_format_annotation(data)[source]

Format a variant annotation response.

_get_cancer_hotspots(arguments)[source]

Get cancer hotspot data for a variant.

_get_canonical_transcript(arguments)[source]

Get canonical transcript for a gene.

class tooluniverse.GetSPLBySetIDTool[source]

Bases: BaseTool

Get complete SPL label based on SPL Set ID, returns content in XML or JSON format.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

tooluniverse.GetToolInfo

alias of GetToolInfoTool

class tooluniverse.GetToolInfoTool[source]

Bases: BaseTool

Get tool information with configurable detail level. Supports single or batch tool queries.

__init__(tool_config, tooluniverse=None)[source]
run(arguments)[source]

Get tool information with configurable detail level.

Parameters:

arguments (dict) –

Dictionary containing: - tool_names (str | list): Single tool name (string) or list of tool names - detail_level (str, optional): “description” or “full”. Default: “full”

  • ”description”: Returns only the description field (complete, not truncated)

  • ”full”: Returns complete tool definition including parameter schema

Returns:

Dictionary with tool information - Single tool: Direct tool info object - Batch tools: {“tools”: […], “total_requested”: N, “total_found”: M}

Return type:

dict

class tooluniverse.GhostTool[source]

Bases: BaseTool

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.GlyGenTool[source]

Bases: BaseTool

Tool for querying the GlyGen glycoinformatics database.

GlyGen provides access to glycan structures, glycoproteins, glycosylation sites, biosynthetic enzymes, and related publications from integrated sources including GlyTouCan, GlyConnect, UniProt, and PubMed.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the GlyGen API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_glycan_detail(arguments)[source]

Get detailed information about a specific glycan by GlyTouCan accession.

Search for glycans by mass range, monosaccharide count, organism, etc.

_protein_detail(arguments)[source]

Get glycoprotein details including glycosylation sites.

Search for glycoproteins by organism, glycosylation type, etc.

_site_detail(arguments)[source]

Get details about a specific glycosylation site.

class tooluniverse.GraphQLTool[source]

Bases: BaseTool

__init__(tool_config, endpoint_url)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

tooluniverse.GrepTools

alias of GrepToolsTool

class tooluniverse.GrepToolsTool[source]

Bases: BaseTool

Native grep-like pattern search for tools (simple regex, independent from Tool_Finder_Keyword).

__init__(tool_config, tooluniverse=None)[source]
run(arguments)[source]

Search tools using simple text matching or regex pattern matching.

Parameters:

arguments (dict) –

Dictionary containing: - pattern (str): Search pattern (text or regex) - field (str, optional): Field to search in: “name”,

”description”, “type”, “category” (default: “name”)

  • search_mode (str, optional): “text” for simple text matching or “regex” for regex (default: “text”)

  • categories (list, optional): Optional category filter

Returns:

Dictionary with matching tools (name + description)

Return type:

dict

class tooluniverse.GtoPdbRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
_build_url(args)[source]

Build URL with path parameters and query parameters.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.GxATool[source]

Bases: BaseTool

Tool for EBI Gene Expression Atlas API providing access to baseline and differential gene expression experiments across tissues and conditions.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the GxA API call.

_query(arguments)[source]

Route to appropriate endpoint.

_list_experiments(arguments)[source]

List/search gene expression experiments.

_get_experiment_expression(arguments)[source]

Get gene expression data for a specific experiment.

_get_experiment_info(arguments)[source]

Get experiment metadata and factor information.

class tooluniverse.HALTool[source]

Bases: BaseTool

Search the French HAL open archive via its public API.

Parameters:
  • query (str) – Search term (Lucene syntax)

  • max_results (int) – Max results to return (default 10, max 100)

__init__(tool_config, base_url='https://api.archives-ouvertes.fr/search/')[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.HCATool[source]

Bases: BaseTool

Tool for interacting with the Human Cell Atlas (HCA) Data Coordination Platform (DCP) v2 API. Allows searching for projects and retrieving file manifests.

BASE_URL = 'https://service.azul.data.humancellatlas.org'
run(arguments)[source]

Executes the HCA tool action.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing the action and its parameters. Expected keys: - action (str): “search_projects” or “get_file_manifest” - organ (str, optional): Organ to filter by (for search_projects) - disease (str, optional): Disease to filter by (for search_projects) - project_id (str, optional): Project ID (for get_file_manifest) - limit (int, optional): Max results to return (default 10)

Returns:

The results of the action.

Return type:

Dict[str, Any]

search_projects(organ=None, disease=None, limit=10)[source]

Search for projects in the HCA DCP.

get_file_manifest(project_id, limit=10)[source]

Get file download links for a project.

class tooluniverse.HGNCTool[source]

Bases: BaseTool

Tool for querying the HGNC gene nomenclature database.

HGNC provides authoritative human gene naming. Supports fetching genes by symbol, HGNC ID, or searching by various fields including name, location, and aliases.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the HGNC API call.

_query(arguments)[source]

Execute an HGNC query and return structured results.

_fetch(arguments, headers)[source]

Fetch a specific gene record by symbol or HGNC ID.

Search for genes by various criteria.

class tooluniverse.HMDBTool[source]

Bases: BaseTool

Tool for querying HMDB (Human Metabolome Database).

HMDB provides: - Metabolite identification - Chemical properties - Biological functions - Disease associations - Spectral data (MS, NMR)

Uses PubChem for data retrieval with HMDB cross-references.

__init__(tool_config)[source]
run(arguments)[source]

Execute HMDB query based on operation type.

_get_metabolite(arguments)[source]

Get metabolite by HMDB ID.

Uses PubChem to retrieve metabolite data via HMDB ID cross-reference.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - hmdb_id: HMDB ID (e.g., HMDB0000001)

Search for metabolites by name using PubChem.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - query: Search query (metabolite name) - search_type: Type of search (name, formula, mass)

_get_diseases(arguments)[source]

Get disease associations for a metabolite.

Note: Disease associations are best accessed directly from HMDB website.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - hmdb_id: HMDB ID

_parse_xml(xml_text)[source]

Parse HMDB XML response.

class tooluniverse.HPAGetBiologicalProcessTool[source]

Bases: HPASearchApiTool

Get biological process information related to a gene. Get specific biological processes a gene is involved in by gene name.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.HPAGetCancerPrognosticsTool[source]

Bases: HPAJsonApiTool

Get prognostic value of a gene across various cancers. Uses the efficient JSON API to retrieve cancer prognostic data.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.HPAGetComparativeExpressionTool[source]

Bases: HPASearchApiTool

Compare gene expression levels in specific cell lines and healthy tissues. Get expression data for comparison by gene name and cell line name.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_generate_comparison_summary(cell_expr, tissue_expr)[source]

Generate expression level comparison summary

class tooluniverse.HPAGetContextualBiologicalProcessTool[source]

Bases: BaseTool

Analyze a gene’s biological processes in the context of specific tissue or cell line. Enhanced with intelligent context validation and recommendation.

__init__(tool_config)[source]
_validate_context(context_name)[source]

Validate context_name and provide intelligent recommendations

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.HPAGetDiseaseExpressionTool[source]

Bases: HPASearchApiTool

Get expression data for a gene in specific diseases and tissues. Get related expression information by gene name, tissue type, and disease name.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_compare_disease_healthy(disease_expr, healthy_expr)[source]

Compare expression difference between disease and healthy state

class tooluniverse.HPAGetGeneJSONTool[source]

Bases: HPAJsonApiTool

Enhanced legacy tool - Get basic gene information using Ensembl Gene ID. Now uses the efficient JSON API instead of search API.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.HPAGetGenePageDetailsTool[source]

Bases: HPAXmlApiTool

Get detailed information about a gene page, including images, protein expression, antibody data, etc. Get the most comprehensive data by parsing HPA’s single gene XML endpoint. Enhanced version with improved image extraction and comprehensive data parsing based on optimization plan.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_parse_gene_xml(root, ensembl_id, include_images, include_antibodies, include_expression)[source]

Parse gene XML data comprehensively based on actual HPA XML schema

_extract_ihc_images(root)[source]

Extract tissue immunohistochemistry (IHC) images based on actual HPA XML structure

_extract_if_images(root)[source]

Extract subcellular immunofluorescence (IF) images based on actual HPA XML structure

_extract_antibodies(root)[source]

Extract antibody information from actual HPA XML structure

_extract_expression_summary(root)[source]

Extract expression summary information from actual HPA XML structure

_extract_tissue_expression(root)[source]

Extract detailed tissue expression data from actual HPA XML structure

_extract_cell_line_expression(root)[source]

Extract cell line expression data from actual HPA XML structure

class tooluniverse.HPAGetGeneXMLTool[source]

Bases: HPASearchApiTool

Legacy tool - Get gene TSV format data (alternative to XML).

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.HPAGetProteinInteractionsTool[source]

Bases: HPASearchApiTool

Get protein-protein interaction partners for a gene. Uses search API to retrieve interaction data.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.HPAGetRnaExpressionBySourceTool[source]

Bases: HPASearchApiTool

Get RNA expression for a gene from specific biological sources using optimized columns parameter. This tool directly leverages the comprehensive columns table for efficient queries.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.HPAGetRnaExpressionByTissueTool[source]

Bases: HPAJsonApiTool

Query RNA expression levels for a gene in specific tissues. More precise than general tissue expression queries.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_categorize_expression(expr_value)[source]

Categorize expression level

class tooluniverse.HPAGetSubcellularLocationTool[source]

Bases: HPASearchApiTool

Get annotated subcellular locations for a protein using optimized columns parameter. Uses scml (main location) and scal (additional location) columns for efficient queries.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_generate_location_summary(main_locs, add_locs)[source]

Generate a summary of subcellular locations

class tooluniverse.HPAJsonApiTool[source]

Bases: BaseTool

Base class for interacting with HPA’s /{ensembl_id}.json API. More efficient for getting comprehensive gene data.

__init__(tool_config)[source]
_make_api_request(ensembl_id)[source]

Make HPA JSON API request for a specific gene

class tooluniverse.HPASearchApiTool[source]

Bases: BaseTool

Base class for interacting with HPA’s search_download.php API. Uses HPA’s search and download API to get protein expression data.

__init__(tool_config)[source]
_make_api_request(search_term, columns, format_type='json')[source]

Make HPA API request with improved error handling

class tooluniverse.HPASearchGenesTool[source]

Bases: HPASearchApiTool

Search for matching genes by gene name, keywords, or cell line names and return Ensembl ID list. This is the entry tool for many query workflows.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.HPASearchTool[source]

Bases: HPASearchApiTool

Generic search tool for Human Protein Atlas.

This tool allows custom search queries and retrieval of specific columns from the Human Protein Atlas API. It provides more flexibility than the specialized tools by allowing direct access to the search API with custom parameters.

Parameters:
  • search_query (str) – The search term to query for (e.g., gene name, description).

  • columns (str, optional) –

    Comma-separated list of columns to retrieve. Defaults to “g,gs,gd” (Gene, Gene synonym, Gene description).

    Available columns and their specifiers: - g: Gene name - gs: Gene synonym - gd: Gene description - e: Ensembl ID - u: UniProt ID - en: Enhanced - pe: Protein existence - r: Reliability - p: Pathology - c: Cancer - pt: Protein tissue - ptm: Predicted Transmembrane - s: Subcellular location - scml: Subcellular main location - scal: Subcellular additional location - rnat: RNA tissue specificity - rnats: RNA tissue specific score - rnatsm: RNA tissue specific nTPM - rnablm: RNA blood lineage specific nTPM - rnabrm: RNA brain region specific nTPM - rnascm: RNA single cell type specific nTPM

    See HPA API documentation for the full list of over 40 available columns.

  • format (str, optional) – Response format, “json” or “tsv”. Defaults to “json”.

Returns:

A dictionary containing the search results.

If successful, returns the API response (list of entries). If failed, returns a dictionary with an “error” key.

Return type:

dict

Example

>>> tool = HPASearchTool()
>>> result = tool.run({
...     "search_query": "p53",
...     "columns": "g,gs,scml,rnat",
...     "format": "json"
... })
>>> print(result[0]["Gene"])
TP53
run(arguments)[source]

Execute the search tool.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing: - search_query (str): The term to search for. - columns (str, optional): Columns to retrieve. - format (str, optional): Response format.

Returns:

Search results or error message.

Return type:

Dict[str, Any]

class tooluniverse.HPAXmlApiTool[source]

Bases: BaseTool

Base class for interacting with HPA’s /{ensembl_id}.xml API. Optimized for comprehensive XML data extraction.

__init__(tool_config)[source]
_make_api_request(ensembl_id)[source]

Make HPA XML API request for a specific gene

class tooluniverse.HPOTool[source]

Bases: BaseTool

Tool for querying the Human Phenotype Ontology (HPO) at JAX.

HPO provides structured phenotype terms used in clinical genetics, rare disease research, and differential diagnosis. Each term has definitions, synonyms, cross-references, and hierarchical relationships.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the HPO API call.

_query(arguments)[source]

Route to appropriate HPO endpoint.

_get_term(arguments)[source]

Get detailed information about an HPO term by its ID.

_search_terms(arguments)[source]

Search for HPO terms by keyword.

_get_term_hierarchy(arguments)[source]

Get parent and child terms in the HPO hierarchy.

class tooluniverse.HarmonizomeTool[source]

Bases: BaseTool

Tool for querying Harmonizome gene and dataset information.

Supports: - Gene details (symbol, name, description, synonyms, proteins) - Dataset catalog (100+ integrated genomics datasets)

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Harmonizome API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_gene(arguments)[source]

Get gene details from Harmonizome.

_list_datasets(arguments)[source]

List all available Harmonizome datasets.

class tooluniverse.HealthDisparitiesTool[source]

Bases: BaseTool

Health disparities data information tool.

__init__(tool_config)[source]
_get_svi_info(arguments)[source]

Get SVI data source information.

_get_county_rankings_info(arguments)[source]

Get County Health Rankings information.

run(arguments)[source]

Execute the health disparities tool.

class tooluniverse.HumanBaseTool[source]

Bases: BaseTool

Tool to retrieve protein-protein interactions and biological processes from HumanBase.

__init__(tool_config)[source]
run(arguments)[source]

Main entry point for the tool.

get_official_gene_name(gene_name)[source]

Retrieve the official gene symbol (same as EnrichrTool method)

Parameters

gene_name (str): The gene name or synonym to query.

Returns

str: The official gene symbol.

get_entrez_ids(gene_names)[source]

Convert gene names to Entrez IDs using NCBI Entrez API.

Parameters

gene_names (list): List of gene names to convert.

Returns

list: List of Entrez IDs corresponding to the gene names.

humanbase_ppi_retrieve(genes, tissue, max_node=10, interaction=None)[source]

Retrieve protein-protein interactions and biological processes from HumanBase.

Parameters

genes (list): List of gene names to analyze. tissue (str): Tissue type for tissue-specific interactions. max_node (int): Maximum number of nodes to retrieve. interaction (str): Specific interaction type to filter by.

Returns

tuple: (NetworkX Graph of interactions, list of biological processes)

_convert_to_string(graph, bp_collection, original_genes, tissue)[source]

Convert NetworkX graph and biological processes to string representation.

Parameters

graph (networkx.Graph): The network graph. bp_collection (list): List of biological processes. original_genes (list): Original gene list provided by user. tissue (str): Tissue type used for analysis.

Returns

str: Comprehensive string representation of the network data.

_get_current_timestamp()[source]

Get current timestamp for the report.

class tooluniverse.ICD10Tool[source]

Bases: BaseTool

Tool for ICD-10-CM codes using external API.

__init__(tool_config)[source]
_build_url(arguments)[source]

Build the full URL from endpoint template and arguments.

_make_request(arguments)[source]

Make request to ICD-10 API (NLM Clinical Tables).

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.ICDTool[source]

Bases: BaseTool

WHO ICD-11 API tool for disease classification and coding.

__init__(tool_config)[source]
_get_access_token()[source]

Get OAuth2 access token for ICD API (cached until near expiry).

_PLACEHOLDER_KEYS = {'{code}': 'code', '{entity_id}': 'entity_id', '{linearization}': 'linearization'}
_build_url(arguments)[source]

Build the full URL from endpoint template and arguments.

_BOOL_PARAMS = ('flatResults', 'useFlexisearch')
_make_request(arguments)[source]

Make request to ICD API.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.IEDBTool[source]

Bases: BaseTool

Tool for interacting with the IEDB Query API (PostgREST).

This tool is JSON-config driven: each tool config supplies fields.endpoint and (optionally) fields.default_params + fields.shorthand_filters to map friendly arguments into PostgREST filter expressions (e.g., eq.123, ilike.*KVF*).

QUERY_API_URL = 'https://query-api.iedb.org'
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.IMGTTool[source]

Bases: BaseTool

Tool for accessing IMGT immunoglobulin/TCR data.

IMGT provides: - Immunoglobulin gene sequences - T cell receptor sequences - MHC/HLA sequences - Germline gene assignments

Uses EBI DBFetch for sequence retrieval. No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute IMGT query based on operation type.

_get_sequence(arguments)[source]

Get immunoglobulin/TCR sequence by accession.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - accession: IMGT/LIGM-DB accession or EMBL/GenBank accession - format: Output format (fasta, embl). Default: fasta

_search_genes(arguments)[source]

Search IMGT for immunoglobulin/TCR genes.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - query: Search query (gene name, species) - gene_type: Gene type filter (IGHV, IGKV, IGLV, TRAV, TRBV, etc.) - species: Species filter (e.g., Homo sapiens)

_get_gene_info(arguments)[source]

Get information about IMGT gene nomenclature and databases.

Parameters:

arguments (Dict[str, Any]) – Dict (no required parameters)

class tooluniverse.IMPCTool[source]

Bases: BaseTool

Tool for querying IMPC mouse phenotyping data via Solr API.

Provides access to: - Gene information and phenotyping status - Mouse knockout phenotype associations (MP terms) - Statistical results from standardized phenotyping - Viability and fertility data

No authentication required. Data freely available (CC-BY 4.0).

__init__(tool_config)[source]
run(arguments)[source]

Execute the IMPC API call.

_solr_query(core, query, rows=50, fields=None, filter_query=None)[source]

Execute a Solr query against an IMPC core.

_get_gene_summary(arguments)[source]

Get gene summary from IMPC including phenotyping status, viability, and basic info.

Queries the ‘gene’ core for a given gene symbol.

_get_phenotypes_by_gene(arguments)[source]

Get all phenotype annotations for a gene from IMPC knockout mice.

Queries the ‘genotype-phenotype’ core for significant phenotype calls.

_search_genes(arguments)[source]

Search IMPC for genes matching a query string.

Useful for finding MGI IDs from gene symbols or partial names.

_get_gene_phenotype_hits(arguments)[source]

Get statistical results for a gene including p-values and effect sizes.

Queries the ‘statistical-result’ core for detailed phenotyping statistics.

class tooluniverse.INaturalistTool[source]

Bases: BaseTool

Tool for querying iNaturalist biodiversity data.

iNaturalist aggregates citizen science observations from around the world. Research-grade observations are community-verified and used in scientific research. Covers all kingdoms of life with over 150 million observations.

Supports: taxa search, taxon details, observation search, species counts.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the iNaturalist API call.

_query(arguments)[source]

Route to appropriate iNaturalist endpoint.

_search_taxa(arguments)[source]

Search for taxa by name.

_get_taxon(arguments)[source]

Get detailed taxon information by ID.

_search_observations(arguments)[source]

Search for species observations.

_get_species_counts(arguments)[source]

Get species counts for a taxon group or location.

class tooluniverse.ITISTool[source]

Bases: BaseTool

Tool for querying the ITIS taxonomic database.

ITIS provides standardized species names, classification hierarchies, common names, and authority references. Supports search by scientific name, common name, TSN (Taxonomic Serial Number), and hierarchy retrieval.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the ITIS API call.

_query(arguments)[source]

Route to appropriate ITIS endpoint.

_search_scientific(arguments)[source]

Search for taxa by scientific name.

_search_common(arguments)[source]

Search for taxa by common name.

_get_hierarchy(arguments)[source]

Get full taxonomic hierarchy for a TSN.

_get_full_record(arguments)[source]

Get complete taxonomic record for a TSN.

class tooluniverse.IdentifiersOrgTool[source]

Bases: BaseRESTTool

Tool for Identifiers.org - biological identifier resolution service.

Resolves compact identifiers (e.g., ‘uniprot:P04637’) to resource URLs and searches the namespace registry.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Identifiers.org API call.

_query(arguments)[source]
_resolve(arguments)[source]

Resolve a compact identifier to resource URLs.

_get_namespace(arguments)[source]

Get namespace details by prefix.

_search_namespaces(arguments)[source]

Search namespaces by keyword.

_list_namespaces(arguments)[source]

List all registered namespaces with pagination.

class tooluniverse.IntActRESTTool[source]

Bases: BaseTool

IntAct REST API tool. Generic wrapper for IntAct API endpoints defined in intact_tools.json.

__init__(tool_config)[source]
_build_url(args)[source]

Build URL from endpoint template and arguments

_build_params(args)[source]

Build query parameters for IntAct API

run(arguments)[source]

Execute the IntAct API call

Use EBI Search API as fallback for IntAct queries

_use_complex_web_service(arguments)[source]

Use IntAct Complex Web Service for complex queries

_get_complex_details(arguments)[source]

Get detailed information about a specific complex by complex AC

class tooluniverse.InterProDomainArchTool[source]

Bases: BaseTool

Tool for InterPro domain architecture analysis via the InterPro API.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the InterPro API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_protein_domain_architecture(arguments)[source]

Get Pfam domain architecture for a protein with exact positions.

_get_structures_for_domain(arguments)[source]

Find PDB structures containing a specific Pfam domain.

_get_clan_members(arguments)[source]

Get member families in a Pfam clan (superfamily).

class tooluniverse.InterProEntryTool[source]

Bases: BaseTool

Tool for InterPro entry API providing protein-to-domain mappings and domain/family search.

Complements existing InterPro tools by offering reverse lookups (protein -> all domains) and keyword-based entry search.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the InterPro entry API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_entries_for_protein(arguments)[source]

Get all InterPro domain/family entries annotated on a protein.

_search_entries(arguments)[source]

Search InterPro entries by keyword.

class tooluniverse.InterProExtTool[source]

Bases: BaseTool

Extended InterPro API tool for protein-by-domain queries.

Complements existing InterPro tools (get_protein_domains, search_domains, get_domain_details) by providing reverse lookup: find all proteins containing a specific domain.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the InterPro API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_proteins_by_domain(arguments)[source]

Get proteins containing a specific InterPro domain.

class tooluniverse.InterProRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
_build_url(args)[source]

Build URL from endpoint template and arguments

_extract_data(data, extract_path=None)[source]

Extract specific data from API response

run(arguments)[source]

Execute the InterPro API call

class tooluniverse.InterProScanTool[source]

Bases: BaseTool

Tool for running InterProScan sequence analysis via EBI REST API.

Provides protein domain/family prediction by scanning sequences against: - Pfam - PRINTS - ProSite - SMART - Gene3D - TIGRFAM - SUPERFAMILY - CDD - PANTHER

Job-based API: Submit sequence, poll for results. Max 100 sequences per request. Results available for 7 days.

MAX_POLL_ATTEMPTS = 60
POLL_INTERVAL = 2
__init__(tool_config)[source]
run(arguments)[source]

Execute the InterProScan API call.

_scan_sequence(arguments)[source]

Submit a protein sequence for InterProScan analysis.

Submits the job and polls for results (up to 2 minutes). For longer jobs, use get_job_status and get_job_results.

_fetch_results(job_id)[source]

Fetch and parse InterProScan results.

_get_job_status(arguments)[source]

Check the status of an InterProScan job.

Status values: RUNNING, FINISHED, FAILURE, ERROR, NOT_FOUND

_get_job_results(arguments)[source]

Get results for a completed InterProScan job.

Job results are available for 7 days after completion.

class tooluniverse.JASPARRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
_build_url(args)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.KEGGExtTool[source]

Bases: BaseTool

Tool for KEGG REST API extended endpoints providing gene-pathway links, pathway gene lists, and compound details.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the KEGG API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_gene_pathways(arguments)[source]

Get all KEGG pathways that a gene participates in.

_get_pathway_genes(arguments)[source]

Get all genes in a KEGG pathway.

_get_compound(arguments)[source]

Get KEGG compound/metabolite details.

_list_brite(arguments)[source]

List all available KEGG BRITE hierarchy classifications.

_get_brite_hierarchy(arguments)[source]

Get a specific KEGG BRITE hierarchy as a JSON tree.

class tooluniverse.KEGGFindGenes[source]

Bases: KEGGRESTTool

Find genes by keyword in KEGG database.

__init__(tool_config)[source]
run(arguments)[source]

Find genes with keyword.

class tooluniverse.KEGGGetGeneInfo[source]

Bases: KEGGRESTTool

Get detailed gene information by gene ID.

__init__(tool_config)[source]
run(arguments)[source]

Get gene information.

class tooluniverse.KEGGGetPathwayInfo[source]

Bases: KEGGRESTTool

Get detailed pathway information by pathway ID.

__init__(tool_config)[source]
run(arguments)[source]

Get pathway information.

class tooluniverse.KEGGListOrganisms[source]

Bases: KEGGRESTTool

List available organisms in KEGG database.

__init__(tool_config)[source]
run(arguments)[source]

List organisms.

class tooluniverse.KEGGRESTTool[source]

Bases: BaseTool

Base class for KEGG REST API tools.

__init__(tool_config)[source]
_make_request(endpoint, params=None)[source]

Make a request to the KEGG API.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.KEGGSearchPathway[source]

Bases: KEGGRESTTool

Search KEGG pathways by keyword.

__init__(tool_config)[source]
run(arguments)[source]

Search pathways with keyword.

class tooluniverse.LOINCTool[source]

Bases: BaseTool

LOINC tool for lab tests, code details, answer lists, and clinical forms.

__init__(tool_config)[source]
_make_request(endpoint, params)[source]

Make a request to the LOINC Clinical Tables API.

static _is_api_error(api_response)[source]

Check if an API response is an error dict.

_parse_search_results(api_response, fields)[source]

Parse the Clinical Tables response: [total_count, codes, extra_info, data].

_search_loinc_items(arguments)[source]

Search LOINC lab tests and observations by name or keywords.

_get_code_details(arguments)[source]

Get detailed information for a specific LOINC code.

_get_answer_list(arguments)[source]

Search for LOINC answer-type codes matching a search term.

_search_forms(arguments)[source]

Search LOINC forms and survey instruments (e.g., PHQ-9, GAD-7).

_OPERATION_MAP = {'get_answer_list': '_get_answer_list', 'get_code_details': '_get_code_details', 'search_forms': '_search_forms', 'search_tests': '_search_loinc_items'}
run(arguments)[source]

Execute the LOINC tool based on the operation derived from tool config name.

class tooluniverse.L1000FWDTool[source]

Bases: BaseTool

Tool for querying the L1000FWD Connectivity Map API.

Provides access to: - Signature search: find L1000 signatures similar or opposite to a user gene set

__init__(tool_config)[source]
run(arguments)[source]

Execute the L1000FWD tool with given arguments.

Search L1000 signatures similar or opposite to a gene expression signature.

class tooluniverse.LipidMapsTool[source]

Bases: BaseTool

Tool for querying LIPID MAPS Structure Database REST API.

LIPID MAPS provides comprehensive lipidomics data including: - Lipid structure information (LMSD - LIPID MAPS Structure Database) - Lipid-related gene information (LMPD - LIPID MAPS Proteome Database) - Lipid-related protein information - Mass spectrometry m/z search

No authentication required. Free for academic/research use.

URL Pattern: /rest/{context}/{input_item}/{input_value}/{output_item}/{output_format}

__init__(tool_config)[source]
run(arguments)[source]

Execute the LIPID MAPS API call based on the configured context.

_make_request(sub_path)[source]

Central method to handle API requests and response parsing.

_query_compound(arguments)[source]

Query compound/lipid information from LMSD.

_query_gene(arguments)[source]

Query lipid-related gene information from LMPD.

_query_protein(arguments)[source]

Query lipid-related protein information from LMPD.

_search_moverz(arguments)[source]

Search lipids by m/z value for mass spectrometry identification.

tooluniverse.ListTools

alias of ListToolsTool

class tooluniverse.ListToolsTool[source]

Bases: BaseTool

Unified tool listing with multiple modes.

Note: Defaults to mode=’names’ to avoid huge outputs when many tools are loaded. For getting tool descriptions or detailed information, use the ‘get_tool_info’ tool instead (supports single or batch queries), as modes like ‘basic’/’summary’ can return very large payloads.

__init__(tool_config, tooluniverse=None)[source]
run(arguments)[source]

List tools with configurable output format via mode parameter.

Parameters:

arguments (dict) –

Dictionary containing: - mode (str, optional, default=”names”): Output mode

  • ”names”: Return only tool names (default, recommended for large tool sets)

  • ”basic”: Return name + description (warning: can return very large payloads)

  • ”categories”: Return category statistics

  • ”by_category”: Return tools grouped by category

  • ”summary”: Return name + description + type + has_parameters (warning: can return very large payloads)

  • ”custom”: Return user-specified fields

Note: For getting tool descriptions, use ‘get_tool_info’ tool instead of ‘basic’/’summary’ modes to avoid large payloads. - categories (list, optional): Filter by categories - fields (list, required for mode=”custom”): Fields to include - group_by_category (bool, optional): Group by category

(mode=”names”|”basic”|”summary”)

  • brief (bool, optional): Truncate description (mode=”basic”|”summary”)

Returns:

Dictionary with tools in requested format

Return type:

dict

class tooluniverse.MCPAutoLoaderTool[source]

Bases: BaseTool, BaseMCPClient

An advanced MCP tool that automatically discovers and loads all tools from an MCP server. It can register discovered tools as individual ToolUniverse tools for seamless usage.

__init__(tool_config)[source]
async discover_tools()[source]

Discover all available tools from the MCP server

async call_tool(tool_name, arguments)[source]

Directly call an MCP tool by name

generate_proxy_tool_configs()[source]

Generate proxy tool configurations for discovered tools

register_tools_in_engine(engine)[source]

Register discovered tools using ToolUniverse public API

async auto_load_and_register(engine)[source]

Automatically discover, load and register all MCP tools

run(arguments)[source]

Main run method for the auto-loader tool

__del__()[source]

Cleanup when object is destroyed

class tooluniverse.MCPClientTool[source]

Bases: BaseTool, BaseMCPClient

A tool that acts as an MCP client to connect to existing MCP servers. Supports both HTTP and WebSocket transports.

__init__(tool_config)[source]
async list_tools()[source]

List available tools from the MCP server

async call_tool(name, arguments)[source]

Call a tool on the MCP server

async list_resources()[source]

List available resources from the MCP server

async read_resource(uri)[source]

Read a resource from the MCP server

async list_prompts()[source]

List available prompts from the MCP server

async get_prompt(name, arguments=None)[source]

Get a prompt from the MCP server

run(arguments)[source]

Main run method for the tool. Supports different operations based on the ‘operation’ argument.

async _run_list_tools()[source]

Run list_tools operation

async _run_call_tool(arguments)[source]

Run call_tool operation

async _run_list_resources()[source]

Run list_resources operation

async _run_read_resource(arguments)[source]

Run read_resource operation

async _run_list_prompts()[source]

Run list_prompts operation

async _run_get_prompt(arguments)[source]

Run get_prompt operation

class tooluniverse.MCPProxyTool[source]

Bases: MCPClientTool

A proxy tool that automatically forwards tool calls to an MCP server. This creates individual tools for each tool available on the MCP server.

__init__(tool_config)[source]
run(arguments)[source]

Forward the call directly to the target tool on the MCP server

class tooluniverse.MCPServerDiscovery[source]

Bases: object

Helper class to discover and create tool configurations for MCP servers.

async static discover_server_tools(server_url, transport='http')[source]

Discover all tools available on an MCP server and return tool configurations.

static create_mcp_tools_config(server_configs)[source]

Create tool configurations for multiple MCP servers.

Parameters:

server_configs (List[Dict[str, str]]) – List of server configurations, each containing: - server_url: URL of the MCP server - transport: ‘http’ or ‘websocket’ (optional, defaults to ‘http’) - server_name: Name prefix for tools (optional)

Returns:

List of tool configurations that can be loaded into ToolUniverse

Return type:

List[Dict[str, Any]]

class tooluniverse.MGnifyAnalysesTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.MGnifyExpandedTool[source]

Bases: BaseTool

Expanded tool for querying MGnify metagenomics database.

Covers genome catalog, taxonomic profiling, biome browsing, and sample metadata - extending existing study/analysis tools.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the MGnify API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_genome_detail(arguments)[source]

Get detailed information about a MGnify genome.

Search/list MGnify genomes with optional filters.

_biome_list(arguments)[source]

Browse/search MGnify biome hierarchy.

_study_detail(arguments)[source]

Get detailed information about a specific MGnify study.

class tooluniverse.MGnifyStudiesTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.MPDRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.MarkItDownTool[source]

Bases: BaseTool

MarkItDown tool for converting files to Markdown.

__init__(tool_config)[source]
run(arguments)[source]

Execute MarkItDown tool.

_convert_to_markdown(arguments)[source]

Convert a resource described by URI to Markdown using markitdown CLI.

_download_from_url(url)[source]

Download content from URL to temporary file.

_handle_data_uri(data_uri)[source]

Handle data URI and save to temporary file.

class tooluniverse.MeSHTool[source]

Bases: BaseTool

Tool for querying NLM’s MeSH (Medical Subject Headings) vocabulary.

MeSH is the authoritative vocabulary for biomedical indexing, used by PubMed to categorize literature. Supports descriptor lookup, term search, and hierarchical tree browsing.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the MeSH API call.

_query(arguments)[source]

Route to appropriate MeSH endpoint.

_search_descriptors(arguments)[source]

Search MeSH descriptors (main headings) by label.

_get_descriptor(arguments)[source]

Get detailed information for a MeSH descriptor by its ID.

_search_terms(arguments)[source]

Search MeSH terms (entry terms/synonyms) by label.

class tooluniverse.MedlinePlusRESTTool[source]

Bases: BaseTool

MedlinePlus REST API tool class. Supports health topic search, code lookup, genetics information retrieval, etc.

__init__(tool_config)[source]
_build_url(arguments)[source]

Build complete URL

_extract_text_content(text_item)[source]

Extract content from text item

_format_response(response, tool_name)[source]

Format response content

run(arguments)[source]

Execute tool call

search_topics_by_keyword(term, db, rettype='brief')[source]
connect_lookup_by_code(cs, c, dn=None, language='en', format='json')[source]
get_genetics_condition_by_name(condition, format='json')[source]
get_genetics_gene_by_name(gene, format='json')[source]
get_genetics_index()[source]
class tooluniverse.MetaCycTool[source]

Bases: BaseTool

Tool for querying MetaCyc metabolic pathway database.

MetaCyc provides: - Experimentally elucidated metabolic pathways - Enzymes and reactions - Metabolites and compounds - Pathway diagrams

Uses BioCyc web services API. No authentication required for basic access.

__init__(tool_config)[source]
run(arguments)[source]

Execute MetaCyc query based on operation type.

_search_pathways(arguments)[source]

Search MetaCyc for pathways.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - query: Search query (pathway name or keyword)

_get_pathway(arguments)[source]

Get pathway details by MetaCyc pathway ID.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - pathway_id: MetaCyc pathway ID (e.g., PWY-5177)

_get_compound(arguments)[source]

Get compound details from MetaCyc.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - compound_id: MetaCyc compound ID (e.g., CPD-1)

_get_reaction(arguments)[source]

Get reaction details from MetaCyc.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - reaction_id: MetaCyc reaction ID (e.g., RXN-14500)

class tooluniverse.MetaboLightsRESTTool[source]

Bases: BaseTool

MetaboLights REST API tool. Generic wrapper for MetaboLights API endpoints defined in metabolights_tools.json.

__init__(tool_config)[source]
_build_url(args)[source]

Build URL from endpoint template and arguments

_build_params(args)[source]

Build query parameters for MetaboLights API

_extract_samples_from_study(study_id)[source]

Extract sample information from study endpoint as fallback

_extract_files_from_study(study_id)[source]

Extract file information from study endpoint as fallback

run(arguments)[source]

Execute the MetaboLights API call

class tooluniverse.MetabolomicsWorkbenchTool[source]

Bases: BaseTool

Tool for querying Metabolomics Workbench REST API.

Metabolomics Workbench provides metabolomics data including: - Study metadata and experimental results - Compound/metabolite information and structures - RefMet standardized nomenclature - Mass spectrometry data searches

No authentication required. Free for academic/research use.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Metabolomics Workbench API call.

_make_request(sub_path)[source]

Central method to handle API requests and response validation.

_normalize_numeric_fields(data)[source]

Convert numeric string fields to actual numbers.

_query_study(arguments)[source]

Query study metadata.

_query_compound(arguments)[source]

Query compound information.

_query_refmet(arguments)[source]

Query RefMet nomenclature.

_search_moverz(arguments)[source]

Search by m/z value.

_search_exactmass(arguments)[source]

Search by exact mass.

class tooluniverse.MobiDBTool[source]

Bases: BaseTool

Tool for querying MobiDB protein disorder database.

Supports: - Get protein disorder predictions, curated regions, PTMs, binding modes - Get consensus disorder summary for a protein

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the MobiDB API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_protein(arguments)[source]

Get comprehensive disorder data for a protein from MobiDB.

_get_consensus(arguments)[source]

Get consensus disorder summary for a protein.

class tooluniverse.Molecule2DTool[source]

Bases: VisualizationTool

Tool for visualizing 2D molecular structures using RDKit.

run(arguments)[source]

Generate 2D molecular structure visualization.

_resolve_molecule_name(name)[source]

Resolve molecule name to SMILES using PubChem.

_calculate_molecular_properties(mol)[source]

Calculate basic molecular properties.

_create_molecule_html(mol, input_data, input_type, width, height, static_image, output_format)[source]

Create HTML content for molecule visualization.

class tooluniverse.Molecule3DTool[source]

Bases: VisualizationTool

Tool for visualizing 3D molecular structures using RDKit and py3Dmol.

run(arguments)[source]

Generate 3D molecular structure visualization.

_calculate_molecular_properties(mol)[source]

Calculate basic molecular properties.

_create_molecule_html(mol, input_data, input_type, width, height, mol_props, style, color_scheme)[source]

Create HTML content for molecule 3D visualization.

_create_molecule_control_panel(current_style, current_color)[source]

Create floating control panel HTML for molecules.

_create_toolbar()[source]

Create bottom toolbar HTML.

_create_molecule_info_cards(input_data, mol_props)[source]

Create molecule information cards.

tooluniverse.Monarch

alias of MonarchTool

tooluniverse.MonarchDiseasesForMultiplePheno

alias of MonarchDiseasesForMultiplePhenoTool

class tooluniverse.MonarchDiseasesForMultiplePhenoTool[source]

Bases: MonarchTool

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.MonarchTool[source]

Bases: RESTfulTool

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.MonarchV3Tool[source]

Bases: BaseTool

Tool for querying the Monarch Initiative V3 knowledge graph.

Monarch provides integrated data linking genes, diseases, phenotypes, and model organisms. The V3 API supports entity lookup, association queries, and cross-species phenotype comparisons. Data sources include OMIM, ClinVar, HPO, MGI, ZFIN, FlyBase, WormBase, and others.

Supports: entity lookup, phenotype associations, disease-gene associations.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Monarch V3 API call.

_query(arguments)[source]

Route to appropriate Monarch V3 endpoint.

_get_entity(arguments)[source]

Get detailed entity information by CURIE identifier.

_get_associations(arguments)[source]

Get associations for an entity with filtering by category.

Search Monarch knowledge graph for entities by name/keyword.

class tooluniverse.MyChemTool[source]

Bases: BaseTool

Tool for querying MyChem.info API.

MyChem.info provides chemical/drug annotation data from 30+ sources for 90M+ chemicals and drugs.

No authentication required. Free for academic/research use.

MYCHEM_BASE_URL = 'https://mychem.info/v1'
__init__(tool_config)[source]
run(arguments)[source]

Execute the MyChem.info API call.

_query_chemicals(arguments)[source]

Query chemicals/drugs by name, InChIKey, or other identifiers.

Endpoint: GET /query

_get_chemical(arguments)[source]

Get detailed chemical annotation by InChIKey or other ID.

Endpoint: GET /chem/<chemid>

class tooluniverse.MyDiseaseTool[source]

Bases: BaseTool

Tool for MyDisease.info BioThings API providing aggregated disease annotations from MONDO, Disease Ontology, CTD, HPO, and DisGeNET.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the MyDisease.info API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_disease(arguments)[source]

Get comprehensive disease annotations by disease ID.

_search_diseases(arguments)[source]

Search diseases by keyword.

class tooluniverse.MyGeneTool[source]

Bases: BaseTool

Tool for querying MyGene.info API.

MyGene.info provides gene annotation data from 30+ sources including Entrez Gene, Ensembl, UniProt, HGNC, and more.

No authentication required. Free for academic/research use.

__init__(tool_config)[source]
run(arguments)[source]

Execute the MyGene.info API call.

_query_genes(arguments)[source]

Query genes by keyword, symbol, or other identifiers.

Endpoint: GET /query

_get_gene(arguments)[source]

Get detailed gene annotation by gene ID.

Endpoint: GET /gene/<geneid>

_query_batch(arguments)[source]

Query multiple genes at once using POST.

Endpoint: POST /query

class tooluniverse.MyVariantTool[source]

Bases: BaseTool

Tool for querying MyVariant.info API.

MyVariant.info provides variant annotation data from 19+ sources for 400M+ human variants.

No authentication required. Free for academic/research use.

MYVARIANT_BASE_URL = 'https://myvariant.info/v1'
__init__(tool_config)[source]
run(arguments)[source]

Execute the MyVariant.info API call.

_query_variants(arguments)[source]

Query variants by various criteria.

Endpoint: GET /query

_get_variant(arguments)[source]

Get detailed variant annotation by HGVS ID.

Endpoint: GET /variant/<hgvsid>

class tooluniverse.NCBIBlastTool[source]

Bases: BaseTool

__init__(tool_config)[source]
_parse_blast_results(blast_xml)[source]

Parse BLAST XML results into structured data

run(arguments)[source]

Execute BLAST search using NCBI Web service

class tooluniverse.NCBIDatasetsTool[source]

Bases: BaseTool

Tool for querying the NCBI Datasets API v2.

Provides access to gene information by ID/symbol, gene orthologs, genome assembly reports by taxon, taxonomy details by taxon ID, and taxonomy name suggestions.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the NCBI Datasets API call.

_query(arguments)[source]

Route to the appropriate NCBI Datasets endpoint.

_get_gene_by_id(arguments)[source]

Get gene information by NCBI Gene ID.

_get_gene_by_symbol(arguments)[source]

Get gene information by gene symbol and taxon.

_get_gene_orthologs(arguments)[source]

Get orthologs for a gene by NCBI Gene ID.

_get_taxonomy(arguments)[source]

Get taxonomy information by NCBI Taxonomy ID.

_get_taxonomy_suggest(arguments)[source]

Suggest taxonomy names matching a query string.

_extract_locations(gene_data)[source]

Extract genomic location information from annotations.

class tooluniverse.NCBIEUtilsTool[source]

Bases: BaseTool

Base class for NCBI E-utilities tools with rate limiting.

__init__(tool_config)[source]
_make_request(endpoint, params=None)[source]

Make request with rate limiting and retry logic.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.NCBINucleotideSearchTool[source]

Bases: NCBIEUtilsTool

NCBI Nucleotide Database Search Tool using E-utilities. Searches GenBank/EMBL/RefSeq for DNA/RNA sequences by organism, gene, keywords.

__init__(tool_config)[source]
run(arguments)[source]

Execute the nucleotide search with given arguments.

_build_search_term(arguments)[source]

Build NCBI search term from arguments.

_search_nucleotide(arguments)[source]

Search NCBI nucleotide database and return UIDs. Uses esearch to find matching records.

_fetch_accession(arguments)[source]

Fetch accession numbers for given UIDs. Uses efetch with rettype=acc to get just accession numbers.

_fetch_sequence(arguments)[source]

Fetch sequence data for given accession(s). Uses efetch to retrieve sequences in specified format.

class tooluniverse.NCBISRATool[source]

Bases: NCBIEUtilsTool

NCBI SRA Tool using E-utilities for sequencing run metadata and downloads.

_OPERATIONS = {'get_download_urls': '_get_download_urls', 'get_run_info': '_get_run_info', 'link_to_biosample': '_link_to_biosample', 'search': '_search_sra_runs'}
__init__(tool_config)[source]
static _normalize_accessions(arguments)[source]

Extract and normalize accessions from arguments, always returning a list.

run(arguments)[source]

Execute the SRA tool with given arguments.

_SEARCH_FIELDS = {'organism': 'Organism', 'platform': 'Platform', 'source': 'Source', 'strategy': 'Strategy', 'study': 'Study'}
_build_search_term(arguments)[source]

Build NCBI SRA search term from arguments.

_search_sra_runs(arguments)[source]

Search SRA database for runs using esearch.

_get_run_info(arguments)[source]

Get metadata for SRA run accessions via efetch XML.

_parse_sra_xml(xml_data)[source]

Parse SRA XML metadata to extract run information.

_get_download_urls(arguments)[source]

Get FTP, S3, and NCBI download URLs for SRA run accessions.

Link SRA runs to BioSample records via elink.

class tooluniverse.NCCNGuidelineTool[source]

Bases: BaseTool

National Comprehensive Cancer Network (NCCN) guideline tools.

Supports three operations: - list_patient: List NCCN Guidelines for Patients (free, scraped from nccn.org) - search: Search NCCN content via PubMed (JNCCN journal articles) - get_patient: Get content from a specific NCCN patient guideline page

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_list_patient_guidelines(arguments)[source]

List all NCCN Guidelines for Patients from nccn.org.

Search NCCN content via PubMed.

_get_patient_guideline(arguments)[source]

Get content from a specific NCCN patient guideline — scrapes detail page and extracts text directly from the PDF using pdfplumber.

class tooluniverse.NCIThesaurusTool[source]

Bases: BaseTool

Tool for querying the NCI Thesaurus (NCIt).

NCIt provides a rich set of cancer-related terms with definitions, synonyms, semantic types, and cross-references to ICD, SNOMED-CT, MedDRA, and CDISC. Covers ~190,000 concepts organized in a polyhierarchy.

Supports: concept search, concept details, hierarchy navigation.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the NCI Thesaurus API call.

_query(arguments)[source]

Route to appropriate NCI endpoint.

Search NCI Thesaurus by term.

_get_concept(arguments)[source]

Get detailed concept information by code.

_get_children(arguments)[source]

Get child concepts for a given code.

class tooluniverse.NDExTool[source]

Bases: BaseTool

Tool for querying the NDEx biological network repository.

NDEx provides access to thousands of published biological networks including protein-protein interaction (PPI), signaling pathways, gene regulatory networks, and metabolic networks. Networks are contributed by research groups and databases like NCI-PID, SIGNOR, and individual labs.

Supports: network search, network summary, network content retrieval.

No authentication required for public networks.

__init__(tool_config)[source]
run(arguments)[source]

Execute the NDEx API call.

_query(arguments)[source]

Route to appropriate NDEx endpoint.

_search_networks(arguments)[source]

Search NDEx for biological networks by keyword.

_get_network_summary(arguments)[source]

Get summary information for a specific network by UUID.

_get_network(arguments)[source]

Get network content (nodes and edges) in CX format.

class tooluniverse.NHANESTool[source]

Bases: BaseTool

NHANES data information tool.

__init__(tool_config)[source]
_get_dataset_info(arguments)[source]

Get NHANES dataset information.

_search_datasets(arguments)[source]

Search for NHANES datasets.

run(arguments)[source]

Execute the NHANES tool.

class tooluniverse.NICEGuidelineFullTextTool[source]

Bases: BaseTool

Fetch full text content from NICE guideline pages. Takes a NICE guideline URL and extracts the complete guideline content.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_fetch_full_guideline(url)[source]

Fetch complete guideline content from NICE page.

class tooluniverse.NICEWebScrapingTool[source]

Bases: BaseTool

Real NICE guidelines search using web scraping. Makes actual HTTP requests to NICE website and parses HTML responses.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_fetch_guideline_summary(url)[source]

Fetch summary from a guideline detail page.

_search_nice_guidelines_real(query, limit)[source]

Search NICE guidelines using real web scraping.

class tooluniverse.NeuroMorphoTool[source]

Bases: BaseTool

Tool for querying NeuroMorpho.Org neuron morphology database.

Provides access to: - Neuron metadata (species, brain region, cell type, etc.) - Morphometric measurements (surface area, volume, branch count) - Associated literature - Search/filtering by multiple neuron attributes

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the NeuroMorpho API call.

_get_neuron_by_id(arguments)[source]

Get a neuron by its numeric ID or name.

_search_neurons(arguments)[source]

Search neurons by field criteria.

_get_morphometry(arguments)[source]

Get morphometric measurements for a neuron.

_get_field_values(arguments)[source]

Get available values for a neuron metadata field.

class tooluniverse.NextstrainTool[source]

Bases: BaseTool

Tool for querying Nextstrain, the pathogen evolution tracker.

Provides access to phylogenetic datasets for various pathogens including influenza, SARS-CoV-2, Zika, Ebola, Dengue, and more. Returns metadata and phylogenetic tree data.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Nextstrain API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_list_datasets(arguments)[source]

List available Nextstrain pathogen datasets.

_get_dataset(arguments)[source]

Get metadata and tree summary for a Nextstrain dataset.

class tooluniverse.NvidiaNIMTool[source]

Bases: BaseTool

NVIDIA NIM Healthcare API tool.

Provides unified access to 16 NVIDIA cloud-hosted healthcare AI APIs:

Structure Prediction: - AlphaFold2, AlphaFold2-Multimer, ESMFold, OpenFold2, OpenFold3, Boltz2

Protein Design: - ProteinMPNN, RFdiffusion

Molecular Tools: - DiffDock, GenMol, MolMIM

Genomics: - Evo2-40B, MSA-Search, ESM2-650M

Medical Imaging: - MAISI, Vista3D

Configuration fields: - endpoint: API endpoint path (relative to base URL) - base_url: Override base URL (default: https://health.api.nvidia.com/v1/biology) - async_expected: Whether 202 async response is expected - poll_seconds: NVCF-POLL-SECONDS header value (default 300) - response_type: Expected response type (json, pdb, mfasta, zip) - timeout: Request timeout in seconds (default 600)

DEFAULT_BASE_URL = 'https://health.api.nvidia.com/v1/biology'
STATUS_URL = 'https://integrate.api.nvidia.com/v1/status'
ASSETS_URL = 'https://api.nvcf.nvidia.com/v2/nvcf/assets'
DEFAULT_TIMEOUT = 600
DEFAULT_POLL_SECONDS = 300
MAX_POLL_ATTEMPTS = 120
POLL_INTERVAL = 5
__init__(tool_config)[source]
_get_headers()[source]

Build request headers with authentication.

_build_url()[source]

Build the full API URL.

_poll_for_result(req_id, headers)[source]

Poll the status endpoint for async operation results.

Parameters:
  • req_id (str) – The nvcf-reqid from the 202 response

  • headers (Dict[str, str]) – Request headers including auth

Returns:

Final response from the API

Return type:

Dict[str, Any]

_parse_response(response)[source]

Parse API response based on response type and status.

_validate_api_key()[source]

Validate API key is present.

_upload_asset(content, description='diffdock-file')[source]

Upload a file to NVIDIA’s asset storage for tools that require staged inputs (e.g., DiffDock).

This implements the NVCF asset upload pattern: 1. POST to assets API to get an upload URL and asset ID 2. PUT the file content to the upload URL 3. Return the asset ID to be used in the main API request

Parameters:
  • content (str) – File content to upload (string)

  • description (str) – Description for the asset

Returns:

Dictionary with ‘asset_id’ on success, or error details on failure

Return type:

Dict[str, Any]

_handle_diffdock_staged(arguments)[source]

Handle DiffDock’s staged asset upload workflow.

When is_staged=True, protein and ligand should be raw content that needs to be uploaded as assets. The asset IDs are then used in the actual request.

Parameters:

arguments (Dict[str, Any]) – Original arguments with protein and ligand content

Returns:

Modified arguments with asset IDs, or error dict on failure

Return type:

Dict[str, Any]

run(arguments)[source]

Execute the NVIDIA NIM API call.

Parameters:

arguments (Dict[str, Any]) – Dictionary of API-specific parameters

Returns:

  • status: “success” or error information

  • data: API response data

  • Additional fields based on response type

Return type:

Dictionary containing

class tooluniverse.OBISOccurrenceTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.OBISTaxaTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.ODPHPItemList[source]

Bases: ODPHPRESTTool

Retrieve list of topics or categories.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.ODPHPMyHealthfinder[source]

Bases: ODPHPRESTTool

Search for demographic-specific health recommendations (MyHealthfinder).

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.ODPHPOutlinkFetch[source]

Bases: BaseTool

Fetch article pages referenced by AccessibleVersion / RelatedItems.Url and return readable text. - HTML: extracts main/article/body text; strips nav/aside/footer/script/style. - PDF or non-HTML: returns metadata + URL so the agent can surface it.

__init__(tool_config)[source]
_extract_text(html)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.ODPHPRESTTool[source]

Bases: BaseTool

Base class for ODPHP (MyHealthfinder) REST API tools.

__init__(tool_config)[source]
_make_request(params=None)[source]
class tooluniverse.ODPHPTopicSearch[source]

Bases: ODPHPRESTTool

Search for health topics by ID, category, or keyword.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.OLSRESTTool[source]

Bases: BaseTool

Generic tool for the EMBL-EBI OLS v4 REST API.

This is a JSON-config driven tool. Each tool config supplies: - fields.kind: “search” | “term” | “children” | “ontology” | “ontologies” - fields.base_url: optional override (defaults to OLS4 API root) - fields.ontology_id: optional ontology scope (e.g., “efo”)

DEFAULT_BASE_URL = 'https://www.ebi.ac.uk/ols4/api'
static _double_urlencode(value)[source]
static _obo_id_to_efo_iri(obo_id)[source]
_resolve_term_iri(*, iri=None, obo_id=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.OLSTool[source]

Bases: BaseTool

Interact with the EMBL-EBI Ontology Lookup Service (OLS) REST API.

_OPERATIONS = {'find_similar_terms': '_handle_find_similar_terms', 'get_ontology_info': '_handle_get_ontology_info', 'get_term_ancestors': '_handle_get_term_ancestors', 'get_term_children': '_handle_get_term_children', 'get_term_info': '_handle_get_term_info', 'search_ontologies': '_handle_search_ontologies', 'search_terms': '_handle_search_terms'}
__init__(tool_config)[source]
run(arguments=None, **_)[source]

Dispatch the requested OLS operation.

_handle_search_terms(arguments)[source]
_handle_get_ontology_info(arguments)[source]
_handle_search_ontologies(arguments)[source]
_handle_get_term_info(arguments)[source]
_handle_get_term_children(arguments)[source]
_handle_get_term_ancestors(arguments)[source]
_handle_find_similar_terms(arguments)[source]
_get_json(path, params=None)[source]

Make a GET request to the OLS API and return JSON response.

Parameters:
  • path (str) – API endpoint path

  • params (Dict[str, Any] | None) – Optional query parameters

Returns:

JSON response as dictionary

Raises:
Return type:

Dict[str, Any]

_format_term_collection(data, size)[source]
static _build_term_model(item)[source]
class tooluniverse.OMATool[source]

Bases: BaseTool

Tool for querying the OMA Orthology Browser.

OMA provides orthology relationships among 2,600+ complete genomes using a highly reliable algorithm. Supports protein lookup, pairwise orthologs, Hierarchical Orthologous Groups (HOGs), and OMA Groups.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the OMA API call.

_query(arguments)[source]

Route to appropriate OMA endpoint.

_get_protein(arguments)[source]

Get protein information by UniProt accession or OMA ID.

_get_orthologs(arguments)[source]

Get pairwise orthologs for a protein.

_get_hog(arguments)[source]

Get Hierarchical Orthologous Group (HOG) information.

_get_group(arguments)[source]

Get OMA Group details (strict 1:1 orthologs across all genomes).

class tooluniverse.OMIMTool[source]

Bases: BaseTool

Tool for querying OMIM (Online Mendelian Inheritance in Man).

OMIM provides: - Mendelian disease information - Gene-disease relationships - Clinical synopses - Inheritance patterns

Requires API key via OMIM_API_KEY environment variable. Register at https://omim.org/api for free academic access.

__init__(tool_config)[source]
_get_params(extra_params=None)[source]

Get base parameters with API key.

run(arguments)[source]

Execute OMIM API call based on operation type.

Search OMIM entries.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - query: Search terms (gene name, disease name, phenotype) - limit: Maximum results (default 10, max 20) - start: Offset for pagination (default 0)

_get_entry(arguments)[source]

Get OMIM entry by MIM number.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - mim_number: OMIM MIM number (e.g., 164730 for BRAF) - include: Data to include (default: all basic data)

_get_gene_map(arguments)[source]

Get gene-disease mapping information.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - mim_number: OMIM MIM number for gene or phenotype OR - chromosome: Chromosome number (1-22, X, Y)

_get_clinical_synopsis(arguments)[source]

Get clinical synopsis (phenotype features) for an OMIM entry.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - mim_number: OMIM MIM number for a phenotype entry

class tooluniverse.ORCIDTool[source]

Bases: BaseTool

Tool for querying the ORCID Public API.

Provides access to: - Researcher profiles and biographical data - Publication works - Search across all ORCID records - Employment and affiliation history

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_make_request(path, params=None)[source]
_get_profile(arguments)[source]
_get_works(arguments)[source]
_search_researchers(arguments)[source]
_get_employments(arguments)[source]
class tooluniverse.OSFPreprintsTool[source]

Bases: BaseTool

Search OSF Preprints via OSF API v2 filters.

Parameters (arguments):

query (str): Query string max_results (int): Max results (default 10, max 100) provider (str): Optional preprint provider (e.g., ‘osf’, ‘psyarxiv’)

__init__(tool_config)[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.OmniPathTool[source]

Bases: BaseTool

Tool for querying OmniPath intercellular and intracellular signaling data.

OmniPath integrates 100+ databases covering: - Ligand-receptor interactions (14,000+ pairs) - Intercellular communication roles - Signaling pathway interactions - Protein complexes (22,000+) - Cell communication annotations - Enzyme-substrate relationships

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the OmniPath API call.

_query(arguments)[source]

Route to appropriate OmniPath endpoint.

_make_request(path, params)[source]

Make an HTTP request to OmniPath API.

_get_ligand_receptor(arguments)[source]

Get ligand-receptor interactions from the ligrecextra dataset.

_get_intercell(arguments)[source]

Get intercellular communication role annotations.

_get_signaling(arguments)[source]

Get intracellular signaling pathway interactions.

_get_complexes(arguments)[source]

Get protein complex compositions.

_get_annotations(arguments)[source]

Get cell communication annotations from CellPhoneDB, CellChatDB, etc.

_get_enzyme_substrate(arguments)[source]

Get enzyme-substrate (PTM) interactions.

_get_tf_target_interactions(arguments)[source]
_get_dorothea_regulon(arguments)[source]
class tooluniverse.OncoKBTool[source]

Bases: BaseTool

Tool for querying OncoKB precision oncology knowledge base.

OncoKB provides: - Actionable cancer variant annotations - Evidence levels for clinical actionability - FDA-approved and investigational treatments - Gene-level oncogenic classifications

Requires API token via ONCOKB_API_TOKEN environment variable. Demo API available for testing (limited to BRAF, TP53, ROS1 genes).

__init__(tool_config)[source]
_get_headers()[source]

Get request headers with authentication.

run(arguments)[source]

Execute OncoKB API call based on operation type.

_annotate_variant(arguments)[source]

Annotate a specific variant for oncogenic potential and treatment implications.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - gene: Gene symbol (e.g., BRAF) - variant: Variant notation (e.g., V600E) - tumor_type: Optional cancer type (OncoTree code)

_get_gene_info(arguments)[source]

Get gene-level oncogenic information.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - gene: Gene symbol (e.g., BRAF, TP53)

_get_cancer_genes(arguments)[source]

Get list of all cancer genes curated in OncoKB.

Returns genes classified as oncogenes and/or tumor suppressors.

_get_levels(arguments)[source]

Get information about OncoKB evidence levels.

Returns the definitions of all actionability levels (1, 2, 3A, 3B, 4, R1, R2).

_annotate_copy_number(arguments)[source]

Annotate copy number alterations (amplification/deletion).

Parameters:

arguments (Dict[str, Any]) – Dict containing: - gene: Gene symbol - copy_number_type: AMPLIFICATION or DELETION - tumor_type: Optional cancer type (OncoTree code)

class tooluniverse.OntologyInfo[source]

Bases: BaseModel

Description of a single ontology entry in OLS.

id: str
title: str
version: str | None
description: str | None
domain: str | None
homepage: HttpUrl | None
preferred_prefix: str | None
number_of_terms: int | None
number_of_classes: int | None
repository: HttpUrl | None
_abc_impl = <_abc._abc_data object>
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tooluniverse.OntologySearchResponse[source]

Bases: PagedResponse

Paginated collection of ontologies returned by the search endpoint.

ontologies: List[OntologyInfo]
_abc_impl = <_abc._abc_data object>
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tooluniverse.OpenAIRETool[source]

Bases: BaseTool

Search OpenAIRE Explore for research products (publications by default).

Parameters (arguments):

query (str): Query string max_results (int): Max number of results (default 10, max 100) type (str): product type filter: publications | datasets | software

__init__(tool_config)[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_endpoint_for_type(prod_type)[source]
_normalize(data, prod_type)[source]
class tooluniverse.OpenAlexGuidelinesTool[source]

Bases: BaseTool

OpenAlex Guidelines Search Tool. Specialized tool for searching clinical practice guidelines using OpenAlex API.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_search_openalex_guidelines(query, limit, year_from=None, year_to=None)[source]

Search for clinical guidelines using OpenAlex API.

_reconstruct_abstract(abstract_inverted_index)[source]

Reconstruct abstract from inverted index.

class tooluniverse.OpenAlexRESTTool[source]

Bases: BaseTool

Generic JSON-config driven OpenAlex REST tool.

Notes: - OpenAlex strongly encourages providing a contact email via the mailto query param. - This tool returns a consistent wrapper: {status, data, url} (plus error fields on failure).

__init__(tool_config)[source]
static _normalize_openalex_id(value)[source]
static _normalize_doi(value)[source]
_build_url_and_params(arguments)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.OpenAlexTool[source]

Bases: BaseTool

Tool to retrieve literature from OpenAlex based on search keywords.

__init__(tool_config)[source]
run(arguments)[source]

Main entry point for the tool.

search_literature(search_keywords, max_results=10, year_from=None, year_to=None, open_access=None, *, require_has_fulltext=False, fulltext_terms=None)[source]

Search for literature using OpenAlex API.

Parameters

search_keywords (str): Keywords to search for in title, abstract, and content. max_results (int): Maximum number of results to return (default: 10). year_from (int): Start year for publication date filter (optional). year_to (int): End year for publication date filter (optional). open_access (bool): Filter for open access papers only (optional).

Returns

list: List of dictionaries containing paper information.

_extract_paper_info(work)[source]

Extract relevant information from a work object returned by OpenAlex API.

Parameters

work (dict): Work object from OpenAlex API response.

Returns

dict: Formatted paper information.

get_paper_by_doi(doi)[source]

Retrieve a specific paper by its DOI.

Parameters

doi (str): DOI of the paper to retrieve.

Returns

dict: Paper information or None if not found.

get_papers_by_author(author_name, max_results=10)[source]

Retrieve papers by a specific author.

Parameters

author_name (str): Name of the author to search for. max_results (int): Maximum number of results to return.

Returns

list: List of papers by the author.

class tooluniverse.OpenNeuroTool[source]

Bases: GraphQLTool

Tool for querying the OpenNeuro neuroimaging data repository.

OpenNeuro stores brain imaging datasets in BIDS format including: - MRI, fMRI, EEG, MEG, PET datasets - Dataset metadata, subjects, tasks, modalities - Download information and analytics

No authentication required for public datasets.

__init__(tool_config)[source]
tooluniverse.OpenTarget

alias of OpentargetTool

tooluniverse.OpenTargetGenetics

alias of OpentargetGeneticsTool

class tooluniverse.OpenTreeTool[source]

Bases: BaseTool

Tool for querying the Open Tree of Life.

The Open Tree synthesizes published phylogenetic trees and taxonomy from NCBI, GBIF, IRMNG, and other sources into a single comprehensive tree of all life on Earth (~2.3 million tips).

Supports: name resolution (TNRS), taxonomy lookup, MRCA computation, and induced subtree extraction.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Open Tree of Life API call.

_query(arguments)[source]

Route to appropriate Open Tree endpoint.

_match_names(arguments)[source]

Resolve species names to OTT IDs via TNRS.

_get_taxon_info(arguments)[source]

Get taxonomy info for an OTT ID.

_get_mrca(arguments)[source]

Find Most Recent Common Ancestor of given OTT IDs.

_get_induced_subtree(arguments)[source]

Get Newick subtree for a set of OTT IDs.

class tooluniverse.OpentargetGeneticsTool[source]

Bases: GraphQLTool

__init__(tool_config)[source]
class tooluniverse.OpentargetTool[source]

Bases: GraphQLTool

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.OpentargetToolDrugNameMatch[source]

Bases: GraphQLTool

__init__(tool_config, drug_generic_tool=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.OrphanetTool[source]

Bases: BaseTool

Tool for querying Orphanet rare disease database.

Orphanet provides: - Rare disease nomenclature and classification - Disease-gene associations - Epidemiology data (prevalence, inheritance) - Expert centers and patient organizations

RDcode API requires apiKey header (any value accepted). Orphadata API is free public access.

__init__(tool_config)[source]
run(arguments)[source]

Execute Orphanet API call based on operation type.

_search_diseases(arguments)[source]

Search Orphanet for rare diseases by query term.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - query: Search query (disease name, keyword) - lang: Language code (en, fr, de, etc.). Default: en

_get_disease(arguments)[source]

Get disease details by ORPHA code.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - orpha_code: Orphanet disease code (e.g., 558, 166024) - lang: Language code (default: en)

_get_genes(arguments)[source]

Get genes associated with a rare disease.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - orpha_code: Orphanet disease code

_get_classification(arguments)[source]

Get disease classification hierarchy.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - orpha_code: Orphanet disease code - lang: Language code (default: en)

_search_by_name(arguments)[source]

Search for diseases by exact or partial name match.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - name: Disease name to search - exact: Whether to match exactly (default: False) - lang: Language code (default: en)

class tooluniverse.OrthoDBTool[source]

Bases: BaseTool

OrthoDB v12 tool for orthologous group analysis.

Provides search for orthologous groups, group details with functional annotations (KEGG, GO), and member gene lists across species.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the OrthoDB API call.

_query(arguments)[source]

Route to appropriate endpoint.

Search for orthologous groups by gene/protein name.

_get_group(arguments)[source]

Get detailed information about an orthologous group.

_get_orthologs(arguments)[source]

Get orthologous genes in specific species from a group.

class tooluniverse.OxOTool[source]

Bases: BaseTool

Tool for EBI OxO (Ontology Xref Service) API providing cross-reference mappings between ontology terms across biomedical databases.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the OxO API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_mappings(arguments)[source]

Get cross-reference mappings for a single ontology term.

_search_mappings(arguments)[source]

Search mappings for multiple terms at once.

class tooluniverse.PANTHERTool[source]

Bases: BaseTool

Tool for querying PANTHER gene classification and enrichment analysis.

Provides gene functional annotation, overrepresentation analysis with GO/pathway enrichment, and ortholog mapping across 144 organisms.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PANTHER API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_gene_info(arguments)[source]

Get gene classification and functional annotation from PANTHER.

_enrichment(arguments)[source]

Perform gene set enrichment (overrepresentation) analysis.

_ortholog(arguments)[source]

Find orthologs of a gene across species.

class tooluniverse.PDBECompoundTool[source]

Bases: BaseTool

Tool for querying PDBe compound (ligand/small molecule) information.

Supports: - Get compound summary (formula, weight, SMILES, InChI, cross-references) - Get all PDB structures containing a specific compound

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PDBe Compound API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_summary(arguments)[source]

Get detailed compound summary from PDBe.

_get_structures(arguments)[source]

Get PDB structures containing a specific compound via PDBe API.

class tooluniverse.PDBeAPIRESTTool[source]

Bases: BaseTool

PDBe API REST tool. Generic wrapper for PDBe API endpoints defined in pdbe_api_tools.json.

__init__(tool_config)[source]
_build_url(args)[source]

Build URL from endpoint template and arguments

_build_params(args)[source]

Build query parameters for PDBe API

_extract_assemblies_from_summary(pdb_id)[source]

Extract assemblies data from summary endpoint as fallback

run(arguments)[source]

Execute the PDBe API call

class tooluniverse.PDBeLigandsTool[source]

Bases: BaseTool

Tool for querying PDBe structure-bound ligands and residue details.

Supports: - Get all ligands bound in a PDB structure (drug-like, cofactors, ions) - Get per-residue listing with observed ratio for a PDB chain

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PDBe API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_ligand_monomers(arguments)[source]

Get all ligand monomers bound in a PDB structure.

_get_residue_listing(arguments)[source]

Get per-residue listing for a PDB structure chain.

class tooluniverse.PDBeSIFTSTool[source]

Bases: BaseTool

PDBe SIFTS Mapping tool for UniProt-PDB cross-referencing.

Provides ranked best structures for a protein, PDB-to-UniProt chain mapping, and comprehensive structure coverage analysis.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PDBe SIFTS API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_best_structures(arguments)[source]

Get best PDB structures for a UniProt protein, ranked by coverage and resolution.

_get_pdb_to_uniprot(arguments)[source]

Map PDB entry chains to UniProt accessions.

_get_uniprot_to_pdb(arguments)[source]

Get all PDB entries covering a UniProt protein.

class tooluniverse.PDBeSearchTool[source]

Bases: BaseTool

Tool for searching PDBe, the Protein Data Bank in Europe.

Provides full-text and field-specific Solr queries across all PDB entries, plus compound/ligand lookup by identifier.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PDBe Search API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_search_structures(arguments)[source]

Search PDB structures by keyword or protein name.

_get_compound(arguments)[source]

Get PDB ligand/compound information by compound ID.

_search_by_organism(arguments)[source]

Search PDB structures filtered by organism.

class tooluniverse.PDBeValidationTool[source]

Bases: BaseTool

Tool for querying PDBe structure validation data.

Supports: - Global quality percentile scores (Ramachandran, rotamer, clashscore) - Residue-level validation outliers

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PDBe Validation API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_quality_scores(arguments)[source]

Get global quality validation percentile scores.

_get_outlier_residues(arguments)[source]

Get residue-level validation outliers.

class tooluniverse.PDBe_KB_Tool[source]

Bases: BaseTool

Tool for querying PDBe-KB (Knowledge Base) Graph API.

PDBe-KB aggregates structural biology knowledge including: - Ligand binding sites mapped to UniProt positions - Protein-protein interaction interfaces - Structural coverage statistics - Superposition clusters and best chain coverage

Data is indexed by UniProt accession and provides residue-level annotations using UniProt numbering.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PDBe-KB Graph API call.

_query(arguments)[source]

Route to appropriate PDBe-KB endpoint.

_get_summary_stats(arguments)[source]

Get aggregated structural summary statistics for a protein.

_get_ligand_sites(arguments)[source]

Get ligand binding site residues for a protein.

_get_interface_residues(arguments)[source]

Get protein-protein interaction interface residues.

_get_superposition(arguments)[source]

Get structural superposition clusters for a protein.

Returns clusters of structurally superposed PDB chains grouped by protein segments. Each cluster contains a representative structure and aligned member structures.

class tooluniverse.PMCTool[source]

Bases: BaseTool

Tool for searching PMC full-text biomedical literature.

__init__(tool_config=None)[source]
_normalize_pmcid(pmc_id)[source]
_extract_year_from_date(date_str)[source]
_parse_esummary_item(item)[source]
_parse_esummary_xml(xml_text)[source]

Parse NCBI E-utilities esummary XML into a dict keyed by numeric PMC id.

_build_paper_from_summary(pmc_numeric_id, items)[source]
_fetch_pubmed_abstracts(pmids)[source]

Best-effort: fetch PubMed abstracts for PMIDs via efetch XML.

Search for papers using PMC API.

Parameters:
  • query (str) – Search query

  • limit (int) – Maximum number of results

  • date_from (str | None) – Start date filter (YYYY/MM/DD)

  • date_to (str | None) – End date filter (YYYY/MM/DD)

  • article_type (str | None) – Article type filter (e.g., ‘research-article’, ‘review’)

Returns

List of paper dictionaries

_extract_authors(authors)[source]

Extract author names from PMC API response.

_extract_year(pubdate)[source]

Extract year from publication date.

run(tool_arguments)[source]

Execute the PMC search.

Parameters:

tool_arguments – Dictionary containing search parameters

Returns

List of paper dictionaries

class tooluniverse.PRIDERESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
_build_url(args)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.PackageTool[source]

Bases: BaseTool

Universal tool to provide information about Python packages. Fetches real-time data from PyPI API with local fallback.

__init__(tool_config)[source]
run(arguments)[source]

Get comprehensive package information.

Parameters:

arguments (dict) – Optional parameters for customization

Returns

dict: Package information including name, description, installation, docs, usage

_get_pypi_info(include_examples=True)[source]

Fetch package information from PyPI API

_get_local_info(include_examples=True)[source]

Get package information from local configuration

_get_installation_instructions()[source]

Generate installation instructions

_get_usage_example()[source]

Get usage example for the package

_get_quick_start_guide()[source]

Get quick start guide steps

class tooluniverse.PagedResponse[source]

Bases: BaseModel

Base structure for paginated responses returned by OLS.

total_elements: int
page: int
size: int
total_pages: int
_abc_impl = <_abc._abc_data object>
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tooluniverse.PaleobiologyRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
_build_url(args)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.PathwayCommonsTool[source]

Bases: BaseTool

Tool for interacting with Pathway Commons (PC2).

BASE_URL = 'https://www.pathwaycommons.org/pc2'
run(arguments)[source]

Executes the Pathway Commons tool action.

search_pathways(keyword, datasource=None, limit=10)[source]

Search for pathways.

get_interaction_graph(gene_list)[source]

Get SIF graph for genes. WARNING: The ‘graph’ endpoint usually returns SIF text, not JSON. We will return the raw text or parse it if simple. SIF format: source relation target

class tooluniverse.PfamTool[source]

Bases: BaseTool

Tool for Pfam protein family queries via the InterPro API.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Pfam API call.

_query(arguments)[source]

Route to appropriate endpoint.

_strip_html(text)[source]

Remove HTML tags from text.

_search_families(arguments)[source]

Search Pfam families by keyword.

_get_family_detail(arguments)[source]

Get detailed information about a specific Pfam family.

_get_family_proteins(arguments)[source]

Get proteins containing a specific Pfam domain, optionally filtered by species.

_get_protein_pfam(arguments)[source]

Get all Pfam domain annotations for a specific protein.

_search_clans(arguments)[source]

Search Pfam clans (superfamilies).

_get_family_proteomes(arguments)[source]

Get proteome distribution for a Pfam family.

class tooluniverse.PharmGKBTool[source]

Bases: BaseTool

Tool for querying PharmGKB REST API.

PharmGKB provides pharmacogenomics data: - Drug-gene-variant clinical annotations - CPIC dosing guidelines - Drug and gene details - Pharmacogenetic pathways

No authentication required for most endpoints.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PharmGKB API call.

_error(message)[source]
_request_json(url, params)[source]
_search_entity(entity_type, arguments)[source]

Search for drugs, genes, or variants.

_get_entity_details(entity_type, arguments)[source]

Get details for a specific entity by PharmGKB ID.

_get_clinical_annotations(arguments)[source]

Get clinical annotations. Best retrieved by specific ID or filtered.

_get_dosing_guidelines(arguments)[source]

Get CPIC/DPWG dosing guidelines.

class tooluniverse.PharosTool[source]

Bases: BaseTool

Tool for querying Pharos/TCRD GraphQL API.

Pharos provides drug target information including: - Target Development Level (Tdark, Tbio, Tchem, Tclin) - Druggability assessments - Protein family classifications - Disease associations - Ligand/drug information

No authentication required. Free for academic/research use.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Pharos API call.

_execute_graphql(query, variables=None)[source]

Execute a GraphQL query against Pharos API.

_get_target(arguments)[source]

Get detailed target information by gene symbol or UniProt ID.

Returns TDL classification, protein family, disease associations, ligands, and druggability information.

_search_targets(arguments)[source]

Search targets by query string.

Returns targets matching the search term with TDL classification.

_get_tdl_summary(arguments)[source]

Get Target Development Level summary statistics.

Returns counts of targets at each TDL level: - Tclin: Targets with approved drugs - Tchem: Targets with small molecule activities - Tbio: Targets with biological annotations - Tdark: Understudied targets with minimal information

_get_disease_targets(arguments)[source]

Get targets associated with a disease.

Returns targets with TDL classification for drug discovery prioritization.

class tooluniverse.PlantReactomeTool[source]

Bases: BaseTool

Tool for querying the Plant Reactome pathway database.

Plant Reactome provides curated plant metabolic and regulatory pathways. Supports searching pathways, getting pathway details, and listing available species. Covers photosynthesis, carbon fixation, nitrogen metabolism, hormone signaling, secondary metabolites, and more.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Plant Reactome API call.

_query(arguments)[source]

Route to appropriate query method.

Search for plant pathways.

_get_pathway(arguments)[source]

Get detailed pathway information.

_list_species(arguments)[source]

List all available plant species.

class tooluniverse.PomBaseTool[source]

Bases: BaseTool

Tool for querying PomBase, the S. pombe genome database.

Provides detailed gene information for fission yeast including protein domains, GO annotations, phenotypes, and more.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PomBase API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_gene_detail(arguments)[source]

Get detailed gene information from PomBase by systematic ID.

Search PomBase gene summaries by gene name or keyword.

_gene_phenotypes(arguments)[source]

Get phenotype information for a PomBase gene.

class tooluniverse.ProtacDBTool[source]

Bases: BaseTool

Tool for querying PROTAC-DB 3.0 (Zhejiang University).

Provides access to: - PROTAC compound search and retrieval by target or E3 ligase - Compound details (SMILES, DC50, Dmax, cell lines, references) - Target protein information

__init__(tool_config)[source]
_get_session_with_xsrf()[source]
_build_files(session, extra=None)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_search_protacs(arguments)[source]
_get_protac(arguments)[source]
_search_targets(arguments)[source]
class tooluniverse.ProteinStructure3DTool[source]

Bases: VisualizationTool

Tool for visualizing 3D protein structures using py3Dmol.

run(arguments)[source]

Generate 3D protein structure visualization.

_fetch_pdb_content(pdb_id)[source]

Fetch PDB content from RCSB PDB database.

_create_control_panel(current_style, current_color)[source]

Create floating control panel HTML.

_create_toolbar()[source]

Create bottom toolbar HTML.

_create_protein_info_cards(pdb_id, pdb_data)[source]

Create protein information cards.

class tooluniverse.ProteinsAPIRESTTool[source]

Bases: BaseTool

Proteins API REST tool. Generic wrapper for Proteins API endpoints defined in proteins_api_tools.json.

__init__(tool_config)[source]
_build_url(args)[source]

Build URL from endpoint template and arguments

_build_params(args)[source]

Build query parameters for Proteins API

_extract_from_protein_endpoint(accession, tool_name)[source]

Extract data from main protein endpoint when specific endpoints don’t exist

_parse_accessions(accession)[source]

Parse accession parameter - handle string, list, or comma-separated string

_handle_batch_request(accessions, tool_name, format='json')[source]

Handle batch requests by making multiple API calls and aggregating results

run(arguments)[source]

Execute the Proteins API call

class tooluniverse.ProteinsPlusRESTTool[source]

Bases: AsyncPollingTool

ProteinsPlus API tool for protein-ligand docking and binding site analysis.

Now uses AsyncPollingTool base class for automatic polling, progress reporting, and timeout management. Original functionality preserved.

_SIENA_OPTIONAL_KEYS = {'flexibility_sensitivity': 'flexibility_sensitivity', 'fragment_length': 'fragment_length', 'maximum_mutations': 'maximum_mutations', 'minimal_site_coverage': 'minimalSiteCoverage', 'minimal_site_identity': 'minimalSiteIdentity', 'site_radius': 'siteRadius'}
__init__(tool_config)[source]

Initialize ProteinsPlus tool with configuration.

_transform_params(arguments)[source]

Transform user-facing arguments into the nested format ProteinsPlus expects.

_build_api_url(arguments)[source]

Build API URL by substituting argument placeholders in the endpoint.

_validate_required(arguments)[source]

Raise ValueError if any required parameters are missing.

submit_job(arguments)[source]

Submit job to ProteinsPlus API and return job location URL.

This method handles job submission for async tools. For sync tools, it’s not called (handled by run() override).

check_status(job_id)[source]

Check ProteinsPlus job status and return result if complete.

Parameters:

job_id (str) – Job location URL from submit_job()

Returns:

  • done (bool): True if complete

  • result (any): Results if done

  • progress (int): Progress percentage (0-100)

  • error (str): Error message if failed

Return type:

Dict with keys

format_result(result)[source]

Format ProteinsPlus results into standard response format.

async run(arguments, progress=None)[source]

Execute the tool with provided arguments.

Overrides AsyncPollingTool.run() to support both sync and async tools.

async _run_sync_request(arguments, progress)[source]

Execute a synchronous (non-polling) request.

_abc_impl = <_abc._abc_data object>
class tooluniverse.ProteomeXchangeTool[source]

Bases: BaseTool

Tool for querying ProteomeXchange, the proteomics data consortium.

Provides access to metadata for proteomics datasets including species, instruments, publications, and data files from PRIDE, MassIVE, PeptideAtlas, jPOST, and iProX.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the ProteomeXchange API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_extract_cv_value(terms, accession_prefix=None, name_match=None)[source]

Extract a value from CV terms list.

_get_dataset(arguments)[source]

Get a ProteomeXchange dataset by PX identifier.

_search_datasets(arguments)[source]

Search ProteomeXchange datasets via MassIVE PROXI.

class tooluniverse.PubChemBioAssayTool[source]

Bases: BaseTool

Tool for querying PubChem BioAssay data.

Access biological assay descriptions, targets, and screening results from PubChem. Supports searching by assay ID, target gene, or keyword.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PubChem BioAssay API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_assay(arguments)[source]

Get detailed description of a bioassay by its AID.

_search_by_gene(arguments)[source]

Search for bioassays targeting a specific gene.

_get_assay_summary(arguments)[source]

Get summary and target information for a bioassay.

class tooluniverse.PubChemRESTTool[source]

Bases: BaseTool

Generic PubChem PUG-REST tool class. Directly concatenates URL from the fields.endpoint template and sends requests to PubChem PUG-REST.

__init__(tool_config)[source]
_build_url(arguments)[source]

Use regex to replace all {placeholder} in endpoint_template to generate complete URL path. For example endpoint_template=”/compound/cid/{cid}/property/{property_list}/JSON” arguments={“cid”:2244}, property_list=[“MolecularWeight”,”IUPACName”] → “/compound/cid/2244/property/MolecularWeight,IUPACName/JSON” Finally returns “https://pubchem.ncbi.nlm.nih.gov/rest/pug” + concatenated path.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.PubChemToxTool[source]

Bases: BaseTool

Tool for PubChem toxicity and safety data via PUG View API.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the PubChem toxicity API call.

_query(arguments)[source]

Route to appropriate endpoint.

_resolve_cid(arguments)[source]

Resolve compound name to CID if needed.

_strip_html(text)[source]

Remove HTML tags from text.

_find_sections_recursive(sections, heading)[source]

Recursively find all sections matching a heading at any depth.

_extract_info_from_sections(sections, heading)[source]

Find sections matching heading recursively and extract their Information entries.

_get_pugview_data(cid, heading)[source]

Get PUG View data for a specific heading.

_get_ghs_classification(arguments)[source]

Get GHS (Globally Harmonized System) hazard classification for a compound.

_get_toxicity_values(arguments)[source]

Get non-human toxicity values (LD50, LC50, etc.) for a compound.

_get_carcinogen_classification(arguments)[source]

Get carcinogen classification data for a compound.

_get_target_organs(arguments)[source]

Get target organs affected by a chemical compound.

_get_acute_effects(arguments)[source]

Get acute toxicity effects for a compound.

Pulls from multiple PUG View headings: Signs and Symptoms, Acute Effects, and Exposure Routes to provide comprehensive acute toxicity information.

_get_toxicity_summary(arguments)[source]

Get comprehensive toxicity summary including multiple toxicity data sections.

class tooluniverse.PubMedGuidelinesTool[source]

Bases: BaseTool

Search PubMed for clinical practice guidelines. Uses NCBI E-utilities with guideline publication type filter.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_search_pubmed_guidelines(query, limit, api_key)[source]

Search PubMed for guideline publications.

class tooluniverse.PubMedRESTTool[source]

Bases: BaseRESTTool

Generic REST tool for PubMed E-utilities (efetch, elink).

Implements rate limiting per NCBI guidelines: - Without API key: 3 requests/second - With API key: 10 requests/second

API key is read from environment variable NCBI_API_KEY. Get your free key at: https://www.ncbi.nlm.nih.gov/account/

_last_request_time = 0.0
_rate_limit_lock = <unlocked _thread.lock object>
__init__(tool_config)[source]
_get_param_mapping()[source]

Map PubMed E-utilities parameter names.

_enforce_rate_limit(has_api_key)[source]

Enforce NCBI E-utilities rate limits.

Parameters:

has_api_key (bool) – Whether an API key is provided

_build_params(args)[source]

Build E-utilities parameters with special handling.

_fetch_summaries(pmid_list)[source]

Fetch article summaries for a list of PMIDs using esummary.

Parameters:

pmid_list (list) – List of PubMed IDs

Returns:

Dict with article summaries or error

Return type:

Dict[str, Any]

_fetch_abstracts(pmid_list)[source]

Best-effort abstract fetch via efetch XML for a list of PMIDs.

run(arguments)[source]

PubMed E-utilities need special handling for direct endpoint URLs. Enforces NCBI rate limits to prevent API errors.

class tooluniverse.PubTatorTool[source]

Bases: BaseTool

Generic wrapper around a single PubTator 3 endpoint supporting JSON-defined configs.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_compose_url(args)[source]

Substitute template vars & build full URL.

_query_params(args)[source]

Translate caller arg names → API param names, drop Nones, serialise lists.

_filter_search_results(result)[source]

Filter PubTatorSearch results by score threshold and remove facet items that only have ‘name’, ‘type’, and ‘value’.

class tooluniverse.PyPIPackageInspector[source]

Bases: BaseTool

Extracts comprehensive package information from PyPI and GitHub. Provides detailed metrics on popularity, maintenance, security, and compatibility.

__init__(tool_config=None)[source]
_get_pypi_metadata(package_name)[source]

Fetch comprehensive metadata from PyPI

_get_download_stats(package_name)[source]

Fetch download statistics from pypistats.org

_get_github_stats(github_url)[source]

Fetch repository statistics from GitHub

_calculate_quality_scores(pypi_data, downloads, github_data)[source]

Calculate quality scores based on collected metrics

_generate_recommendation(scores, pypi_data, github_data)[source]

Generate a human-readable recommendation based on scores

run(arguments)[source]

Inspect a package and return comprehensive quality metrics

Parameters:
  • package_name – Name of the package to inspect

  • include_github – Whether to fetch GitHub stats (default: True)

  • include_downloads – Whether to fetch download stats (default: True)

Returns:

Dict with package metadata, statistics, and quality scores

Return type:

Dict[str, Any]

class tooluniverse.PythonCodeExecutor[source]

Bases: BasePythonExecutor, BaseTool

Execute Python code snippets safely in sandboxed environment.

__init__(tool_config)[source]

Initialize the executor with tool configuration.

run(arguments)[source]

Execute Python code snippet with safety checks and timeout.

class tooluniverse.PythonScriptRunner[source]

Bases: BasePythonExecutor, BaseTool

Run Python script files in isolated subprocess with resource limits.

__init__(tool_config)[source]

Initialize the executor with tool configuration.

run(arguments)[source]

Run Python script file in subprocess with safety limits.

class tooluniverse.QuickGOTool[source]

Bases: BaseTool

Tool for querying the EBI QuickGO Gene Ontology browser.

QuickGO provides comprehensive GO annotation data with filtering by gene product, GO term, taxon, evidence code, and more. Also provides ontology term details and hierarchical relationships.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the QuickGO API call.

_query(arguments)[source]

Route to appropriate QuickGO endpoint.

_annotation_by_gene(arguments)[source]

Search GO annotations for a specific gene product.

_annotation_by_goterm(arguments)[source]

Search GO annotations for a specific GO term.

_term_detail(arguments)[source]

Get detailed information about a GO term.

_term_children(arguments)[source]

Get child terms of a GO term.

class tooluniverse.RCSBAdvancedSearchTool[source]

Bases: BaseTool

Advanced attribute-based search of the RCSB Protein Data Bank.

Enables complex queries combining organism, resolution, experimental method, molecular weight, and more. Returns PDB IDs matching all criteria.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the RCSB advanced search.

_query(arguments)[source]

Route to appropriate endpoint.

Search PDB by multiple attribute filters.

Search PDB by sequence motif pattern.

class tooluniverse.RCSBDataTool[source]

Bases: BaseTool

Tool for RCSB PDB Data API providing direct REST access to PDB structure metadata, biological assembly info, and non-polymer entities.

Complements existing RCSB GraphQL and Search tools by providing simpler, direct access to individual resource endpoints.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the RCSB Data API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_entry(arguments)[source]

Get comprehensive entry details for a PDB structure.

_get_assembly(arguments)[source]

Get biological assembly details for a PDB structure.

_get_nonpolymer_entity(arguments)[source]

Get non-polymer entity (ligand/small molecule) details.

class tooluniverse.RCSBGraphQLTool[source]

Bases: BaseTool

Tool for querying the RCSB PDB Data API via GraphQL.

Supports: - Structure summary (title, resolution, method, citation, etc.) - Chemical component / ligand details (formula, SMILES, targets) - Polymer entity details (sequence, annotations, descriptions)

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the RCSB GraphQL query.

_query(arguments)[source]

Route to appropriate GraphQL query.

_execute_graphql(query_str)[source]

Execute a GraphQL query against the RCSB Data API.

_get_structure_summary(arguments)[source]

Get comprehensive structure summary for one or more PDB IDs.

_get_ligand_info(arguments)[source]

Get chemical component (ligand) information from PDB.

_get_polymer_entity(arguments)[source]

Get polymer entity details (sequence, annotations, etc.).

class tooluniverse.RCSBSearchTool[source]

Bases: BaseTool

Tool for searching similar protein structures using RCSB PDB Search API v2.

Supports: - Sequence-based similarity search - Structure-based similarity search (using PDB ID) - Text-based search (by name, keyword, etc.)

__init__(tool_config)[source]
_validate_pdb_id(pdb_id)[source]

Validate PDB ID format (4 characters, alphanumeric)

_validate_sequence(sequence)[source]

Validate protein sequence (amino acids only)

_build_sequence_query(sequence, identity_cutoff, max_results)[source]

Build sequence similarity search query.

Uses the correct RCSB Search API v2 format: - Uses “value” parameter (not “target”) - Includes evalue_cutoff (required, default 0.1) - Includes identity_cutoff (optional, 0-1) - Includes sequence_type (“protein”)

_build_structure_query(pdb_id, similarity_threshold, max_results)[source]

Build structure similarity search query.

Uses the correct RCSB Search API v2 format: - Uses “value” as an object with “entry_id” and “assembly_id” - Includes “operator” (default: “strict_shape_match”) - Includes “target_search_space” (default: “assembly”)

_build_text_query(search_text, max_results)[source]

Build text search query.

Uses the correct RCSB Search API v2 format: - Searches in multiple attributes

(struct.title, struct_keywords.pdbx_keywords)

  • Uses OR logic to combine search conditions

  • Supports pagination and sorting

_parse_search_results(response_data)[source]

Parse RCSB Search API response.

Expected response format: {

“query_id”: “…”, “result_type”: “entry”, “total_count”: 123, “result_set”: [

{“identifier”: “6B3Q”, “score”: 1.0}, …

]

}

run(arguments=None, stream_callback=None, use_cache=False, validate=True)[source]

Execute structure similarity search.

Parameters:
  • arguments (Dict[str, Any] | None) –

    Dictionary containing: - query: PDB ID, protein sequence, or search text - search_type: “sequence”, “structure”, or “text”

    (default: “sequence”)

    • similarity_threshold: Similarity threshold 0-1 (default: 0.7) (not used for text search)

    • max_results: Maximum number of results (default: 20)

  • stream_callback (Any | None) – Optional callback for streaming

  • use_cache (bool) – Whether to use caching

  • validate (bool) – Whether to validate parameters

Returns:

Dictionary with search results or error information

Return type:

Dict[str, Any]

class tooluniverse.RCSBTool[source]

Bases: BaseTool

__init__(tool_config)[source]
validate_params(params)[source]
prepare_input_ids(params)[source]
_split_composite_id(value, sep, expected_parts, label)[source]
_rest_url_for_input_id(input_id)[source]
_run_via_rest(input_ids)[source]
run(params)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.RESTfulTool[source]

Bases: GraphQLTool

__init__(tool_config, endpoint_url)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.RNAcentralGetTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.RNAcentralSearchTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.ReMapRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.ReactomeAnalysisTool[source]

Bases: BaseTool

Tool for Reactome pathway analysis (enrichment/overrepresentation).

Accepts gene/protein identifiers and performs overrepresentation analysis or species comparison against Reactome pathways. Returns enriched pathways with p-values, FDR, and entity counts.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Reactome Analysis API call.

_query(arguments)[source]

Route to appropriate analysis endpoint.

_pathway_enrichment(arguments)[source]

Perform pathway overrepresentation analysis.

_species_comparison(arguments)[source]

Perform species comparison analysis.

_token_result(arguments)[source]

Retrieve analysis results by token.

_format_analysis_result(data, identifiers)[source]

Format analysis result into standard output.

class tooluniverse.ReactomeContentTool[source]

Bases: BaseTool

Tool for Reactome Content Service providing pathway search, contained event retrieval, and enhanced pathway details.

Complements existing Reactome tools by adding free-text search and hierarchical event decomposition.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Reactome Content Service API call.

_query(arguments)[source]

Route to appropriate endpoint.

static _strip_html(text)[source]

Remove HTML tags from text.

Search Reactome for pathways, reactions, and other entities.

_get_contained_events(arguments)[source]

Get all events (sub-pathways and reactions) contained in a pathway.

_get_enhanced_pathway(arguments)[source]

Get enhanced pathway details including literature, GO terms, and sub-events.

class tooluniverse.ReactomeInteractorsTool[source]

Bases: BaseTool

Tool for querying protein interactors and entity pathways from Reactome.

Reactome provides curated protein-protein interaction data derived from IntAct, with confidence scores and evidence counts. Also supports finding Reactome pathways associated with specific entities.

Supports: get protein interactors, find pathways for entity, search Reactome entities.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Reactome API call.

_query(arguments)[source]

Route to appropriate Reactome endpoint.

_get_interactors(arguments)[source]

Get protein-protein interactors for a UniProt accession.

_get_entity_pathways(arguments)[source]

Get Reactome pathways associated with a specific entity.

_search_entity(arguments)[source]

Search Reactome for entities (proteins, complexes, reactions).

class tooluniverse.ReactomeRESTTool[source]

Bases: BaseTool

Generic Reactome Content Service REST tool. If there is no “fields.extract_path” in config or its value is empty, returns complete JSON; Otherwise, drills down according to the “dot-separated path” in extract_path and returns corresponding sub-node.

__init__(tool_config)[source]
_build_url(arguments)[source]

Combines endpoint_template (containing {xxx}) with path parameters from arguments to generate complete URL. For example endpoint_template=”/data/pathway/{stId}”, arguments={“stId”:”R-HSA-73817”} → Returns “https://reactome.org/ContentService/data/pathway/R-HSA-73817

run(arguments, stream_callback=None, use_cache=False, validate=True)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.RegulomeDBRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
_build_url(args)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.RemoteTool[source]

Bases: BaseTool

A placeholder tool class for external MCP/SMCP tools.

RemoteTool represents tools that are hosted on external MCP/SMCP servers and are only available for discovery and listing purposes. These tools cannot be executed locally through ToolUniverse but their configurations are preserved for reference.

tool_config

The tool configuration dictionary

Type:

dict

remote_info

Information about the remote server and tool

Type:

dict

__init__(tool_config=None)[source]

Initialize the RemoteTool.

Parameters:

tool_config (dict, optional) – Tool configuration dictionary

run(arguments=None)[source]

Placeholder run method for remote tools.

Remote tools cannot be executed locally. This method always returns an error message indicating that the tool is not available for local execution.

Parameters:

arguments (dict, optional) – Tool arguments (ignored)

Returns

dict: Error message indicating the tool is not available locally

get_remote_info()[source]

Get information about the remote server hosting this tool.

Returns

dict: Remote server information including server type, URL, and original tool type

is_available_locally()[source]

Check if this tool is available for local execution.

Returns

bool: Always False for RemoteTool instances

get_server_info()[source]

Get server connection information for this remote tool.

Returns

dict: Server connection details

class tooluniverse.RfamTool[source]

Bases: BaseTool

Rfam Database API tool for RNA family data.

Provides access to: - RNA family information and metadata - Secondary structure diagrams - Covariance models - Sequence alignments (Stockholm, FASTA formats) - Phylogenetic trees - Sequence searches

__init__(tool_config)[source]
run(arguments)[source]

Execute the Rfam API tool with given arguments.

_get_family(arguments)[source]

Get RNA family information.

_get_family_accession(arguments)[source]

Convert family ID to accession.

_get_family_id(arguments)[source]

Convert family accession to ID.

_get_covariance_model(arguments)[source]

Get covariance model for RNA family.

_get_alignment(arguments)[source]

Get sequence alignment for RNA family.

_get_tree_data(arguments)[source]

Get phylogenetic tree data in NHX format.

_get_sequence_regions(arguments)[source]

Get sequence regions for RNA family.

_get_structure_mapping(arguments)[source]

Get mapping between RNA family and PDB structures.

_search_sequence(arguments)[source]

Search RNA sequence against Rfam families.

class tooluniverse.RheaTool[source]

Bases: BaseTool

Tool for querying the Rhea biochemical reaction database.

Rhea contains over 15,000 manually curated biochemical reactions, each linked to ChEBI compounds and EC enzyme numbers. The search API returns TSV which is parsed to structured JSON.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the Rhea API call.

_query(arguments)[source]

Route to appropriate Rhea endpoint.

_parse_tsv(text)[source]

Parse TSV response into list of dicts.

_search_reactions(arguments)[source]

Search for biochemical reactions by name, compound, or keyword.

_search_by_ec(arguments)[source]

Search for reactions by EC (Enzyme Commission) number.

_search_by_chebi(arguments)[source]

Search for reactions involving a specific ChEBI compound.

class tooluniverse.RxNormTool[source]

Bases: BaseTool

Tool for querying RxNorm API to get drug standardization information.

This tool performs a two-step process: 1. Look up RXCUI (RxNorm Concept Unique Identifier) by drug name 2. Retrieve all associated names (generic names, brand names, synonyms, etc.) using RXCUI

__init__(tool_config)[source]
_preprocess_drug_name(drug_name)[source]

Preprocess drug name to improve matching success rate. Removes common patterns that might prevent matching: - Dosage information (e.g., “200mg”, “81mg”) - Formulations (e.g., “tablet”, “capsule”, “oral”) - Modifiers (e.g., “Extra Strength”, “Extended Release”) - Special characters that might interfere

Parameters:

drug_name (str) – Original drug name

Returns:

Preprocessed drug name

Return type:

str

_get_rxcui_by_name(drug_name)[source]

Get RXCUI (RxNorm Concept Unique Identifier) by drug name.

Parameters:

drug_name (str) – The name of the drug to search for

Returns:

Dictionary containing RXCUI information or error

Return type:

Dict[str, Any]

_get_all_names_by_rxcui(rxcui)[source]

Get all names associated with an RXCUI, including generic names, brand names, and synonyms.

Parameters:

rxcui (str) – The RxNorm Concept Unique Identifier

Returns:

Dictionary containing all names or error

Return type:

Dict[str, Any]

run(arguments)[source]

Execute the RxNorm tool.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing: - drug_name (str, required): The name of the drug to search for

Returns:

  • rxcui: The RxNorm Concept Unique Identifier

  • names: List of all associated names (generic names, brand names, synonyms, etc.)

  • drug_name: The original drug name queried

  • processed_name: The preprocessed drug name used for search (if different)

Return type:

Dictionary containing

class tooluniverse.SASBDBRESTTool[source]

Bases: BaseTool

SASBDB API tool for small-angle scattering (SAXS/SANS) data.

__init__(tool_config)[source]
_build_url(args)[source]

Build the full API URL, substituting path parameters.

_build_query_params(args)[source]

Return query parameters (those not used as path parameters).

run(arguments)[source]

Execute the SASBDB API request.

class tooluniverse.SASBDBSearchTool[source]

Bases: BaseTool

SASBDB search tool - lists entries by molecular type or all entries.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.SAbDabTool[source]

Bases: BaseTool

Tool for querying SAbDab structural antibody database.

SAbDab provides: - Antibody structures from PDB - CDR (complementarity-determining region) annotations - Heavy/light chain pairing information - Antigen binding information

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute SAbDab query based on operation type.

_search_structures(arguments)[source]

Search SAbDab for antibody structures.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - query: Search query (antigen name, species, etc.) - limit: Maximum results

_get_structure(arguments)[source]

Get antibody structure details by PDB ID.

Parameters:

arguments (Dict[str, Any]) – Dict containing: - pdb_id: 4-character PDB ID

_get_summary(arguments)[source]

Get SAbDab database summary statistics.

Parameters:

arguments (Dict[str, Any]) – Dict (no required parameters)

class tooluniverse.SCREENRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.SGDTool[source]

Bases: BaseTool

Tool for querying the Saccharomyces Genome Database (SGD).

SGD provides curated information about the budding yeast S. cerevisiae, including gene function, phenotypes, interactions, GO annotations, pathways, and literature.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the SGD API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_locus_overview(arguments)[source]

Get gene/locus overview from SGD by SGD ID.

_locus_phenotypes(arguments)[source]

Get phenotype annotations for a yeast gene.

_locus_go(arguments)[source]

Get Gene Ontology annotations for a yeast gene.

_locus_interactions(arguments)[source]

Get genetic and physical interactions for a yeast gene.

Search SGD for genes, GO terms, phenotypes, etc.

class tooluniverse.SIGNListGuidelinesTool[source]

Bases: BaseTool

List SIGN (Scottish Intercollegiate Guidelines Network) clinical guidelines, optionally filtered by clinical topic/specialty. Returns up to limit guidelines from the full SIGN guidelines table.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.SIGNSearchGuidelinesTool[source]

Bases: BaseTool

Search SIGN (Scottish Intercollegiate Guidelines Network) clinical guidelines by keyword. Fetches the full SIGN guidelines table (84 guidelines as of 2024) and filters results client-side.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.SIMBADAdvancedTool[source]

Bases: BaseTool

Advanced SIMBAD queries using TAP (Table Access Protocol) for complex queries.

This tool allows ADQL (Astronomical Data Query Language) queries for more sophisticated database searches.

__init__(tool_config, tap_url='https://simbad.cds.unistra.fr/simbad/sim-tap/sync')[source]
run(arguments)[source]

Execute an ADQL query on SIMBAD via TAP.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing ‘adql_query’ parameter

Returns:

Dictionary containing query results

Return type:

Dict[str, Any]

class tooluniverse.SIMBADTool[source]

Bases: BaseTool

Query the SIMBAD astronomical database for object information.

SIMBAD (Set of Identifications, Measurements, and Bibliography for Astronomical Data) is a comprehensive database of astronomical objects beyond the Solar System.

__init__(tool_config, base_url='https://simbad.cds.unistra.fr/simbad/sim-script')[source]
run(arguments)[source]

Execute a SIMBAD query based on the provided arguments.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing query parameters

Returns:

Dictionary containing query results or error information

Return type:

Dict[str, Any]

_query_by_name(arguments)[source]

Query SIMBAD by object name.

Parameters:

arguments (Dict[str, Any]) – Must contain ‘object_name’ parameter

Returns:

Dictionary containing object information

Return type:

Dict[str, Any]

_query_by_coordinates(arguments)[source]

Query SIMBAD by coordinates.

Parameters:

arguments (Dict[str, Any]) – Must contain ‘ra’, ‘dec’, and optional ‘radius’ parameters

Returns:

Dictionary containing objects near the specified coordinates

Return type:

Dict[str, Any]

_query_by_identifier(arguments)[source]

Query SIMBAD by identifier pattern.

Parameters:

arguments (Dict[str, Any]) – Must contain ‘identifier’ parameter

Returns:

Dictionary containing matching objects

Return type:

Dict[str, Any]

_get_format_string(output_format)[source]

Get SIMBAD format string based on requested output format.

Parameters:

output_format (str) – One of ‘basic’, ‘detailed’, or ‘full’

Returns:

SIMBAD format string

Return type:

str

_execute_query(script, query_description, max_results=None)[source]

Execute a SIMBAD script query.

Parameters:
  • script (str) – SIMBAD script to execute

  • query_description (str) – Description of the query for error messages

  • max_results (int | None) – Maximum number of results to return

Returns:

Dictionary containing query results or error information

Return type:

Dict[str, Any]

class tooluniverse.STITCHTool[source]

Bases: BaseTool

Tool for querying STITCH database.

STITCH provides chemical-protein interaction data including: - Known drug-target interactions - Predicted chemical-protein interactions - Interaction scores and evidence - Network analysis data

No authentication required. Free for academic/research use.

__init__(tool_config)[source]
run(arguments)[source]

Execute the STITCH API call.

_get_interactions(arguments)[source]

Get chemical-protein interactions.

Endpoint: GET /json/interactions

_get_interactors(arguments)[source]

Get interaction partners for a chemical or protein.

Endpoint: GET /json/interactors

_resolve_identifiers(arguments)[source]

Resolve chemical/protein names to STITCH identifiers.

Endpoint: GET /json/resolve

class tooluniverse.STRINGExtTool[source]

Bases: BaseTool

Extended STRING API tool for functional annotation queries.

Complements existing STRING tools (interactions, enrichment, network, PPI enrichment) by providing per-protein functional annotations from GO, KEGG, DISEASES, TISSUES, COMPARTMENTS, and other databases.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the STRING API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_functional_annotations(arguments)[source]

Get functional annotations for a protein from STRING.

_get_enrichment(arguments)[source]

Perform functional enrichment analysis on a set of proteins.

class tooluniverse.STRINGRESTTool[source]

Bases: BaseTool

STRING Database REST API tool. Generic wrapper for STRING API endpoints defined in ppi_tools.json.

__init__(tool_config)[source]
_build_url()[source]

Build URL for STRING API request.

_build_params(arguments)[source]

Build parameters for STRING API request.

_make_request(url, params)[source]

Perform a GET request and handle common errors.

_parse_tsv_response(text)[source]

Parse TSV response from STRING API.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.SearchSPLTool[source]

Bases: BaseTool

Search SPL list based on multiple filter conditions (drug_name/ndc/rxcui/setid/published_date). Returns original DailyMed API JSON (including metadata + data array).

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.SemanticScholarPDFSnippetsTool[source]

Bases: BaseTool

Fetch a paper’s PDF from Semantic Scholar and return bounded text snippets around user-provided terms. Uses markitdown to convert PDF to markdown text.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.SemanticScholarTool[source]

Bases: BaseTool

Tool to search for papers on Semantic Scholar including abstracts.

API key is read from environment variable SEMANTIC_SCHOLAR_API_KEY. Request an API key at: https://www.semanticscholar.org/product/api

Rate limits: - Without API key: 1 request/second - With API key: 100 requests/second

_last_request_time = 0.0
_rate_limit_lock = <unlocked _thread.lock object>
__init__(tool_config, base_url='https://api.semanticscholar.org/graph/v1/paper/search')[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_enforce_rate_limit(has_api_key)[source]
_fetch_missing_abstract(paper_id)[source]
class tooluniverse.SmolAgentTool[source]

Bases: BaseTool

Wrap smolagents agents so they can be used as ToolUniverse tools.

Supports: - CodeAgent, ToolCallingAgent, Agent, ManagedAgent - Mixed tools: ToolUniverse tools and smolagents-native tools - Streaming integration with ToolUniverse stream callbacks

__init__(tool_config, tooluniverse=None)[source]
_get_api_key()[source]
_init_model()[source]
_import_smolagents_tool(class_name, import_path)[source]

Dynamically import smolagents tool class with helpful error messages.

_convert_tools()[source]

Convert mixed tool definitions to smolagents Tool instances.

_create_sub_agents(sub_configs)[source]

Recursively create sub-agent instances (for ManagedAgent).

_init_agent()[source]
run(arguments, stream_callback=None, **_)[source]

Execute the agent with optional streaming back into ToolUniverse.

Supports: - Streaming output (when stream_callback is provided and agent.stream_outputs=True) - Execution timeout (via agent_init_params.max_execution_time) - Thread-safe stdout/stderr redirection

class tooluniverse.SpliceAITool[source]

Bases: BaseTool

SpliceAI and Pangolin Splice Prediction API tool.

Provides access to deep learning-based splice prediction scores from the Broad Institute’s SpliceAI Lookup service.

__init__(tool_config)[source]
run(arguments)[source]

Route to operation handler based on config.

_normalize_variant(variant)[source]

Normalize variant format to chr-pos-ref-alt.

_validate_variant(variant)[source]

Validate variant format. Returns error message if invalid, None if valid.

_interpret_score(delta_score)[source]

Interpret SpliceAI delta score.

_predict_splice(arguments)[source]

Get SpliceAI predictions for a variant.

_predict_splice_pangolin(arguments)[source]

Get Pangolin splice predictions for a variant.

_get_max_delta(arguments)[source]

Get just the maximum delta score and interpretation for a variant.

class tooluniverse.SurvivalTool[source]

Bases: BaseTool

Local survival analysis tools.

Implements: - Kaplan-Meier survival estimator - Log-rank test (Mantel-Cox) - Cox proportional hazards regression (basic)

No external API required. Uses numpy/scipy.

__init__(tool_config)[source]
run(arguments)[source]

Execute survival analysis.

_km_estimator(durations, events)[source]

Compute Kaplan-Meier product-limit survival estimate.

Returns (times, survival, at_risk, events_at_t, n_censored).

_kaplan_meier(arguments)[source]

Compute Kaplan-Meier survival estimate.

durations: list of observed times event_observed: list of 1 (event occurred) or 0 (censored) group_labels: optional list of group labels for stratified analysis

_log_rank_test(arguments)[source]

Perform Mantel-Cox log-rank test between two groups.

durations_a, events_a: Group A survival data durations_b, events_b: Group B survival data

_cox_regression(arguments)[source]

Fit Cox proportional hazards model.

durations: list of observed times event_observed: list of 0/1 event indicators covariates: dict of {covariate_name: [values]}

class tooluniverse.SwissDockTool[source]

Bases: AsyncPollingTool

Tool for molecular docking using SwissDock REST API with AsyncPollingTool base class.

SwissDock performs protein-ligand docking using: - Attracting Cavities 2.0 (default) - cavity-based docking - AutoDock Vina - blind or targeted docking

Now uses AsyncPollingTool for automatic polling, progress reporting, and timeout management.

poll_interval: int = 5
max_duration: int = 600
__init__(tool_config)[source]

Initialize SwissDock tool with configuration.

_check_server_status()[source]

Check if SwissDock server is operational (synchronous).

_generate_session_id()[source]

Generate a unique session ID for the docking job.

_prepare_ligand(session_id, ligand_smiles)[source]

Prepare ligand from SMILES (raises on error).

_prepare_target(session_id, pdb_id)[source]

Prepare target protein from PDB ID (raises on error).

_set_docking_parameters(session_id, exhaustiveness=8, box_center=None, box_size=None, docking_engine='attracting_cavities')[source]

Set docking parameters (raises on error).

_start_docking(session_id)[source]

Start the docking job (raises on error).

_STATUS_KEYWORD_MAP = [(('COMPLETE', 'FINISHED', 'DONE'), 'FINISHED'), (('RUNNING', 'PROGRESS'), 'RUNNING'), (('ERROR', 'FAIL'), 'ERROR')]
_check_status_api(session_id)[source]

Check docking job status (returns status dict).

_retrieve_results(session_id)[source]

Retrieve docking results (raises on error).

submit_job(arguments)[source]

Submit docking job through multi-step workflow.

This handles the complete SwissDock workflow: 1. Check server status 2. Prepare ligand from SMILES 3. Prepare target protein 4. Set docking parameters 5. Start docking job

Returns session_id for polling.

check_status(job_id)[source]

Check SwissDock job status and retrieve results if complete.

Parameters:

job_id (str) – Session ID from submit_job()

Returns:

  • done (bool): True if complete

  • result (any): Results if done

  • progress (int): Progress percentage

  • error (str): Error message if failed

Return type:

Dict with keys

format_result(result)[source]

Format SwissDock results into standard response format.

_OPERATION_HANDLERS = {'check_job_status': '_check_job_status_operation', 'retrieve_results': '_retrieve_results_operation'}
async run(arguments, progress=None)[source]

Execute the SwissDock API call.

Routes to appropriate operation handler based on tool configuration.

async _check_job_status_operation(arguments)[source]

Check the status of a docking job by session ID (instant operation).

async _retrieve_results_operation(arguments)[source]

Retrieve results for a completed docking job (instant operation).

_abc_impl = <_abc._abc_data object>
class tooluniverse.SwissModelTool[source]

Bases: BaseTool

Tool for querying the SWISS-MODEL Repository.

Provides pre-computed protein homology models for UniProt entries, including template structures, sequence coverage, quality metrics, and download coordinates.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the SWISS-MODEL API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_get_models(arguments)[source]

Get all available homology models for a UniProt accession.

_get_model_summary(arguments)[source]

Get a summary of the best available model for a UniProt accession.

class tooluniverse.SynBioHubTool[source]

Bases: BaseTool

Tool for querying SynBioHub, a synthetic biology parts repository.

SynBioHub hosts the iGEM Registry (20,000+ BioBricks), as well as other public collections of genetic parts and designs encoded in SBOL format. Parts include promoters, coding sequences (CDS), terminators, ribosome binding sites (RBS), reporters (GFP, RFP, LacZ), regulatory elements, and composite devices.

Supports: search parts by keyword, list collections, get part SBOL data.

No authentication required for public collections.

__init__(tool_config)[source]
run(arguments)[source]

Execute the SynBioHub API call.

_query(arguments)[source]

Route to appropriate SynBioHub endpoint.

Search SynBioHub for genetic parts by keyword.

_get_collections(arguments)[source]

List public collections available on SynBioHub.

_get_part(arguments)[source]

Get detailed SBOL information for a specific genetic part.

static _find_text(parent, tag, ns)[source]

Find text content of an XML element.

class tooluniverse.TIMERTool[source]

Bases: BaseTool

Replicates TIMER2.0 tumor immune estimation using cBioPortal TCGA data.

Since TIMER3.0 no longer has a public REST API, this tool queries cBioPortal (www.cbioportal.org) for TCGA expression and survival data and computes equivalent statistics locally.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_resolve_study(cancer)[source]
_get_mrna_profile(study_id)[source]
_get_samples(study_id, n=200)[source]
_get_gene_id(symbol)[source]
_get_expression(profile_id, entrez_ids, sample_ids)[source]
_get_os_data(study_id)[source]
_immune_estimation(arguments)[source]
_gene_correlation(arguments)[source]
_survival_association(arguments)[source]
class tooluniverse.TRIPDatabaseTool[source]

Bases: BaseTool

Search TRIP Database (Turning Research into Practice). Specialized evidence-based medicine database with clinical guidelines filter.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_search_trip_database(query, limit, search_type)[source]

Search TRIP Database for clinical guidelines.

_fetch_guideline_content(url)[source]

Extract content from a guideline URL using targeted parsers when available.

_clean_generic_content(raw_text)[source]

Clean generic text content to emphasise clinical lines.

_extract_bmj_guideline_content(url)[source]

Fetch BMJ Rapid Recommendation content with key recommendations.

_extract_dmj_guideline_content(url)[source]

Fetch Diabetes & Metabolism Journal guideline content and GRADE statements.

class tooluniverse.TermInfo[source]

Bases: BaseModel

Basic term representation returned by OLS.

model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

iri: HttpUrl
ontology_name: str
short_form: str
label: str
obo_id: str | None
is_obsolete: bool | None
_abc_impl = <_abc._abc_data object>
class tooluniverse.TermSearchResponse[source]

Bases: PagedResponse

Paginated set of OLS terms.

num_found: int
terms: List[TermInfo]
_abc_impl = <_abc._abc_data object>
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tooluniverse.TextDownloadTool[source]

Bases: BaseTool

Download and return text content from URLs.

Optimized for text files - returns content as string directly. Supports encoding detection and normalization.

Expects: {“url”: “https://…”} Optional: {“encoding”: “utf-8”, “timeout”: seconds} Returns: {“content”: “text content”, “encoding”: “utf-8”}

__init__(tool_config)[source]
run(arguments)[source]

Download text content from URL.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing url and optional parameters

Returns:

Dictionary with content and encoding, or error

Return type:

Dict[str, Any]

class tooluniverse.TheraSAbDabTool[source]

Bases: BaseTool

Tool for querying Thera-SAbDab therapeutic antibody database.

Provides access to: - WHO INN therapeutic antibody names - Heavy/light chain sequences - Target antigens - Clinical trial status - PDB structural coverage

No authentication required.

_therapeutics_cache = None
__init__(tool_config)[source]
run(arguments)[source]

Execute the Thera-SAbDab API call.

_parse_search_results(html)[source]

Parse Thera-SAbDab search results from HTML.

_load_all_therapeutics()[source]

Load all therapeutics from Thera-SAbDab (with caching).

_search_therapeutics(arguments)[source]

Search therapeutic antibodies by name or keyword.

Searches the Thera-SAbDab database for matching therapeutics.

_get_all_therapeutics(arguments)[source]

Get summary of all therapeutic antibodies in Thera-SAbDab.

Returns count and sample of therapeutics by format and phase.

_search_by_target(arguments)[source]

Search therapeutic antibodies by target antigen.

Useful for finding all approved/clinical antibodies against a target.

class tooluniverse.ThreeDBeaconsTool[source]

Bases: BaseTool

Tool for 3D Beacons Hub API providing aggregated 3D structure models from multiple providers for a given UniProt protein accession.

Aggregates experimental structures (PDBe), predicted models (AlphaFold DB), homology models (SWISS-MODEL), conformational ensembles (PED), and more.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the 3D Beacons API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_structure_summary(arguments)[source]

Get summary of all 3D structures/models for a UniProt protein.

_get_structures(arguments)[source]

Get detailed structure list for a UniProt protein.

class tooluniverse.ToolFinderEmbedding[source]

Bases: BaseTool

A tool finder model that uses RAG (Retrieval-Augmented Generation) to find relevant tools based on user queries using semantic similarity search.

This class leverages sentence transformers to encode tool descriptions and find the most relevant tools for a given query through embedding-based similarity matching.

rag_model_name

Name of the sentence transformer model for embeddings

Type:

str

rag_model

The loaded sentence transformer model

Type:

SentenceTransformer

tool_desc_embedding

Cached embeddings of tool descriptions

Type:

torch.Tensor

tool_name

List of available tool names

Type:

list

tool_embedding_path

Path to cached tool embeddings file

Type:

str

special_tools_name

List of special tools to exclude from results

Type:

list

tooluniverse

Reference to the tool universe containing all tools

__init__(tool_config, tooluniverse)[source]

Initialize the ToolFinderEmbedding with configuration and RAG model.

Parameters:

tool_config (dict) – Configuration dictionary for the tool

_maybe_refresh_embeddings()[source]

Check if the tool list has changed and refresh embeddings if needed.

This method is called before each Tool_RAG query to ensure the embeddings are up-to-date with the currently loaded tools. This is critical when using Tool_RAG via HTTP API where tools are loaded dynamically.

load_rag_model()[source]

Load the sentence transformer model for RAG-based tool retrieval.

Configures the model with appropriate sequence length and tokenizer settings for optimal performance in tool description encoding.

The model is automatically moved to GPU if available for faster inference.

Raises:

ImportError – If sentence-transformers is not installed.

load_tool_desc_embedding(tooluniverse, include_names=None, exclude_names=None, include_categories=None, exclude_categories=None)[source]

Load or generate embeddings for tool descriptions from the tool universe.

This method either loads cached embeddings from disk or generates new ones by encoding all tool descriptions. Embeddings are cached to disk for faster subsequent loads. Memory is properly cleaned up after embedding generation to avoid OOM issues.

Parameters:
  • tooluniverse – ToolUniverse instance containing all available tools

  • include_names (list, optional) – Specific tool names to include

  • exclude_names (list, optional) – Tool names to exclude

  • include_categories (list, optional) – Tool categories to include

  • exclude_categories (list, optional) – Tool categories to exclude

rag_infer(query, top_k=5)[source]

Perform RAG inference to find the most relevant tools for a given query.

Uses semantic similarity between the query embedding and pre-computed tool embeddings to identify the most relevant tools.

Parameters:
  • query (str) – User query or description of desired functionality

  • top_k (int, optional) – Number of top tools to return. Defaults to 5.

Returns

list: List of top-k tool names ranked by relevance to the query

Raises:
find_tools(message=None, picked_tool_names=None, rag_num=5, return_call_result=False, categories=None)[source]

Find relevant tools based on a message or pre-selected tool names.

This method either uses RAG inference to find tools based on a message or processes a list of pre-selected tool names. It filters out special tools and returns tool prompts suitable for use in agent workflows.

Parameters:
  • message (str, optional) – Query message to find tools for. Required if picked_tool_names is None.

  • picked_tool_names (list, optional) – Pre-selected tool names to process. Required if message is None.

  • rag_num (int, optional) – Number of tools to return after filtering. Defaults to 5.

  • return_call_result (bool, optional) – If True, returns both prompts and tool names. Defaults to False.

  • categories (list, optional) – List of tool categories to filter by. Currently not implemented for embedding-based search.

Returns
str or tuple:
  • If return_call_result is False: Tool prompts as a formatted string

  • If return_call_result is True: Tuple of (tool_prompts, tool_names)

Raises:

AssertionError – If both message and picked_tool_names are None

run(arguments)[source]

Run the tool finder with given arguments following the standard tool interface.

This is the main entry point for using ToolFinderEmbedding as a standard tool. It extracts parameters from the arguments dictionary and delegates to find_tools().

Parameters:

arguments (dict) – Dictionary containing: - description (str, optional): Query message to find tools for (maps to ‘message’) - limit (int, optional): Number of tools to return (maps to ‘rag_num’). Defaults to 5. - picked_tool_names (list, optional): Pre-selected tool names to process - return_call_result (bool, optional): Whether to return both prompts and names. Defaults to False. - categories (list, optional): List of tool categories to filter by

class tooluniverse.ToolFinderKeyword[source]

Bases: BaseTool

Advanced keyword-based tool finder that uses sophisticated text processing and TF-IDF scoring.

This class implements natural language processing techniques for tool discovery including: - Tokenization and normalization - Stop word removal - Basic stemming - TF-IDF relevance scoring - Semantic phrase matching

The search operates by parsing user queries to extract key terms, processing them through NLP pipelines, and matching against pre-built indices of tool metadata for efficient and relevant tool discovery.

STOP_WORDS = {'a', 'all', 'an', 'and', 'any', 'are', 'as', 'at', 'be', 'boy', 'but', 'by', 'came', 'can', 'day', 'did', 'do', 'down', 'each', 'find', 'for', 'from', 'get', 'had', 'has', 'have', 'he', 'how', 'if', 'in', 'is', 'it', 'its', 'long', 'made', 'may', 'new', 'no', 'now', 'number', 'of', 'old', 'on', 'part', 'said', 'see', 'that', 'the', 'their', 'they', 'this', 'time', 'to', 'two', 'up', 'use', 'was', 'way', 'what', 'which', 'who', 'will', 'with', 'your'}
STEMMING_RULES = [('ies', 'y'), ('ied', 'y'), ('ying', 'y'), ('ing', ''), ('ly', ''), ('ed', ''), ('ies', 'y'), ('ier', 'y'), ('iest', 'y'), ('s', ''), ('es', ''), ('er', ''), ('est', ''), ('tion', 't'), ('sion', 's'), ('ness', ''), ('ment', ''), ('able', ''), ('ible', ''), ('ful', ''), ('less', ''), ('ous', ''), ('ive', ''), ('al', ''), ('ic', ''), ('ize', ''), ('ise', ''), ('ate', ''), ('fy', ''), ('ify', '')]
__init__(tool_config, tooluniverse=None)[source]

Initialize the Advanced Keyword-based Tool Finder.

Parameters:
  • tool_config (dict) – Configuration dictionary for the tool

  • tooluniverse – Reference to the ToolUniverse instance containing all tools

_tokenize_and_normalize(text)[source]

Tokenize text and apply normalization including stop word removal and stemming.

Parameters:

text (str) – Input text to tokenize

Returns

List[str]: List of processed tokens

_apply_stemming(word)[source]

Apply basic stemming rules to reduce words to their root form.

Parameters:

word (str) – Word to stem

Returns

str: Stemmed word

_extract_phrases(tokens, max_phrase_length=3)[source]

Extract meaningful phrases from tokens for better semantic matching.

Parameters:
  • tokens (List[str]) – Tokenized words

  • max_phrase_length (int) – Maximum length of phrases to extract

Returns

List[str]: List of phrases and individual tokens

_build_tool_index(tools)[source]

Build TF-IDF index for all tools to enable efficient relevance scoring.

Parameters:

tools (List[Dict]) – List of tool configurations

_extract_parameter_text(parameter_schema)[source]

Extract searchable text from parameter schema.

Parameters:

parameter_schema (Dict) – Tool parameter schema

Returns

List[str]: List of text elements from parameters

_calculate_tfidf_score(query_terms, tool_name)[source]

Calculate TF-IDF relevance score for a tool given query terms.

Parameters:
  • query_terms (List[str]) – Processed query terms and phrases

  • tool_name (str) – Name of the tool to score

Returns

float: TF-IDF relevance score

_calculate_exact_match_bonus(query, tool)[source]

Calculate bonus score for exact matches in tool name or key phrases.

Parameters:
  • query (str) – Original query string

  • tool (Dict) – Tool configuration

Returns

float: Exact match bonus score

find_tools(message=None, picked_tool_names=None, rag_num=5, return_call_result=False, categories=None)[source]

Find relevant tools based on a message or pre-selected tool names.

This method matches the interface of other tool finders to ensure seamless replacement. It uses keyword-based search instead of embedding similarity.

Parameters:
  • message (str, optional) – Query message to find tools for. Required if picked_tool_names is None.

  • picked_tool_names (list, optional) – Pre-selected tool names to process. Required if message is None.

  • rag_num (int, optional) – Number of tools to return after filtering. Defaults to 5.

  • return_call_result (bool, optional) – If True, returns both prompts and tool names. Defaults to False.

  • categories (list, optional) – List of tool categories to filter by.

Returns
str or tuple:
  • If return_call_result is False: Tool prompts as a formatted string

  • If return_call_result is True: Tuple of (tool_prompts, tool_names)

Raises:

AssertionError – If both message and picked_tool_names are None

run(arguments)[source]

Find tools using advanced keyword-based search with NLP processing and TF-IDF scoring.

This method provides a unified interface compatible with other tool finders.

Parameters:

arguments (dict) – Dictionary containing: - description (str): Search query string (unified parameter name) - categories (list, optional): List of categories to filter by - limit (int, optional): Maximum number of results to return (default: 10) - picked_tool_names (list, optional): Pre-selected tool names to process - return_call_result (bool, optional): Whether to return both prompts and names. Defaults to False.

Returns
str or tuple:
  • If return_call_result is False: Tool prompts as a formatted string

  • If return_call_result is True: Tuple of (tool_prompts, tool_names)

Original JSON-based search implementation for backward compatibility.

Parameters:

arguments (dict) – Search arguments

Returns

str: JSON string containing search results with relevance scores

class tooluniverse.ToolFinderLLM[source]

Bases: BaseTool

LLM-based tool finder that uses natural language processing to select relevant tools.

This class leverages AgenticTool’s LLM capabilities to analyze tool descriptions and match them with user queries. It’s optimized for minimal context window cost by only sending essential information (tool name and description) to the LLM, providing an intelligent alternative to embedding-based similarity search.

Cost optimizations: - Only includes tool name and description in LLM prompt - Uses compact formatting to minimize token usage - Excludes unnecessary tool metadata and parameters - Implements caching to avoid repeated tool processing

__init__(tool_config, tooluniverse=None)[source]

Initialize the LLM-based Tool Finder.

Parameters:
  • tool_config (dict) – Configuration dictionary containing LLM settings and prompts

  • tooluniverse – Reference to the ToolUniverse instance containing all tools

_init_agentic_tool()[source]

Initialize the underlying AgenticTool for LLM operations.

_get_tool_selection_prompt()[source]

Get the prompt template for tool selection. Optimized for minimal token usage.

_get_available_tools(force_refresh=False)[source]

Get available tools with their descriptions, with caching.

Parameters:

force_refresh (bool) – Whether to force refresh the cache

Returns

list: List of tool dictionaries with names and descriptions

_prefilter_tools_by_keywords(available_tools, query, max_tools=100)[source]

Pre-filter tools using keyword matching to reduce context size before LLM processing.

Parameters:
  • available_tools (list) – All available tools

  • query (str) – User query

  • max_tools (int) – Maximum number of tools to send to LLM

Returns

list: Filtered list of tools

_format_tools_for_prompt(tools)[source]

Format tools for inclusion in the LLM prompt with minimal information to reduce context cost. Only includes name and description to minimize token usage.

Parameters:

tools (list) – List of tool dictionaries

Returns

str: Compact formatted tool descriptions for the prompt

find_tools_llm(query, limit=5, include_reasoning=False, categories=None)[source]

Find relevant tools using LLM-based selection.

Parameters:
  • query (str) – User query describing needed functionality

  • limit (int) – Maximum number of tools to return

  • include_reasoning (bool) – Whether to include selection reasoning

  • categories (list, optional) – List of tool categories to filter by

Returns

dict: Dictionary containing selected tools and metadata

find_tools(message=None, picked_tool_names=None, rag_num=5, return_call_result=False, categories=None, return_list_only=None)[source]

Find relevant tools based on a message or pre-selected tool names.

This method matches the interface of the original ToolFinderEmbedding to ensure seamless replacement. It uses LLM-based selection instead of embedding similarity.

Parameters:
  • message (str, optional) – Query message to find tools for. Required if picked_tool_names is None.

  • picked_tool_names (list, optional) – Pre-selected tool names to process. Required if message is None.

  • rag_num (int, optional) – Number of tools to return after filtering. Defaults to 5.

  • return_call_result (bool, optional) – If True, returns both prompts and tool names. Defaults to False.

  • categories (list, optional) – List of tool categories to filter by. Applied before LLM selection.

  • return_list_only (bool, optional) – If True, returns only a list of tool specifications. Overrides other return options.

Returns
str, tuple, or list:
  • If return_list_only is True: List of tool specifications

  • If return_call_result is False: Tool prompts as a formatted string

  • If return_call_result is True: Tuple of (tool_prompts, tool_names)

Raises:

AssertionError – If both message and picked_tool_names are None

get_tool_stats()[source]

Get statistics about available tools.

_format_as_json(result, query, limit, categories, return_call_result)[source]

Format the find_tools result as a standardized JSON string.

Parameters:
  • result – Result from find_tools method (either string, list, or tuple)

  • query – Original search query

  • limit – Requested number of tools

  • categories – Requested categories filter

  • return_call_result – Whether return_call_result was True

Returns

str: JSON formatted search results

clear_cache()[source]

Clear the tool cache to force refresh on next access.

run(arguments)[source]

Run the tool finder with given arguments following the standard tool interface.

This method now returns JSON format by default to ensure consistency with other search tools and simplify integration with SMCP.

Parameters:

arguments (dict) – Dictionary containing: - description (str, optional): Query message to find tools for (maps to ‘message’) - limit (int, optional): Number of tools to return (maps to ‘rag_num’). Defaults to 5. - picked_tool_names (list, optional): Pre-selected tool names to process - return_call_result (bool, optional): Whether to return both prompts and names. Defaults to False. - return_format (str, optional): ‘json’ (default) or ‘legacy’ for old format - return_list_only (bool, optional): Whether to return only tool specifications as a list - categories (list, optional): List of tool categories to filter by

find_tools_legacy(query, limit=5, include_reasoning=False, return_format='prompts')[source]

Legacy method for finding tools with different parameter names.

This provides backward compatibility for any code that might use ‘query’ instead of ‘description’.

class tooluniverse.ToolUniverseTool[source]

Bases: object

Adapter that wraps a ToolUniverse tool and exposes it as a smolagents Tool.

We create the real subclass dynamically to avoid hard dependency when the module is imported without smolagents installed.

static __new__(cls, *args, **kwargs)[source]
classmethod from_tooluniverse(tool_name, tooluniverse_instance, tool_config=None)[source]

Factory to create a smolagents-compatible Tool from a ToolUniverse tool.

This mirrors common factory patterns (e.g., from_langchain) and returns an instance of the dynamically constructed Tool subclass.

class tooluniverse.UCSCEpigenomicsTool[source]

Bases: BaseTool

UCSC Genome Browser epigenomics-specific tools.

Provides access to: - CpG island annotations - ENCODE4 candidate cis-Regulatory Elements (cCREs) - Transcription Factor binding site clusters

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the UCSC epigenomics API call.

_dispatch(arguments)[source]

Route to appropriate endpoint.

_ucsc_get_track(genome, track, chrom, start, end)[source]

Helper to fetch UCSC track data.

_get_cpg_islands(arguments)[source]

Get CpG island annotations for a genomic region.

_get_encode_ccres(arguments)[source]

Get ENCODE4 candidate cis-Regulatory Elements for a genomic region.

_get_tf_binding_clusters(arguments)[source]

Get TF binding site clusters from ENCODE3.

class tooluniverse.UCSCGenomeTool[source]

Bases: BaseTool

Tool for querying the UCSC Genome Browser REST API.

Provides genomic search, DNA sequence retrieval, and annotation track data for 220+ genome assemblies (hg38, mm39, etc.).

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the UCSC Genome Browser API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

Search UCSC Genome Browser for genes, transcripts, or features.

_get_sequence(arguments)[source]

Get DNA sequence for a specified genomic region.

_get_track(arguments)[source]

Get annotation track data for a specified genomic region.

class tooluniverse.UMLSRESTTool[source]

Bases: BaseTool

Base class for UMLS REST API tools.

__init__(tool_config)[source]
_get_api_key()[source]

Get UMLS API key from environment variable.

_build_url(arguments)[source]

Build the full URL from endpoint template and arguments.

_make_request(arguments)[source]

Make request to UMLS API.

run(arguments)[source]

Execute the tool with given arguments.

class tooluniverse.URLHTMLTagTool[source]

Bases: BaseTool

Fetches a webpage and extracts the content of a specified HTML tag. Expects: {“url”: “https://…”} The tag to extract is specified in the tool’s configuration. The tag to extract is specified in the tool’s configuration. Optional: {“timeout”: <seconds>} (default 20) Returns: {“content”: “<extracted content>”} or {“error”: “…”}

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.URLToPDFTextTool[source]

Bases: BaseTool

Loads a webpage (with JavaScript), exports it as a PDF, and extracts text. Expects: {“url”: “https://…”} Optional: {“timeout”: <seconds>} (default 30) Returns: {“text”: “<extracted text>”} or {“error”: “…”}

__init__(tool_config)[source]
_ensure_playwright_browsers(browsers=('chromium',), with_deps=False, timeout_seconds=600)[source]

Ensure Playwright browser binaries are installed.

Returns

None on success, or an error string on failure.

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.USPTOOpenDataPortalTool[source]

Bases: BaseTool

A tool for interacting with the USPTO Open Data Portal API to search for and retrieve patent information. The run method dynamically constructs API requests based on the provided tool configuration.

__init__(tool_config, api_key=None, base_url='https://api.uspto.gov/api/v1')[source]

Initializes the USPTOOpenDataPortalTool.

Parameters:
  • tool_config – The configuration for the specific tool being run.

  • api_key – Your USPTO Open Data Portal API key.

  • base_url – The base URL for the USPTO API.

get_by_path(d, keys)[source]

Safely navigate nested dicts by a list of keys.

assign_by_path(d, path, value)[source]

Create nested dicts for a dot‑path and set the final key to value.

prune_item(item, return_fields)[source]
run(arguments)[source]

Runs the specified tool by constructing and executing an API call based on the tool’s configuration.

Parameters:

arguments – A dictionary of arguments for the tool, matching the parameters in the tool definition.

Returns

The result of the API call, either as a dictionary (for JSON) or a string (for CSV).

class tooluniverse.UniChemTool[source]

Bases: BaseTool

Tool for querying UniChem compound cross-referencing service.

Maps chemical identifiers across 40+ databases using InChIKey, source compound IDs, or UCIs (UniChem Compound Identifiers).

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the UniChem API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_search_compound(arguments)[source]

Search UniChem for a compound by InChIKey, sourceID, or UCI.

_list_sources(arguments)[source]

List all chemical database sources in UniChem.

class tooluniverse.UniParcTool[source]

Bases: BaseTool

Tool for querying UniProt UniParc sequence archive.

Supports: - Get UniParc entry by UPI identifier (cross-references, sequence features) - Search UniParc by gene name, organism, database membership

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the UniParc API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_entry(arguments)[source]

Get UniParc entry by UPI identifier.

Search UniParc by gene, organism, or database.

class tooluniverse.UniProtIDMappingTool[source]

Bases: BaseTool

Tool for converting identifiers between databases using the UniProt ID Mapping service.

Handles the async submit -> poll -> results workflow automatically. No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the UniProt ID Mapping API call.

_dispatch(arguments)[source]

Route to appropriate endpoint.

_submit_and_poll(from_db, to_db, ids, tax_id=None)[source]

Submit a mapping job and poll for results.

_convert(arguments)[source]

Generic ID conversion between any supported databases.

_to_pdb(arguments)[source]

Convert UniProt accessions to PDB IDs.

_gene_to_uniprot(arguments)[source]

Convert gene names to UniProt accessions.

_list_databases(arguments)[source]

List available databases for ID mapping.

class tooluniverse.UniProtLocationsTool[source]

Bases: BaseTool

Tool for querying the UniProt Subcellular Locations database.

Supports: - Get location details by ID (SL-XXXX) - Search locations by name or keyword

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the UniProt Locations API call.

_query(arguments)[source]

Route to appropriate endpoint.

_parse_location(data)[source]

Parse a location entry into a clean structure.

_get_location(arguments)[source]

Get subcellular location details by ID.

_search_locations(arguments)[source]

Search subcellular locations by name or keyword.

class tooluniverse.UniProtRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
validate_parameters(arguments)[source]

Validate parameters with automatic type coercion for limit.

_build_url(args)[source]
_extract_data(data, extract_path)[source]

Custom data extraction with support for filtering

Handle search queries with flexible parameters

_handle_id_mapping(arguments)[source]

Handle ID mapping requests

Handle UniRef search queries

Handle UniParc search queries

run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

get_entry_by_accession(accession)[source]
get_function_by_accession(accession)[source]
get_names_taxonomy_by_accession(accession)[source]
get_subcellular_location_by_accession(accession)[source]
get_disease_variants_by_accession(accession)[source]
get_ptm_processing_by_accession(accession)[source]
get_sequence_isoforms_by_accession(accession)[source]
class tooluniverse.UniProtRefTool[source]

Bases: BaseTool

Tool for querying UniProt reference datasets (diseases, keywords, proteomes).

UniProt maintains curated controlled vocabularies that standardize protein annotations across the database. This tool provides access to: - Disease vocabulary: 6K+ curated disease entries with cross-refs to OMIM, MeSH, MedGen - Keyword vocabulary: 1.2K+ standardized terms for biological process, function, etc. - Proteomes: Reference proteome summaries with assembly and component data

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the UniProt reference dataset API call.

_query(arguments)[source]

Route to appropriate UniProt reference endpoint.

_search_diseases(arguments)[source]

Search UniProt controlled disease vocabulary.

_get_disease(arguments)[source]

Get a specific disease entry by UniProt disease ID.

_search_keywords(arguments)[source]

Search UniProt keyword controlled vocabulary.

_get_keyword(arguments)[source]

Get a specific keyword entry by UniProt keyword ID.

_get_proteome(arguments)[source]

Get reference proteome information by UniProt proteome ID.

_search_proteomes(arguments)[source]

Search UniProt reference proteomes.

class tooluniverse.UniProtTaxonomyTool[source]

Bases: BaseTool

Tool for querying UniProt taxonomy data.

Supports: - Get taxonomy details by NCBI taxon ID - Search taxonomy by name

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the UniProt Taxonomy API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_taxon(arguments)[source]

Get taxonomy details by NCBI taxon ID.

Search taxonomy by name.

class tooluniverse.UniRefTool[source]

Bases: BaseTool

Tool for querying UniProt UniRef protein sequence clusters.

Supports: - Get cluster details by ID (UniRef90_XXXXX, UniRef50_XXXXX, UniRef100_XXXXX) - Search clusters by protein name, gene, or organism

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the UniRef API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_cluster(arguments)[source]

Get UniRef cluster details by cluster ID.

_search_clusters(arguments)[source]

Search UniRef clusters by protein name, gene, or organism.

class tooluniverse.UnpaywallTool[source]

Bases: BaseTool

Query Unpaywall by DOI to check open-access status and OA locations. Requires a contact email.

__init__(tool_config, base_url='https://api.unpaywall.org/v2/')[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_lookup(doi, email)[source]
class tooluniverse.VisualizationTool[source]

Bases: BaseTool

Base class for all visualization tools in ToolUniverse.

Provides common functionality for: - HTML generation and embedding - Static image conversion - Error handling - Output formatting

__init__(tool_config)[source]
create_visualization_response(html_content, viz_type, data=None, static_image=None, metadata=None)[source]

Create a standardized visualization response.

create_error_response(error_message, error_type='VisualizationError')[source]

Create a standardized error response.

convert_to_base64_image(image_data, format='PNG')[source]

Convert image data to base64 string.

create_plotly_html(fig, width=None, height=None, include_plotlyjs='cdn')[source]

Create HTML from Plotly figure.

create_py3dmol_html(viewer_html, width=None, height=None, title=None, info_cards='', control_panel='', toolbar='')[source]

Create modern HTML wrapper for py3Dmol viewer.

add_3d_controls_script()[source]

Add JavaScript for 3D viewer controls.

create_molecule_2d_html(molecule_image, molecule_info, width=None, height=None, title=None)[source]

Create modern HTML for 2D molecule visualization.

class tooluniverse.WFGYPromptBundleTool[source]

Bases: BaseTool

Local prompt-bundle tool for triaging LLM/RAG failures via WFGY ProblemMap.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

static _build_system_prompt(audience, links)[source]
static _build_user_prompt(bug_description)[source]
class tooluniverse.WHOGHOQueryTool[source]

Bases: WHOGHORESTTool

Tool for answering generic health questions using natural language.

__init__(tool_config)[source]
run(arguments)[source]

Execute query tool with natural language processing.

class tooluniverse.WHOGHORESTTool[source]

Bases: BaseTool

Base class for WHO Global Health Observatory (GHO) REST API tools.

__init__(tool_config)[source]
_make_request(params=None)[source]

Make request to WHO GHO API.

run(arguments)[source]

Execute the tool with given arguments.

static parse_query(query)[source]

Parse natural language query to extract health topic, country, year.

Parameters:

query (str) – Natural language query (e.g., “smoking rate in USA 2020”)

Returns:

Dictionary with extracted: topic, country_code, year

Return type:

dict

static rank_indicators(indicators, query)[source]

Rank indicators by relevance to query.

Parameters:
  • indicators (list) – List of indicator dictionaries

  • query (str) – Search query

Returns:

Ranked list of indicators

Return type:

list

static format_health_answer(value, indicator_name, country_code=None, year=None)[source]

Format health data into a human-readable answer.

Parameters:
  • value (Any) – Health statistic value

  • indicator_name (str) – Name of the indicator

  • country_code (str, optional) – Country code

  • year (int, optional) – Year

Returns:

Formatted answer dictionary

Return type:

dict

static is_value_available(value_obj)[source]

Check if a WHO data value is available.

Returns False when the API returns placeholders such as “Data not available” or when the numeric value is missing.

_make_request_for_data(params)[source]

Make request to data using direct indicator endpoint format.

class tooluniverse.WHOGHOStatisticTool[source]

Bases: WHOGHORESTTool

Tool for getting health statistics by indicator name.

__init__(tool_config)[source]
run(arguments)[source]

Get health statistic by indicator name.

class tooluniverse.WHOGHOTopicTool[source]

Bases: WHOGHORESTTool

Tool for finding indicators by topic.

__init__(tool_config)[source]
run(arguments)[source]

Find indicators by topic.

class tooluniverse.WHOGuidelineFullTextTool[source]

Bases: BaseTool

Fetch full text content from WHO guideline pages. Takes a WHO publication URL and extracts content or PDF download link.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_fetch_who_guideline(url)[source]

Fetch WHO guideline content and PDF link.

class tooluniverse.WHOGuidelinesTool[source]

Bases: BaseTool

WHO (World Health Organization) Guidelines Search Tool. Searches WHO official guidelines from their publications website.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_topic_slug(query)[source]

Convert search query to WHO health-topics URL slug candidates.

_scrape_topic_publications(topic_slug)[source]

Fetch WHO health topic page and extract publication links.

_search_who_guidelines(query, limit)[source]

Search WHO guidelines via WHO health-topics pages then general guidelines page.

class tooluniverse.WebAPIDocumentationSearchTool[source]

Bases: WebSearchTool

Specialized web search tool for API documentation and Python libraries.

This tool is optimized for finding API documentation, Python packages, and technical resources using DDGS with multiple search engines.

run(arguments)[source]

Execute API documentation focused search.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing: - query: Search query string - max_results: Maximum number of results (default: 10) - focus: Focus area (‘api_docs’, ‘python_packages’, etc.) - backend: Search engine backend (default: ‘auto’)

Returns:

Dictionary containing search results

Return type:

Dict[str, Any]

class tooluniverse.WebSearchTool[source]

Bases: BaseTool

Web search tool using DDGS library.

This tool performs web searches using the DDGS library which supports multiple search engines including Google, Bing, Brave, Yahoo, DuckDuckGo, etc.

__init__(tool_config)[source]
_search_with_ddgs(query, max_results=10, backend='auto', region='us-en', safesearch='moderate')[source]

Perform a web search using DDGS library and return formatted results.

Parameters:
  • query (str) – Search query string

  • max_results (int) – Maximum number of results to return

  • backend (str) – Search engine backend (auto, google, bing, brave, etc.)

  • region (str) – Search region (e.g., ‘us-en’, ‘cn-zh’)

  • safesearch (str) – Safe search level (‘on’, ‘moderate’, ‘off’)

Returns:

List of search results with title, url, and snippet

Return type:

List[Dict[str, Any]]

_search_with_fallback(query, max_results, backend, region, safesearch)[source]

Search with backend fallback strategy.

Returns:

(results, backend_used, attempted_backends, warning, provider_errors)

Return type:

Tuple[List[Dict[str, Any]], str | None, List[str], str | None, Dict[str, str]]

_search_with_duckduckgo_html(query, max_results)[source]

Fallback provider: parse DuckDuckGo HTML results without DDGS.

_search_with_wikipedia_api(query, max_results)[source]

Fallback provider: Wikipedia OpenSearch API.

run(arguments)[source]

Execute web search using DDGS.

Parameters:

arguments (Dict[str, Any]) – Dictionary containing: - query: Search query string - max_results: Maximum number of results (default: 10) - search_type: Type of search (default: ‘general’) - backend: Search engine backend (default: ‘auto’) - region: Search region (default: ‘us-en’) - safesearch: Safe search level (default: ‘moderate’)

Returns:

Dictionary containing search results

Return type:

Dict[str, Any]

class tooluniverse.WikiPathwaysExtTool[source]

Bases: BaseTool

Tool for WikiPathways extended API endpoints.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the WikiPathways API call.

_query(arguments)[source]

Route to appropriate endpoint.

_get_pathway_genes(arguments)[source]

Get all genes in a WikiPathways pathway.

_find_pathways_by_gene(arguments)[source]

Find pathways containing a specific gene.

class tooluniverse.WikiPathwaysGetTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.WikiPathwaysSearchTool[source]

Bases: object

__init__(tool_config=None)[source]
run(arguments)[source]
class tooluniverse.WikidataSPARQLTool[source]

Bases: BaseTool

Run SPARQL queries against Wikidata (powering Scholia views).

Parameters (arguments):

sparql (str): SPARQL query string max_results (int): Optional result limit override

__init__(tool_config)[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.WikipediaContentTool[source]

Bases: BaseTool

Extract content from Wikipedia articles using MediaWiki API.

Parameters (arguments):

title (str): Article title (required) language (str): Wikipedia language code (default: “en”) extract_type (str): Type of content - “intro” (first paragraph),

“summary” (first few paragraphs), or “full” (entire article) (default: “summary”)

max_chars (int): Maximum characters for summary/extract

(default: 2000)

__init__(tool_config)[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.WikipediaSearchTool[source]

Bases: BaseTool

Search Wikipedia articles using MediaWiki API.

Parameters (arguments):

query (str): Search query string limit (int): Maximum number of results to return (default: 10, max: 50) language (str): Wikipedia language code (default: “en”)

__init__(tool_config)[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.WikipediaSummaryTool[source]

Bases: BaseTool

Get a brief summary/introduction from a Wikipedia article.

This is a convenience tool that extracts just the first paragraph(s) of an article.

Parameters (arguments):

title (str): Article title (required) language (str): Wikipedia language code (default: “en”) max_chars (int): Maximum characters to return (default: 500)

__init__(tool_config)[source]
run(arguments=None)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.WoRMSRESTTool[source]

Bases: BaseTool

__init__(tool_config)[source]
_build_url(args)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

class tooluniverse.WormBaseTool[source]

Bases: BaseTool

Tool for querying WormBase, the C. elegans genome database.

Provides detailed gene information for C. elegans and other nematodes including phenotypes, expression data, orthologs, and functional annotations.

No authentication required.

__init__(tool_config)[source]
run(arguments)[source]

Execute the WormBase API call.

_dispatch(arguments)[source]

Route to appropriate endpoint based on config.

_gene_overview(arguments)[source]

Get detailed gene overview from WormBase by WBGene ID.

_gene_phenotypes(arguments)[source]

Get phenotype annotations for a C. elegans gene from WormBase.

_gene_expression(arguments)[source]

Get expression data for a C. elegans gene from WormBase.

class tooluniverse.XMLDatasetTool[source]

Bases: BaseTool

Tool to search and filter XML datasets that are organized as a collection of searchable records (e.g., dataset of medical subjects or drug descriptions). Supports user-friendly queries without requiring XPath knowledge.

__init__(tool_config)[source]
_load_dataset()[source]

Load and parse the XML dataset.

_get_dataset_path()[source]

Get the path to the XML dataset.

_extract_record_data(record_element)[source]

Extract data from a record element with caching.

_extract_field_value(element, xpath_expr)[source]

Extract field value using XPath expression.

_get_all_records_data()[source]

Get all records data with caching.

run(arguments)[source]

Main entry point for the tool.

Search records by text content across multiple fields.

_find_matches(record_data, search_query, search_fields, case_sensitive, exact_match)[source]

Find matching fields in a record.

_get_searchable_value(record_data, field, case_sensitive)[source]

Get searchable string value for a field.

_is_match(field_value, search_query, exact_match)[source]

Check if field value matches search query.

_filter(arguments)[source]

Filter records based on field criteria.

_get_filter_function(condition, value)[source]

Get the appropriate filter function for the condition.

_get_filter_description(field, condition, value)[source]

Get human-readable filter description.

get_dataset_info()[source]

Get comprehensive information about the loaded XML dataset.

tooluniverse.XMLTool

alias of XMLDatasetTool

class tooluniverse.ZenodoRESTTool[source]

Bases: BaseRESTTool

Generic REST tool for Zenodo API endpoints.

_get_param_mapping()[source]

Map Zenodo-specific parameter names.

_process_response(response, url)[source]

Process Zenodo API response with search result handling.

class tooluniverse.dbSNPGetFrequencies[source]

Bases: dbSNPRESTTool

Get allele frequencies for a variant.

__init__(tool_config)[source]
run(arguments)[source]

Get allele frequencies by rsID using E-utilities.

class tooluniverse.dbSNPGetVariantByRsID[source]

Bases: dbSNPRESTTool

Get variant information by rsID.

__init__(tool_config)[source]
run(arguments)[source]

Get variant by rsID using E-utilities.

class tooluniverse.dbSNPRESTTool[source]

Bases: NCBIEUtilsTool

Base class for dbSNP REST API tools with rate limiting.

class tooluniverse.dbSNPSearchByGene[source]

Bases: dbSNPRESTTool

Search variants by gene symbol.

__init__(tool_config)[source]
run(arguments)[source]

Search variants by gene using E-utilities.

class tooluniverse.gnomADGetGeneConstraints[source]

Bases: gnomADGraphQLTool

Get gene constraint metrics from gnomAD.

__init__(tool_config)[source]
run(arguments)[source]

Get gene constraints.

class tooluniverse.gnomADGraphQLQueryTool[source]

Bases: gnomADGraphQLTool

Generic gnomAD GraphQL tool driven by JSON config.

Config fields supported: - fields.query_schema: GraphQL query string - fields.variable_map: map tool argument names -> GraphQL variable names - fields.default_variables: default GraphQL variable values

__init__(tool_config)[source]
run(arguments)[source]

Execute GraphQL query with given arguments.

class tooluniverse.gnomADGraphQLTool[source]

Bases: BaseTool

Base class for gnomAD GraphQL API tools.

__init__(tool_config)[source]
run(arguments)[source]

Execute GraphQL query with given arguments.

class tooluniverse.miRNAGetTool[source]

Bases: BaseTool

Get detailed miRNA/lncRNA information from RNAcentral by ID. Returns sequence, species, RNA type, and database cross-references.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

_get_rna(arguments)[source]

Get RNA entry details including sequence.

_get_publications(arguments)[source]

Get publications associated with an RNA entry.

_get_xrefs(arguments)[source]

Get cross-references for an RNA entry.

class tooluniverse.miRNASearchTool[source]

Bases: BaseTool

Search for miRNAs/lncRNAs/ncRNAs via EBI Search of RNAcentral. Can filter results by RNA type for focused results.

__init__(tool_config)[source]
run(arguments)[source]

Execute the tool.

The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.

Parameters:
  • arguments (dict, optional) – Tool-specific arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (bool, optional) – Whether parameter validation was performed

Note

These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.

For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.

tooluniverse.__dir__()[source]

Dynamic directory listing. Includes standard globals plus all available tools.

tooluniverse.__getattr__(name)[source]

Dynamic dispatch for tool classes. This replaces the manual _LazyImportProxy list.

Subpackages

Submodules