tooluniverse 0.2.0__py3-none-any.whl → 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tooluniverse might be problematic. Click here for more details.

Files changed (186) hide show
  1. tooluniverse/__init__.py +340 -4
  2. tooluniverse/admetai_tool.py +84 -0
  3. tooluniverse/agentic_tool.py +563 -0
  4. tooluniverse/alphafold_tool.py +96 -0
  5. tooluniverse/base_tool.py +129 -6
  6. tooluniverse/boltz_tool.py +207 -0
  7. tooluniverse/chem_tool.py +192 -0
  8. tooluniverse/compose_scripts/__init__.py +1 -0
  9. tooluniverse/compose_scripts/biomarker_discovery.py +293 -0
  10. tooluniverse/compose_scripts/comprehensive_drug_discovery.py +186 -0
  11. tooluniverse/compose_scripts/drug_safety_analyzer.py +89 -0
  12. tooluniverse/compose_scripts/literature_tool.py +34 -0
  13. tooluniverse/compose_scripts/output_summarizer.py +279 -0
  14. tooluniverse/compose_scripts/tool_description_optimizer.py +681 -0
  15. tooluniverse/compose_scripts/tool_discover.py +705 -0
  16. tooluniverse/compose_scripts/tool_graph_composer.py +448 -0
  17. tooluniverse/compose_tool.py +371 -0
  18. tooluniverse/ctg_tool.py +1002 -0
  19. tooluniverse/custom_tool.py +81 -0
  20. tooluniverse/dailymed_tool.py +108 -0
  21. tooluniverse/data/admetai_tools.json +155 -0
  22. tooluniverse/data/adverse_event_tools.json +108 -0
  23. tooluniverse/data/agentic_tools.json +1156 -0
  24. tooluniverse/data/alphafold_tools.json +87 -0
  25. tooluniverse/data/boltz_tools.json +9 -0
  26. tooluniverse/data/chembl_tools.json +16 -0
  27. tooluniverse/data/clinicaltrials_gov_tools.json +326 -0
  28. tooluniverse/data/compose_tools.json +202 -0
  29. tooluniverse/data/dailymed_tools.json +70 -0
  30. tooluniverse/data/dataset_tools.json +646 -0
  31. tooluniverse/data/disease_target_score_tools.json +712 -0
  32. tooluniverse/data/efo_tools.json +17 -0
  33. tooluniverse/data/embedding_tools.json +319 -0
  34. tooluniverse/data/enrichr_tools.json +31 -0
  35. tooluniverse/data/europe_pmc_tools.json +22 -0
  36. tooluniverse/data/expert_feedback_tools.json +10 -0
  37. tooluniverse/data/fda_drug_adverse_event_tools.json +491 -0
  38. tooluniverse/data/fda_drug_labeling_tools.json +1 -1
  39. tooluniverse/data/fda_drugs_with_brand_generic_names_for_tool.py +76929 -148860
  40. tooluniverse/data/finder_tools.json +209 -0
  41. tooluniverse/data/gene_ontology_tools.json +113 -0
  42. tooluniverse/data/gwas_tools.json +1082 -0
  43. tooluniverse/data/hpa_tools.json +333 -0
  44. tooluniverse/data/humanbase_tools.json +47 -0
  45. tooluniverse/data/idmap_tools.json +74 -0
  46. tooluniverse/data/mcp_client_tools_example.json +113 -0
  47. tooluniverse/data/mcpautoloadertool_defaults.json +28 -0
  48. tooluniverse/data/medlineplus_tools.json +141 -0
  49. tooluniverse/data/monarch_tools.json +1 -1
  50. tooluniverse/data/openalex_tools.json +36 -0
  51. tooluniverse/data/opentarget_tools.json +1 -1
  52. tooluniverse/data/output_summarization_tools.json +101 -0
  53. tooluniverse/data/packages/bioinformatics_core_tools.json +1756 -0
  54. tooluniverse/data/packages/categorized_tools.txt +206 -0
  55. tooluniverse/data/packages/cheminformatics_tools.json +347 -0
  56. tooluniverse/data/packages/earth_sciences_tools.json +74 -0
  57. tooluniverse/data/packages/genomics_tools.json +776 -0
  58. tooluniverse/data/packages/image_processing_tools.json +38 -0
  59. tooluniverse/data/packages/machine_learning_tools.json +789 -0
  60. tooluniverse/data/packages/neuroscience_tools.json +62 -0
  61. tooluniverse/data/packages/original_tools.txt +0 -0
  62. tooluniverse/data/packages/physics_astronomy_tools.json +62 -0
  63. tooluniverse/data/packages/scientific_computing_tools.json +560 -0
  64. tooluniverse/data/packages/single_cell_tools.json +453 -0
  65. tooluniverse/data/packages/structural_biology_tools.json +396 -0
  66. tooluniverse/data/packages/visualization_tools.json +399 -0
  67. tooluniverse/data/pubchem_tools.json +215 -0
  68. tooluniverse/data/pubtator_tools.json +68 -0
  69. tooluniverse/data/rcsb_pdb_tools.json +1332 -0
  70. tooluniverse/data/reactome_tools.json +19 -0
  71. tooluniverse/data/semantic_scholar_tools.json +26 -0
  72. tooluniverse/data/special_tools.json +2 -25
  73. tooluniverse/data/tool_composition_tools.json +88 -0
  74. tooluniverse/data/toolfinderkeyword_defaults.json +34 -0
  75. tooluniverse/data/txagent_client_tools.json +9 -0
  76. tooluniverse/data/uniprot_tools.json +211 -0
  77. tooluniverse/data/url_fetch_tools.json +94 -0
  78. tooluniverse/data/uspto_downloader_tools.json +9 -0
  79. tooluniverse/data/uspto_tools.json +811 -0
  80. tooluniverse/data/xml_tools.json +3275 -0
  81. tooluniverse/dataset_tool.py +296 -0
  82. tooluniverse/default_config.py +165 -0
  83. tooluniverse/efo_tool.py +42 -0
  84. tooluniverse/embedding_database.py +630 -0
  85. tooluniverse/embedding_sync.py +396 -0
  86. tooluniverse/enrichr_tool.py +266 -0
  87. tooluniverse/europe_pmc_tool.py +52 -0
  88. tooluniverse/execute_function.py +1775 -95
  89. tooluniverse/extended_hooks.py +444 -0
  90. tooluniverse/gene_ontology_tool.py +194 -0
  91. tooluniverse/graphql_tool.py +158 -36
  92. tooluniverse/gwas_tool.py +358 -0
  93. tooluniverse/hpa_tool.py +1645 -0
  94. tooluniverse/humanbase_tool.py +389 -0
  95. tooluniverse/logging_config.py +254 -0
  96. tooluniverse/mcp_client_tool.py +764 -0
  97. tooluniverse/mcp_integration.py +413 -0
  98. tooluniverse/mcp_tool_registry.py +925 -0
  99. tooluniverse/medlineplus_tool.py +337 -0
  100. tooluniverse/openalex_tool.py +228 -0
  101. tooluniverse/openfda_adv_tool.py +283 -0
  102. tooluniverse/openfda_tool.py +393 -160
  103. tooluniverse/output_hook.py +1122 -0
  104. tooluniverse/package_tool.py +195 -0
  105. tooluniverse/pubchem_tool.py +158 -0
  106. tooluniverse/pubtator_tool.py +168 -0
  107. tooluniverse/rcsb_pdb_tool.py +38 -0
  108. tooluniverse/reactome_tool.py +108 -0
  109. tooluniverse/remote/boltz/boltz_mcp_server.py +50 -0
  110. tooluniverse/remote/depmap_24q2/depmap_24q2_mcp_tool.py +442 -0
  111. tooluniverse/remote/expert_feedback/human_expert_mcp_tools.py +2013 -0
  112. tooluniverse/remote/expert_feedback/simple_test.py +23 -0
  113. tooluniverse/remote/expert_feedback/start_web_interface.py +188 -0
  114. tooluniverse/remote/expert_feedback/web_only_interface.py +0 -0
  115. tooluniverse/remote/immune_compass/compass_tool.py +327 -0
  116. tooluniverse/remote/pinnacle/pinnacle_tool.py +328 -0
  117. tooluniverse/remote/transcriptformer/transcriptformer_tool.py +586 -0
  118. tooluniverse/remote/uspto_downloader/uspto_downloader_mcp_server.py +61 -0
  119. tooluniverse/remote/uspto_downloader/uspto_downloader_tool.py +120 -0
  120. tooluniverse/remote_tool.py +99 -0
  121. tooluniverse/restful_tool.py +53 -30
  122. tooluniverse/scripts/generate_tool_graph.py +408 -0
  123. tooluniverse/scripts/visualize_tool_graph.py +829 -0
  124. tooluniverse/semantic_scholar_tool.py +62 -0
  125. tooluniverse/smcp.py +2452 -0
  126. tooluniverse/smcp_server.py +975 -0
  127. tooluniverse/test/mcp_server_test.py +0 -0
  128. tooluniverse/test/test_admetai_tool.py +370 -0
  129. tooluniverse/test/test_agentic_tool.py +129 -0
  130. tooluniverse/test/test_alphafold_tool.py +71 -0
  131. tooluniverse/test/test_chem_tool.py +37 -0
  132. tooluniverse/test/test_compose_lieraturereview.py +63 -0
  133. tooluniverse/test/test_compose_tool.py +448 -0
  134. tooluniverse/test/test_dailymed.py +69 -0
  135. tooluniverse/test/test_dataset_tool.py +200 -0
  136. tooluniverse/test/test_disease_target_score.py +56 -0
  137. tooluniverse/test/test_drugbank_filter_examples.py +179 -0
  138. tooluniverse/test/test_efo.py +31 -0
  139. tooluniverse/test/test_enrichr_tool.py +21 -0
  140. tooluniverse/test/test_europe_pmc_tool.py +20 -0
  141. tooluniverse/test/test_fda_adv.py +95 -0
  142. tooluniverse/test/test_fda_drug_labeling.py +91 -0
  143. tooluniverse/test/test_gene_ontology_tools.py +66 -0
  144. tooluniverse/test/test_gwas_tool.py +139 -0
  145. tooluniverse/test/test_hpa.py +625 -0
  146. tooluniverse/test/test_humanbase_tool.py +20 -0
  147. tooluniverse/test/test_idmap_tools.py +61 -0
  148. tooluniverse/test/test_mcp_server.py +211 -0
  149. tooluniverse/test/test_mcp_tool.py +247 -0
  150. tooluniverse/test/test_medlineplus.py +220 -0
  151. tooluniverse/test/test_openalex_tool.py +32 -0
  152. tooluniverse/test/test_opentargets.py +28 -0
  153. tooluniverse/test/test_pubchem_tool.py +116 -0
  154. tooluniverse/test/test_pubtator_tool.py +37 -0
  155. tooluniverse/test/test_rcsb_pdb_tool.py +86 -0
  156. tooluniverse/test/test_reactome.py +54 -0
  157. tooluniverse/test/test_semantic_scholar_tool.py +24 -0
  158. tooluniverse/test/test_software_tools.py +147 -0
  159. tooluniverse/test/test_tool_description_optimizer.py +49 -0
  160. tooluniverse/test/test_tool_finder.py +26 -0
  161. tooluniverse/test/test_tool_finder_llm.py +252 -0
  162. tooluniverse/test/test_tools_find.py +195 -0
  163. tooluniverse/test/test_uniprot_tools.py +74 -0
  164. tooluniverse/test/test_uspto_tool.py +72 -0
  165. tooluniverse/test/test_xml_tool.py +113 -0
  166. tooluniverse/tool_finder_embedding.py +267 -0
  167. tooluniverse/tool_finder_keyword.py +693 -0
  168. tooluniverse/tool_finder_llm.py +699 -0
  169. tooluniverse/tool_graph_web_ui.py +955 -0
  170. tooluniverse/tool_registry.py +416 -0
  171. tooluniverse/uniprot_tool.py +155 -0
  172. tooluniverse/url_tool.py +253 -0
  173. tooluniverse/uspto_tool.py +240 -0
  174. tooluniverse/utils.py +369 -41
  175. tooluniverse/xml_tool.py +369 -0
  176. tooluniverse-1.0.1.dist-info/METADATA +387 -0
  177. tooluniverse-1.0.1.dist-info/RECORD +182 -0
  178. tooluniverse-1.0.1.dist-info/entry_points.txt +9 -0
  179. tooluniverse/generate_mcp_tools.py +0 -113
  180. tooluniverse/mcp_server.py +0 -3340
  181. tooluniverse-0.2.0.dist-info/METADATA +0 -139
  182. tooluniverse-0.2.0.dist-info/RECORD +0 -21
  183. tooluniverse-0.2.0.dist-info/entry_points.txt +0 -4
  184. {tooluniverse-0.2.0.dist-info → tooluniverse-1.0.1.dist-info}/WHEEL +0 -0
  185. {tooluniverse-0.2.0.dist-info → tooluniverse-1.0.1.dist-info}/licenses/LICENSE +0 -0
  186. {tooluniverse-0.2.0.dist-info → tooluniverse-1.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,81 @@
1
+ """
2
+ CustomTool implementation for ToolUniverse
3
+ Handles execution of dynamically generated tools with external code files
4
+ """
5
+
6
+ import importlib.util
7
+ import os
8
+ from typing import Dict, Any
9
+ from .base_tool import BaseTool
10
+ from .tool_registry import register_tool
11
+
12
+
13
+ @register_tool("CustomTool")
14
+ class CustomTool(BaseTool):
15
+ """
16
+ CustomTool class for executing dynamically generated tools
17
+ """
18
+
19
+ def __init__(self, tool_config: Dict):
20
+ super().__init__(tool_config)
21
+ self.code_file = tool_config.get("code_file")
22
+ self.name = tool_config.get("name", "CustomTool")
23
+ self.description = tool_config.get("description", "")
24
+
25
+ # Load the external code if code_file is specified
26
+ self.execute_function = None
27
+ if self.code_file and os.path.exists(self.code_file):
28
+ self._load_external_code()
29
+
30
+ def _load_external_code(self):
31
+ """Load the execute_tool function from external Python file"""
32
+ try:
33
+ # Load module from file
34
+ spec = importlib.util.spec_from_file_location(
35
+ "custom_tool_module", self.code_file
36
+ )
37
+ module = importlib.util.module_from_spec(spec)
38
+ spec.loader.exec_module(module)
39
+
40
+ # Get the execute_tool function
41
+ if hasattr(module, "execute_tool"):
42
+ self.execute_function = module.execute_tool
43
+ else:
44
+ print(f"Warning: No execute_tool function found in {self.code_file}")
45
+
46
+ except Exception as e:
47
+ print(f"Error loading external code from {self.code_file}: {e}")
48
+
49
+ def run(self, arguments: Any = None) -> Dict[str, Any]:
50
+ """
51
+ Execute the custom tool
52
+
53
+ Args:
54
+ arguments: Input arguments for the tool
55
+
56
+ Returns:
57
+ Dict containing the result of tool execution
58
+ """
59
+ try:
60
+ if self.execute_function:
61
+ # Use the loaded external function
62
+ result = self.execute_function(
63
+ arguments if arguments is not None else {}
64
+ )
65
+ return {"success": True, "result": result, "tool_name": self.name}
66
+ else:
67
+ # Fallback to basic processing
68
+ return {
69
+ "success": False,
70
+ "error": "No execute_tool function available",
71
+ "input_received": arguments,
72
+ "tool_name": self.name,
73
+ }
74
+
75
+ except Exception as e:
76
+ return {
77
+ "success": False,
78
+ "error": str(e),
79
+ "input_received": arguments,
80
+ "tool_name": self.name,
81
+ }
@@ -0,0 +1,108 @@
1
+ # dailymed_tool.py
2
+
3
+ import requests
4
+ from .base_tool import BaseTool
5
+ from .tool_registry import register_tool
6
+
7
+ DAILYMED_BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
8
+
9
+
10
+ @register_tool("SearchSPLTool")
11
+ class SearchSPLTool(BaseTool):
12
+ """
13
+ Search SPL list based on multiple filter conditions (drug_name/ndc/rxcui/setid/published_date).
14
+ Returns original DailyMed API JSON (including metadata + data array).
15
+ """
16
+
17
+ def __init__(self, tool_config):
18
+ super().__init__(tool_config)
19
+ self.endpoint = f"{DAILYMED_BASE}/spls.json"
20
+
21
+ def run(self, arguments):
22
+ # Extract possible filter conditions from arguments
23
+ params = {}
24
+ # Four common filter fields
25
+ if arguments.get("drug_name"):
26
+ params["drug_name"] = arguments["drug_name"]
27
+ if arguments.get("ndc"):
28
+ params["ndc"] = arguments["ndc"]
29
+ if arguments.get("rxcui"):
30
+ params["rxcui"] = arguments["rxcui"]
31
+ if arguments.get("setid"):
32
+ params["setid"] = arguments["setid"]
33
+
34
+ # Published date range filter
35
+ if arguments.get("published_date_gte"):
36
+ params["published_date[gte]"] = arguments["published_date_gte"]
37
+ if arguments.get("published_date_eq"):
38
+ params["published_date[eq]"] = arguments["published_date_eq"]
39
+
40
+ # Pagination parameters
41
+ params["pagesize"] = arguments.get("pagesize", 100)
42
+ params["page"] = arguments.get("page", 1)
43
+
44
+ # Allow query all if no filter conditions and only pagination provided (be careful with return data volume)
45
+ try:
46
+ resp = requests.get(self.endpoint, params=params, timeout=10)
47
+ except Exception as e:
48
+ return {"error": f"Failed to request DailyMed search_spls: {str(e)}"}
49
+
50
+ if resp.status_code != 200:
51
+ return {
52
+ "error": f"DailyMed API access failed, HTTP {resp.status_code}",
53
+ "detail": resp.text,
54
+ }
55
+
56
+ try:
57
+ result = resp.json()
58
+ except ValueError:
59
+ return {
60
+ "error": "Unable to parse DailyMed returned JSON.",
61
+ "content": resp.text,
62
+ }
63
+
64
+ # Return original JSON, including metadata + data
65
+ return result
66
+
67
+
68
+ @register_tool("GetSPLBySetIDTool")
69
+ class GetSPLBySetIDTool(BaseTool):
70
+ """
71
+ Get complete SPL label based on SPL Set ID, returns content in XML or JSON format.
72
+ """
73
+
74
+ def __init__(self, tool_config):
75
+ super().__init__(tool_config)
76
+ # Different suffixes for XML and JSON
77
+ self.endpoint_template = f"{DAILYMED_BASE}/spls/{{setid}}.{{fmt}}"
78
+
79
+ def run(self, arguments):
80
+ setid = arguments.get("setid")
81
+ fmt = arguments.get("format", "xml")
82
+
83
+ # DailyMed single SPL API only supports XML format
84
+ if fmt not in ("xml",):
85
+ return {
86
+ "error": "DailyMed single SPL API only supports 'xml' format, JSON is not supported."
87
+ }
88
+
89
+ url = self.endpoint_template.format(setid=setid, fmt=fmt)
90
+ try:
91
+ resp = requests.get(url, timeout=10)
92
+ except Exception as e:
93
+ return {"error": f"Failed to request DailyMed get_spl_by_setid: {str(e)}"}
94
+
95
+ if resp.status_code == 404:
96
+ return {"error": f"SPL label not found for Set ID={setid}."}
97
+ elif resp.status_code == 415:
98
+ return {
99
+ "error": f"DailyMed API does not support requested format. Set ID={setid} only supports XML format."
100
+ }
101
+ elif resp.status_code != 200:
102
+ return {
103
+ "error": f"DailyMed API access failed, HTTP {resp.status_code}",
104
+ "detail": resp.text,
105
+ }
106
+
107
+ # Return XML content
108
+ return {"xml": resp.text}
@@ -0,0 +1,155 @@
1
+ [
2
+ {
3
+ "name": "ADMETAI_predict_physicochemical_properties",
4
+ "description": "Predicts physicochemical properties (molecular weight, logP, hydrogen bond acceptors/donors, Lipinski, QED, stereo centers, TPSA) for a given list of molecules in SMILES format.",
5
+ "parameter": {
6
+ "type": "object",
7
+ "properties": {
8
+ "smiles": {
9
+ "type": "array",
10
+ "items": {"type": "string"},
11
+ "description": "The list of SMILES strings."
12
+ }
13
+ },
14
+ "required": ["smiles"]
15
+ },
16
+ "type": "ADMETAITool",
17
+ "columns": ["molecular_weight", "logP", "hydrogen_bond_acceptors", "hydrogen_bond_donors", "Lipinski", "QED", "stereo_centers", "tpsa"]
18
+ },
19
+ {
20
+ "name": "ADMETAI_predict_CYP_interactions",
21
+ "description": "Predicts CYP enzyme interactions for a given list of molecules in SMILES format.",
22
+ "parameter": {
23
+ "type": "object",
24
+ "properties": {
25
+ "smiles": {
26
+ "type": "array",
27
+ "items": {"type": "string"},
28
+ "description": "The list of SMILES strings."
29
+ }
30
+ },
31
+ "required": ["smiles"]
32
+ },
33
+ "type": "ADMETAITool",
34
+ "columns": ["CYP1A2_Veith", "CYP2C19_Veith", "CYP2C9_Substrate_CarbonMangels", "CYP2C9_Veith", "CYP2D6_Substrate_CarbonMangels", "CYP2D6_Veith", "CYP3A4_Substrate_CarbonMangels", "CYP3A4_Veith"]
35
+ },
36
+ {
37
+ "name": "ADMETAI_predict_BBB_penetrance",
38
+ "description": "Predicts blood-brain barrier (BBB) penetrance for a given list of molecules in SMILES format.",
39
+ "parameter": {
40
+ "type": "object",
41
+ "properties": {
42
+ "smiles": {
43
+ "type": "array",
44
+ "items": {"type": "string"},
45
+ "description": "The list of SMILES strings."
46
+ }
47
+ },
48
+ "required": ["smiles"]
49
+ },
50
+ "type": "ADMETAITool",
51
+ "columns": ["BBB_Martins"]
52
+ },
53
+ {
54
+ "name": "ADMETAI_predict_toxicity",
55
+ "description": "Predicts toxicity endpoints (AMES, Carcinogens_Lagunin, ClinTox, DILI, LD50_Zhu, Skin_Reaction, hERG) for a given list of molecules in SMILES format.",
56
+ "parameter": {
57
+ "type": "object",
58
+ "properties": {
59
+ "smiles": {
60
+ "type": "array",
61
+ "items": {"type": "string"},
62
+ "description": "The list of SMILES strings."
63
+ }
64
+ },
65
+ "required": ["smiles"]
66
+ },
67
+ "type": "ADMETAITool",
68
+ "columns": ["AMES", "Carcinogens_Lagunin", "ClinTox", "DILI", "LD50_Zhu", "Skin_Reaction", "hERG"]
69
+ },
70
+ {
71
+ "name": "ADMETAI_predict_bioavailability",
72
+ "description": "Predicts bioavailability endpoints (Bioavailability_Ma, HIA_Hou, PAMPA_NCATS, Caco2_Wang, Pgp_Broccatelli) for a given list of molecules in SMILES format.",
73
+ "parameter": {
74
+ "type": "object",
75
+ "properties": {
76
+ "smiles": {
77
+ "type": "array",
78
+ "items": {"type": "string"},
79
+ "description": "The list of SMILES strings."
80
+ }
81
+ },
82
+ "required": ["smiles"]
83
+ },
84
+ "type": "ADMETAITool",
85
+ "columns": ["Bioavailability_Ma", "HIA_Hou", "PAMPA_NCATS", "Caco2_Wang", "Pgp_Broccatelli"]
86
+ },
87
+ {
88
+ "name": "ADMETAI_predict_clearance_distribution",
89
+ "description": "Predicts clearance and distribution endpoints (Clearance_Hepatocyte_AZ, Clearance_Microsome_AZ, Half_Life_Obach, VDss_Lombardo, PPBR_AZ) for a given list of molecules in SMILES format.",
90
+ "parameter": {
91
+ "type": "object",
92
+ "properties": {
93
+ "smiles": {
94
+ "type": "array",
95
+ "items": {"type": "string"},
96
+ "description": "The list of SMILES strings."
97
+ }
98
+ },
99
+ "required": ["smiles"]
100
+ },
101
+ "type": "ADMETAITool",
102
+ "columns": ["Clearance_Hepatocyte_AZ", "Clearance_Microsome_AZ", "Half_Life_Obach", "VDss_Lombardo", "PPBR_AZ"]
103
+ },
104
+ {
105
+ "name": "ADMETAI_predict_nuclear_receptor_activity",
106
+ "description": "Predicts nuclear receptor activity endpoints (NR-AR-LBD, NR-AR, NR-AhR, NR-Aromatase, NR-ER-LBD, NR-ER, NR-PPAR-gamma) for a given list of molecules in SMILES format.",
107
+ "parameter": {
108
+ "type": "object",
109
+ "properties": {
110
+ "smiles": {
111
+ "type": "array",
112
+ "items": {"type": "string"},
113
+ "description": "The list of SMILES strings."
114
+ }
115
+ },
116
+ "required": ["smiles"]
117
+ },
118
+ "type": "ADMETAITool",
119
+ "columns": ["NR-AR-LBD", "NR-AR", "NR-AhR", "NR-Aromatase", "NR-ER-LBD", "NR-ER", "NR-PPAR-gamma"]
120
+ },
121
+ {
122
+ "name": "ADMETAI_predict_stress_response",
123
+ "description": "Predicts stress response endpoints (SR-ARE, SR-ATAD5, SR-HSE, SR-MMP, SR-p53) for a given list of molecules in SMILES format.",
124
+ "parameter": {
125
+ "type": "object",
126
+ "properties": {
127
+ "smiles": {
128
+ "type": "array",
129
+ "items": {"type": "string"},
130
+ "description": "The list of SMILES strings."
131
+ }
132
+ },
133
+ "required": ["smiles"]
134
+ },
135
+ "type": "ADMETAITool",
136
+ "columns": ["SR-ARE", "SR-ATAD5", "SR-HSE", "SR-MMP", "SR-p53"]
137
+ },
138
+ {
139
+ "name": "ADMETAI_predict_solubility_lipophilicity_hydration",
140
+ "description": "Predicts solubility, lipophilicity, and hydration endpoints (Solubility_AqSolDB, Lipophilicity_AstraZeneca, HydrationFreeEnergy_FreeSolv) for a given list of molecules in SMILES format.",
141
+ "parameter": {
142
+ "type": "object",
143
+ "properties": {
144
+ "smiles": {
145
+ "type": "array",
146
+ "items": {"type": "string"},
147
+ "description": "The list of SMILES strings."
148
+ }
149
+ },
150
+ "required": ["smiles"]
151
+ },
152
+ "type": "ADMETAITool",
153
+ "columns": ["Solubility_AqSolDB", "Lipophilicity_AstraZeneca", "HydrationFreeEnergy_FreeSolv"]
154
+ }
155
+ ]
@@ -0,0 +1,108 @@
1
+ [
2
+ {
3
+ "type": "AgenticTool",
4
+ "name": "AdverseEventPredictionQuestionGenerator",
5
+ "description": "Generates a set of personalized adverse‐event prediction questions for a given disease and drug, across multiple patient subgroups.",
6
+ "prompt": "You are a clinical pharmacology and epidemiology expert. Given the following inputs:\n\n- Disease: {disease_name} \n- Drug: {drug_name} \n\nYour task is to generate a hierarchy of personalized adverse-event prediction questions at two levels:\n\n1. **General Safety Check** \n - Identify one broad safety question that asks for as many potential adverse effects as possible beyond the known label, and include only the disease term in the population description.\n\n2. **Population-Specific Extensions** \n - For at least five distinct patient subgroups, build on the general question by adding one or more clinical details unique to that subgroup (e.g., age, sex, comorbidities, organ function, genetic variants, concomitant meds). \n - Each subgroup’s question must: \n - Ask for as many potential adverse effects as possible \n - Include the description of that specific population in the question \n - Specify any relevant time frame and lab or clinical thresholds \n\n**Output structure**: return only a JSON object with two keys:\n\n- `\"general\"`: \n - `\"population\"`: a list containing only the disease term (e.g. `[\"{disease_name}\"]`) \n - `\"question\"`: the broad safety question that asks for as many adverse effects as possible and incorporates the disease description only \n\n- `\"specific\"`: an array of objects, each with: \n - `\"population\"`: a list of terms describing the subgroup (e.g. `[\"72-year-old\", \"female\", \"atrial fibrillation\", \"chronic warfarin\"]`) \n - `\"question\"`: the extended adverse-event prediction question that: \n - asks for as many adverse effects as possible \n - includes the description of that subgroup \n - specifies the time frame and any lab/clinical thresholds \n\n**Example**:\n\n```json\n{\n \"general\": {\n \"population\": [\"mild Alzheimer’s disease\"],\n \"question\": \"In a patient with mild Alzheimer’s disease planning to start Kisunla therapy, what additional safety concerns or adverse effects—beyond those listed in the FDA label—should be monitored?\"\n },\n \"specific\": [\n {\n \"population\": [\"72-year-old\", \"female\", \"atrial fibrillation\", \"chronic warfarin\"],\n \"question\": \"In a 72-year-old female with atrial fibrillation on chronic warfarin therapy, what potential bleeding events or other adverse effects—beyond the FDA label—should be anticipated within 30 days of initiating Kisunla?\"\n },\n {\n \"population\": [\"79-year-old\", \"female\", \">5 cerebral microhemorrhages\", \"baseline MRI\"],\n \"question\": \"In a 79-year-old female with more than five cerebral microhemorrhages on baseline MRI and no prior intracerebral hemorrhage, what non-label adverse intracranial bleeding events or other safety concerns should be discussed before starting Kisunla?\"\n },\n {\n \"population\": [\"70-year-old\", \"male\", \"well-controlled focal epilepsy\", \"seizure-free 5 years\"],\n \"question\": \"In a 70-year-old male with well-controlled focal epilepsy (seizure-free for 5 years), what seizure-related adverse events or other off-label safety issues should be part of counseling within 60 days of Kisunla therapy?\"\n }\n // …at least two more…\n ]\n}\n```",
7
+ "input_arguments": [
8
+ "disease_name",
9
+ "drug_name"
10
+ ],
11
+ "parameter": {
12
+ "type": "object",
13
+ "properties": {
14
+ "disease_name": {
15
+ "type": "string",
16
+ "description": "The name of the disease or condition"
17
+ },
18
+ "drug_name": {
19
+ "type": "string",
20
+ "description": "The name of the drug"
21
+ }
22
+ },
23
+ "required": [
24
+ "disease_name",
25
+ "drug_name"
26
+ ]
27
+ },
28
+ "configs": {
29
+ "api_type": "CHATGPT",
30
+ "model_id": "o3-mini-0131",
31
+ "temperature": 1.0,
32
+ "max_new_tokens": 20480,
33
+ "return_json": true,
34
+ "return_metadata": false
35
+ }
36
+ },
37
+ {
38
+ "type": "AgenticTool",
39
+ "name": "AdverseEventICDMapper",
40
+ "description": "Extracts adverse events from narrative clinical or pharmacovigilance text and maps each event to the most specific ICD-10-CM code.",
41
+ "prompt": "You are a clinically-oriented NLP assistant trained in pharmacovigilance and ICD-10-CM medical coding.\\n\\n**Your task:**\\n1. Read the *Input Text* below.\\n2. Identify every distinct **adverse event** explicitly stated or unambiguously implied.\\n3. For each adverse event, select the **single most specific ICD-10-CM code** that would ordinarily be assigned by a professional coder in the United States.\\n • If several codes are plausible, choose the one that best matches the wording and context (e.g., \"upper-GI haemorrhage\" ⇒ K92.0 rather than the generic K92.2).\\n • If no precise code exists, return the closest valid proxy and append the flag \"≈ (closest match)\".\\n4. Output the results **exactly** in the following JSON array format (no additional keys or commentary):\\n```json\\n[\\n {\\n \"adverse_event\": \"<event term>\",\\n \"icd10cm_code\": \"<code>\",\\n \"code_description\": \"<official ICD-10-CM description>\"\\n }\\n]\\n```\\n5. Preserve the order in which events first appear in the text.\\n6. Do **not** invent adverse events that are absent from the text.\\n7. If the input text contains no adverse events, reply with the empty list `[]`.\\n\\n*Input Text:*\\n{source_text}",
42
+ "input_arguments": [
43
+ "source_text"
44
+ ],
45
+ "parameter": {
46
+ "type": "object",
47
+ "properties": {
48
+ "source_text": {
49
+ "type": "string",
50
+ "description": "Unstructured narrative text that may mention adverse events.",
51
+ "required": true
52
+ }
53
+ },
54
+ "required": [
55
+ "source_text"
56
+ ]
57
+ },
58
+ "configs": {
59
+ "api_type": "CHATGPT",
60
+ "model_id": "o4-mini-0416",
61
+ "temperature": 1.0,
62
+ "max_new_tokens": 20480,
63
+ "return_json": false,
64
+ "return_metadata": false
65
+ }
66
+ },
67
+ {
68
+ "type": "AgenticTool",
69
+ "name": "AdverseEventPredictionQuestionGeneratorWithContext",
70
+ "description": "Generates a set of personalized adverse‐event prediction questions for a given disease and drug, incorporating additional context information such as patient medical history, clinical findings, or research data.",
71
+ "prompt": "You are a clinical pharmacology and epidemiology expert. Given the following inputs:\n\n- Disease: {disease_name} \n- Drug: {drug_name}\n- Context Information: {context_information}\n\nYour task is to generate a hierarchy of personalized adverse-event prediction questions at two levels, taking into account the provided context information:\n\n**IMPORTANT RESTRICTIONS:**\n- DO NOT mention ancestry, race, or ethnicity in any questions or population descriptions\n- DO NOT include specific adverse events or side effects in the questions themselves - the questions should ask WHAT adverse effects might occur, not suggest specific ones\n- Questions should be open-ended inquiries about potential adverse effects, not statements about known risks\n\n**Context Integration Guidelines:**\n- Use the context information to inform your understanding of the disease severity, patient characteristics, drug mechanisms, known interactions, or clinical findings\n- Incorporate relevant details from the context to make questions more specific and clinically relevant\n- Consider any special populations, contraindications, or risk factors mentioned in the context\n- Exclude any ancestry-related information from consideration\n\n1. **General Safety Check** \n - Identify one broad safety question that asks for as many potential adverse effects as possible beyond the known label, incorporating relevant context insights and including only the disease term in the population description.\n\n2. **Population-Specific Extensions** \n - For at least five distinct patient subgroups, build on the general question by adding one or more clinical details unique to that subgroup (e.g., age, sex, comorbidities, organ function, genetic variants, concomitant meds). \n - Use context information to identify the most relevant and high-risk subgroups\n - Each subgroup's question must: \n - Ask for as many potential adverse effects as possible \n - Include the description of that specific population in the question \n - Specify any relevant time frame and lab or clinical thresholds\n - Incorporate context-specific risk factors or considerations\n - NOT mention ancestry, race, or ethnicity\n\n**Output structure**: return only a JSON object with three keys:\n\n- `\"context_summary\"`: a brief summary of how the context information influenced the question generation\n\n- `\"general\"`: \n - `\"population\"`: a list containing only the disease term (e.g. `[\"{disease_name}\"]`) \n - `\"question\"`: the broad safety question that asks for as many adverse effects as possible, incorporates the disease description, and reflects context insights \n\n- `\"specific\"`: an array of objects, each with: \n - `\"population\"`: a list of terms describing the subgroup (e.g. `[\"72-year-old\", \"female\", \"atrial fibrillation\", \"chronic warfarin\"]`) \n - `\"question\"`: the extended adverse-event prediction question that: \n - asks for as many adverse effects as possible \n - includes the description of that subgroup \n - specifies the time frame and any lab/clinical thresholds\n - incorporates relevant context considerations\n\n**Example**:\n\n```json\n{\n \"context_summary\": \"Context revealed increased risk factors in elderly patients and potential drug interactions with anticoagulants, leading to enhanced focus on cardiovascular and bleeding-related inquiries.\",\n \"general\": {\n \"population\": [\"mild Alzheimer's disease\"],\n \"question\": \"In a patient with mild Alzheimer's disease planning to start Kisunla therapy, what additional safety concerns or adverse effects—beyond those listed in the FDA label—should be monitored?\"\n },\n \"specific\": [\n {\n \"population\": [\"72-year-old\", \"female\", \"atrial fibrillation\", \"chronic warfarin\"],\n \"question\": \"In a 72-year-old female with atrial fibrillation on chronic warfarin therapy, what potential adverse effects—beyond the FDA label—should be anticipated within 30 days of initiating Kisunla?\"\n },\n {\n \"population\": [\"79-year-old\", \"female\", \">5 cerebral microhemorrhages\", \"baseline MRI\"],\n \"question\": \"In a 79-year-old female with more than five cerebral microhemorrhages on baseline MRI and no prior intracerebral hemorrhage, what adverse events or safety concerns should be discussed before starting Kisunla?\"\n }\n // …at least three more…\n ]\n}\n```",
72
+ "input_arguments": [
73
+ "disease_name",
74
+ "drug_name",
75
+ "context_information"
76
+ ],
77
+ "parameter": {
78
+ "type": "object",
79
+ "properties": {
80
+ "disease_name": {
81
+ "type": "string",
82
+ "description": "The name of the disease or condition"
83
+ },
84
+ "drug_name": {
85
+ "type": "string",
86
+ "description": "The name of the drug"
87
+ },
88
+ "context_information": {
89
+ "type": "string",
90
+ "description": "Additional context information such as patient medical history, clinical findings, research data, or other relevant background information that should inform the adverse event prediction questions"
91
+ }
92
+ },
93
+ "required": [
94
+ "disease_name",
95
+ "drug_name",
96
+ "context_information"
97
+ ]
98
+ },
99
+ "configs": {
100
+ "api_type": "CHATGPT",
101
+ "model_id": "o3-mini-0131",
102
+ "temperature": 1.0,
103
+ "max_new_tokens": 20480,
104
+ "return_json": true,
105
+ "return_metadata": false
106
+ }
107
+ }
108
+ ]