tooluniverse 1.0.9.1__py3-none-any.whl → 1.0.11__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 (191) hide show
  1. tooluniverse/__init__.py +57 -1
  2. tooluniverse/admetai_tool.py +1 -1
  3. tooluniverse/agentic_tool.py +65 -17
  4. tooluniverse/base_tool.py +19 -8
  5. tooluniverse/blast_tool.py +132 -0
  6. tooluniverse/boltz_tool.py +3 -3
  7. tooluniverse/cache/result_cache_manager.py +167 -12
  8. tooluniverse/cbioportal_tool.py +42 -0
  9. tooluniverse/clinvar_tool.py +268 -74
  10. tooluniverse/compose_scripts/drug_safety_analyzer.py +1 -1
  11. tooluniverse/compose_scripts/multi_agent_literature_search.py +1 -1
  12. tooluniverse/compose_scripts/output_summarizer.py +4 -4
  13. tooluniverse/compose_scripts/tool_discover.py +1941 -443
  14. tooluniverse/compose_scripts/tool_graph_composer.py +1 -1
  15. tooluniverse/compose_scripts/tool_metadata_generator.py +1 -1
  16. tooluniverse/compose_tool.py +9 -9
  17. tooluniverse/core_tool.py +2 -2
  18. tooluniverse/ctg_tool.py +4 -4
  19. tooluniverse/custom_tool.py +1 -1
  20. tooluniverse/data/agentic_tools.json +0 -370
  21. tooluniverse/data/alphafold_tools.json +6 -6
  22. tooluniverse/data/blast_tools.json +112 -0
  23. tooluniverse/data/cbioportal_tools.json +87 -0
  24. tooluniverse/data/clinvar_tools.json +235 -0
  25. tooluniverse/data/compose_tools.json +0 -89
  26. tooluniverse/data/dbsnp_tools.json +275 -0
  27. tooluniverse/data/emdb_tools.json +61 -0
  28. tooluniverse/data/ensembl_tools.json +259 -0
  29. tooluniverse/data/file_download_tools.json +275 -0
  30. tooluniverse/data/geo_tools.json +200 -48
  31. tooluniverse/data/gnomad_tools.json +109 -0
  32. tooluniverse/data/gtopdb_tools.json +68 -0
  33. tooluniverse/data/gwas_tools.json +32 -0
  34. tooluniverse/data/interpro_tools.json +199 -0
  35. tooluniverse/data/jaspar_tools.json +70 -0
  36. tooluniverse/data/kegg_tools.json +356 -0
  37. tooluniverse/data/mpd_tools.json +87 -0
  38. tooluniverse/data/ols_tools.json +314 -0
  39. tooluniverse/data/package_discovery_tools.json +64 -0
  40. tooluniverse/data/packages/categorized_tools.txt +0 -1
  41. tooluniverse/data/packages/machine_learning_tools.json +0 -47
  42. tooluniverse/data/paleobiology_tools.json +91 -0
  43. tooluniverse/data/pride_tools.json +62 -0
  44. tooluniverse/data/pypi_package_inspector_tools.json +158 -0
  45. tooluniverse/data/python_executor_tools.json +341 -0
  46. tooluniverse/data/regulomedb_tools.json +50 -0
  47. tooluniverse/data/remap_tools.json +89 -0
  48. tooluniverse/data/screen_tools.json +89 -0
  49. tooluniverse/data/tool_discovery_agents.json +428 -0
  50. tooluniverse/data/tool_discovery_agents.json.backup +1343 -0
  51. tooluniverse/data/uniprot_tools.json +77 -0
  52. tooluniverse/data/web_search_tools.json +250 -0
  53. tooluniverse/data/worms_tools.json +55 -0
  54. tooluniverse/dataset_tool.py +2 -2
  55. tooluniverse/dbsnp_tool.py +196 -58
  56. tooluniverse/default_config.py +36 -3
  57. tooluniverse/emdb_tool.py +30 -0
  58. tooluniverse/enrichr_tool.py +14 -14
  59. tooluniverse/ensembl_tool.py +140 -47
  60. tooluniverse/execute_function.py +594 -29
  61. tooluniverse/extended_hooks.py +4 -4
  62. tooluniverse/file_download_tool.py +269 -0
  63. tooluniverse/gene_ontology_tool.py +1 -1
  64. tooluniverse/generate_tools.py +3 -3
  65. tooluniverse/geo_tool.py +81 -28
  66. tooluniverse/gnomad_tool.py +100 -52
  67. tooluniverse/gtopdb_tool.py +41 -0
  68. tooluniverse/humanbase_tool.py +10 -10
  69. tooluniverse/interpro_tool.py +72 -0
  70. tooluniverse/jaspar_tool.py +30 -0
  71. tooluniverse/kegg_tool.py +230 -0
  72. tooluniverse/logging_config.py +2 -2
  73. tooluniverse/mcp_client_tool.py +57 -129
  74. tooluniverse/mcp_integration.py +52 -49
  75. tooluniverse/mcp_tool_registry.py +147 -528
  76. tooluniverse/mpd_tool.py +42 -0
  77. tooluniverse/ncbi_eutils_tool.py +96 -0
  78. tooluniverse/ols_tool.py +435 -0
  79. tooluniverse/openalex_tool.py +8 -8
  80. tooluniverse/openfda_tool.py +2 -2
  81. tooluniverse/output_hook.py +15 -15
  82. tooluniverse/package_discovery_tool.py +217 -0
  83. tooluniverse/package_tool.py +1 -1
  84. tooluniverse/paleobiology_tool.py +30 -0
  85. tooluniverse/pmc_tool.py +2 -2
  86. tooluniverse/pride_tool.py +30 -0
  87. tooluniverse/pypi_package_inspector_tool.py +593 -0
  88. tooluniverse/python_executor_tool.py +711 -0
  89. tooluniverse/regulomedb_tool.py +30 -0
  90. tooluniverse/remap_tool.py +44 -0
  91. tooluniverse/remote/boltz/boltz_mcp_server.py +1 -1
  92. tooluniverse/remote/depmap_24q2/depmap_24q2_mcp_tool.py +3 -3
  93. tooluniverse/remote/immune_compass/compass_tool.py +3 -3
  94. tooluniverse/remote/pinnacle/pinnacle_tool.py +2 -2
  95. tooluniverse/remote/transcriptformer/transcriptformer_tool.py +3 -3
  96. tooluniverse/remote/uspto_downloader/uspto_downloader_mcp_server.py +3 -3
  97. tooluniverse/remote_tool.py +4 -4
  98. tooluniverse/screen_tool.py +44 -0
  99. tooluniverse/scripts/filter_tool_files.py +2 -2
  100. tooluniverse/smcp.py +93 -12
  101. tooluniverse/smcp_server.py +100 -21
  102. tooluniverse/space/__init__.py +46 -0
  103. tooluniverse/space/loader.py +133 -0
  104. tooluniverse/space/validator.py +353 -0
  105. tooluniverse/tool_finder_embedding.py +5 -3
  106. tooluniverse/tool_finder_keyword.py +12 -10
  107. tooluniverse/tool_finder_llm.py +12 -8
  108. tooluniverse/tools/{UCSC_get_genes_by_region.py → BLAST_nucleotide_search.py} +22 -26
  109. tooluniverse/tools/BLAST_protein_search.py +63 -0
  110. tooluniverse/tools/ClinVar_search_variants.py +26 -15
  111. tooluniverse/tools/CodeQualityAnalyzer.py +3 -3
  112. tooluniverse/tools/EMDB_get_structure.py +46 -0
  113. tooluniverse/tools/GtoPdb_get_targets.py +52 -0
  114. tooluniverse/tools/InterPro_get_domain_details.py +46 -0
  115. tooluniverse/tools/InterPro_get_protein_domains.py +49 -0
  116. tooluniverse/tools/InterPro_search_domains.py +52 -0
  117. tooluniverse/tools/JASPAR_get_transcription_factors.py +52 -0
  118. tooluniverse/tools/MPD_get_phenotype_data.py +59 -0
  119. tooluniverse/tools/PRIDE_search_proteomics.py +52 -0
  120. tooluniverse/tools/PackageAnalyzer.py +55 -0
  121. tooluniverse/tools/Paleobiology_get_fossils.py +52 -0
  122. tooluniverse/tools/PyPIPackageInspector.py +59 -0
  123. tooluniverse/tools/ReMap_get_transcription_factor_binding.py +59 -0
  124. tooluniverse/tools/ReferenceInfoAnalyzer.py +55 -0
  125. tooluniverse/tools/RegulomeDB_query_variant.py +46 -0
  126. tooluniverse/tools/SCREEN_get_regulatory_elements.py +59 -0
  127. tooluniverse/tools/{ArgumentDescriptionOptimizer.py → TestResultsAnalyzer.py} +13 -13
  128. tooluniverse/tools/ToolDiscover.py +11 -11
  129. tooluniverse/tools/UniProt_id_mapping.py +63 -0
  130. tooluniverse/tools/UniProt_search.py +63 -0
  131. tooluniverse/tools/UnifiedToolGenerator.py +59 -0
  132. tooluniverse/tools/WoRMS_search_species.py +49 -0
  133. tooluniverse/tools/XMLToolOptimizer.py +55 -0
  134. tooluniverse/tools/__init__.py +119 -29
  135. tooluniverse/tools/_shared_client.py +3 -3
  136. tooluniverse/tools/alphafold_get_annotations.py +3 -3
  137. tooluniverse/tools/alphafold_get_prediction.py +3 -3
  138. tooluniverse/tools/alphafold_get_summary.py +3 -3
  139. tooluniverse/tools/cBioPortal_get_cancer_studies.py +46 -0
  140. tooluniverse/tools/cBioPortal_get_mutations.py +52 -0
  141. tooluniverse/tools/{gnomAD_query_variant.py → clinvar_get_clinical_significance.py} +8 -11
  142. tooluniverse/tools/clinvar_get_variant_details.py +49 -0
  143. tooluniverse/tools/dbSNP_get_variant_by_rsid.py +7 -7
  144. tooluniverse/tools/dbsnp_get_frequencies.py +46 -0
  145. tooluniverse/tools/dbsnp_search_by_gene.py +52 -0
  146. tooluniverse/tools/download_binary_file.py +66 -0
  147. tooluniverse/tools/download_file.py +71 -0
  148. tooluniverse/tools/download_text_content.py +55 -0
  149. tooluniverse/tools/dynamic_package_discovery.py +59 -0
  150. tooluniverse/tools/ensembl_get_sequence.py +52 -0
  151. tooluniverse/tools/{Ensembl_lookup_gene_by_symbol.py → ensembl_get_variants.py} +11 -11
  152. tooluniverse/tools/ensembl_lookup_gene.py +46 -0
  153. tooluniverse/tools/geo_get_dataset_info.py +46 -0
  154. tooluniverse/tools/geo_get_sample_info.py +46 -0
  155. tooluniverse/tools/geo_search_datasets.py +67 -0
  156. tooluniverse/tools/gnomad_get_gene_constraints.py +49 -0
  157. tooluniverse/tools/kegg_find_genes.py +52 -0
  158. tooluniverse/tools/kegg_get_gene_info.py +46 -0
  159. tooluniverse/tools/kegg_get_pathway_info.py +46 -0
  160. tooluniverse/tools/kegg_list_organisms.py +44 -0
  161. tooluniverse/tools/kegg_search_pathway.py +46 -0
  162. tooluniverse/tools/ols_find_similar_terms.py +63 -0
  163. tooluniverse/tools/{get_hyperopt_info.py → ols_get_ontology_info.py} +13 -10
  164. tooluniverse/tools/ols_get_term_ancestors.py +67 -0
  165. tooluniverse/tools/ols_get_term_children.py +67 -0
  166. tooluniverse/tools/{TestCaseGenerator.py → ols_get_term_info.py} +12 -9
  167. tooluniverse/tools/{CodeOptimizer.py → ols_search_ontologies.py} +22 -14
  168. tooluniverse/tools/ols_search_terms.py +71 -0
  169. tooluniverse/tools/python_code_executor.py +79 -0
  170. tooluniverse/tools/python_script_runner.py +79 -0
  171. tooluniverse/tools/web_api_documentation_search.py +63 -0
  172. tooluniverse/tools/web_search.py +71 -0
  173. tooluniverse/uniprot_tool.py +219 -16
  174. tooluniverse/url_tool.py +19 -1
  175. tooluniverse/uspto_tool.py +1 -1
  176. tooluniverse/utils.py +12 -12
  177. tooluniverse/web_search_tool.py +229 -0
  178. tooluniverse/worms_tool.py +64 -0
  179. {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/METADATA +8 -3
  180. {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/RECORD +184 -92
  181. tooluniverse/data/genomics_tools.json +0 -174
  182. tooluniverse/tools/ToolDescriptionOptimizer.py +0 -67
  183. tooluniverse/tools/ToolImplementationGenerator.py +0 -67
  184. tooluniverse/tools/ToolOptimizer.py +0 -59
  185. tooluniverse/tools/ToolSpecificationGenerator.py +0 -67
  186. tooluniverse/tools/ToolSpecificationOptimizer.py +0 -63
  187. tooluniverse/ucsc_tool.py +0 -60
  188. {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/WHEEL +0 -0
  189. {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/entry_points.txt +0 -0
  190. {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/licenses/LICENSE +0 -0
  191. {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/top_level.txt +0 -0
@@ -1,174 +0,0 @@
1
- [
2
- {
3
- "type": "EnsemblTool",
4
- "name": "Ensembl_lookup_gene_by_symbol",
5
- "description": "Lookup Ensembl gene by species and gene symbol, returning core metadata and coordinates (uses /xrefs/symbol then /lookup/id?expand=1).",
6
- "parameter": {
7
- "type": "object",
8
- "properties": {
9
- "species": {"type": "string", "description": "Species name (e.g., 'homo_sapiens').", "default": "homo_sapiens"},
10
- "symbol": {"type": "string", "description": "Gene symbol (e.g., BRCA1)."}
11
- },
12
- "required": ["symbol"]
13
- },
14
- "return_schema": {
15
- "type": "object",
16
- "description": "Gene metadata including Ensembl ID, name, location, and transcripts count.",
17
- "properties": {
18
- "id": {"type": "string"},
19
- "symbol": {"type": "string"},
20
- "display_name": {"type": "string"},
21
- "species": {"type": "string"},
22
- "seq_region_name": {"type": "string"},
23
- "start": {"type": "integer"},
24
- "end": {"type": "integer"},
25
- "strand": {"type": "integer"},
26
- "biotype": {"type": "string"},
27
- "transcript_count": {"type": "integer"}
28
- }
29
- }
30
- },
31
- {
32
- "type": "ClinVarTool",
33
- "name": "ClinVar_search_variants",
34
- "description": "Search ClinVar via NCBI E-utilities (esearch→esummary) and return concise variant records for a query term.",
35
- "parameter": {
36
- "type": "object",
37
- "properties": {
38
- "query": {"type": "string", "description": "ClinVar search term (e.g., BRCA1)."},
39
- "retmax": {"type": "integer", "description": "Max records.", "default": 5}
40
- },
41
- "required": ["query"]
42
- },
43
- "return_schema": {
44
- "type": "array",
45
- "items": {
46
- "type": "object",
47
- "properties": {
48
- "uid": {"type": "string"},
49
- "accession": {"type": "string"},
50
- "title": {"type": "string"},
51
- "gene": {"type": "string"},
52
- "chr": {"type": "string"},
53
- "start": {"type": "integer"},
54
- "stop": {"type": "integer"},
55
- "spdi": {"type": "string"},
56
- "clinical_significance": {"type": "string"}
57
- }
58
- }
59
- }
60
- },
61
- {
62
- "type": "DbSnpTool",
63
- "name": "dbSNP_get_variant_by_rsid",
64
- "description": "Fetch dbSNP variant by rsID using NCBI Variation Services (refsnp endpoint).",
65
- "parameter": {
66
- "type": "object",
67
- "properties": {
68
- "rsid": {"type": "string", "description": "rsID without 'rs' prefix or with (e.g., rs699 or 699)."}
69
- },
70
- "required": ["rsid"]
71
- },
72
- "return_schema": {
73
- "type": "object",
74
- "properties": {
75
- "refsnp_id": {"type": "string"},
76
- "chrom": {"type": "string"},
77
- "pos": {"type": "integer"},
78
- "alleles": {"type": "array", "items": {"type": "string"}},
79
- "hgvs": {"type": "array", "items": {"type": "string"}}
80
- }
81
- }
82
- },
83
- {
84
- "type": "UCSCTool",
85
- "name": "UCSC_get_genes_by_region",
86
- "description": "Query UCSC Genome Browser track API for knownGene features in a genomic window.",
87
- "parameter": {
88
- "type": "object",
89
- "properties": {
90
- "genome": {"type": "string", "description": "Genome assembly (e.g., hg38).", "default": "hg38"},
91
- "chrom": {"type": "string", "description": "Chromosome (e.g., chr17)."},
92
- "start": {"type": "integer", "description": "Start position (0-based)."},
93
- "end": {"type": "integer", "description": "End position."},
94
- "track": {"type": "string", "description": "Track name.", "default": "knownGene"}
95
- },
96
- "required": ["chrom", "start", "end"]
97
- },
98
- "return_schema": {
99
- "type": "object",
100
- "properties": {
101
- "itemsReturned": {"type": "integer"},
102
- "features": {
103
- "type": "array",
104
- "items": {
105
- "type": "object",
106
- "properties": {
107
- "name": {"type": "string"},
108
- "geneName": {"type": "string"},
109
- "chrom": {"type": "string"},
110
- "chromStart": {"type": "integer"},
111
- "chromEnd": {"type": "integer"},
112
- "strand": {"type": "string"}
113
- }
114
- }
115
- }
116
- }
117
- }
118
- },
119
- {
120
- "type": "GnomadTool",
121
- "name": "gnomAD_query_variant",
122
- "description": "Query gnomAD GraphQL for a variant in a dataset (returns ID and genome allele counts/frequency).",
123
- "parameter": {
124
- "type": "object",
125
- "properties": {
126
- "variant_id": {"type": "string", "description": "Variant ID like '1-230710048-A-G'."},
127
- "dataset": {"type": "string", "description": "Dataset ID (e.g., gnomad_r4).", "default": "gnomad_r4"}
128
- },
129
- "required": ["variant_id"]
130
- },
131
- "return_schema": {
132
- "type": "object",
133
- "properties": {
134
- "variantId": {"type": "string"},
135
- "genome": {
136
- "type": "object",
137
- "properties": {"ac": {"type": "integer"}, "an": {"type": "integer"}, "af": {"type": "number"}}
138
- }
139
- }
140
- }
141
- },
142
- {
143
- "type": "GWASGeneSearch",
144
- "name": "GWAS_search_associations_by_gene",
145
- "description": "Search GWAS Catalog associations by gene name (returns strongest risk allele and p-value fields).",
146
- "parameter": {
147
- "type": "object",
148
- "properties": {
149
- "gene_name": {"type": "string", "description": "Gene symbol (e.g., BRCA1)."},
150
- "size": {"type": "integer", "description": "Max associations to return.", "default": 5}
151
- },
152
- "required": ["gene_name"]
153
- },
154
- "return_schema": {
155
- "type": "object",
156
- "properties": {
157
- "gene_name": {"type": "string"},
158
- "association_count": {"type": "integer"},
159
- "associations": {
160
- "type": "array",
161
- "items": {
162
- "type": "object",
163
- "properties": {
164
- "study": {"type": "string"},
165
- "strongestRiskAllele": {"type": "string"},
166
- "pvalue": {"type": "number"}
167
- }
168
- }
169
- },
170
- "total_found": {"type": "integer"}
171
- }
172
- }
173
- }
174
- ]
@@ -1,67 +0,0 @@
1
- """
2
- ToolDescriptionOptimizer
3
-
4
- Optimizes a tool's description and parameter descriptions by generating test cases, executing the...
5
- """
6
-
7
- from typing import Any, Optional, Callable
8
- from ._shared_client import get_shared_client
9
-
10
-
11
- def ToolDescriptionOptimizer(
12
- tool_config: dict[str, Any],
13
- save_to_file: bool,
14
- output_file: str,
15
- max_iterations: int,
16
- satisfaction_threshold: float,
17
- *,
18
- stream_callback: Optional[Callable[[str], None]] = None,
19
- use_cache: bool = False,
20
- validate: bool = True,
21
- ) -> Any:
22
- """
23
- Optimizes a tool's description and parameter descriptions by generating test cases, executing the...
24
-
25
- Parameters
26
- ----------
27
- tool_config : dict[str, Any]
28
- The full configuration of the tool to optimize.
29
- save_to_file : bool
30
- If true, save the optimized description to a file (do not overwrite the origi...
31
- output_file : str
32
- Optional file path to save the optimized description. If not provided, use '<...
33
- max_iterations : int
34
- Maximum number of optimization rounds to perform.
35
- satisfaction_threshold : float
36
- Quality score threshold (1-10) to consider optimization satisfactory.
37
- stream_callback : Callable, optional
38
- Callback for streaming output
39
- use_cache : bool, default False
40
- Enable caching
41
- validate : bool, default True
42
- Validate parameters
43
-
44
- Returns
45
- -------
46
- Any
47
- """
48
- # Handle mutable defaults to avoid B006 linting error
49
-
50
- return get_shared_client().run_one_function(
51
- {
52
- "name": "ToolDescriptionOptimizer",
53
- "arguments": {
54
- "tool_config": tool_config,
55
- "save_to_file": save_to_file,
56
- "output_file": output_file,
57
- "max_iterations": max_iterations,
58
- "satisfaction_threshold": satisfaction_threshold,
59
- },
60
- },
61
- stream_callback=stream_callback,
62
- use_cache=use_cache,
63
- validate=validate,
64
- )
65
-
66
-
67
- __all__ = ["ToolDescriptionOptimizer"]
@@ -1,67 +0,0 @@
1
- """
2
- ToolImplementationGenerator
3
-
4
- Generates domain-specific, functional code implementations based on tool descriptions and require...
5
- """
6
-
7
- from typing import Any, Optional, Callable
8
- from ._shared_client import get_shared_client
9
-
10
-
11
- def ToolImplementationGenerator(
12
- tool_description: str,
13
- tool_parameters: str,
14
- domain: Optional[str] = "general",
15
- complexity_level: Optional[str] = "intermediate",
16
- performance_requirements: Optional[str] = None,
17
- *,
18
- stream_callback: Optional[Callable[[str], None]] = None,
19
- use_cache: bool = False,
20
- validate: bool = True,
21
- ) -> Any:
22
- """
23
- Generates domain-specific, functional code implementations based on tool descriptions and require...
24
-
25
- Parameters
26
- ----------
27
- tool_description : str
28
- Detailed description of what the tool should accomplish
29
- tool_parameters : str
30
- JSON string of parameter schema for the tool
31
- domain : str
32
- Domain area for specialized implementation
33
- complexity_level : str
34
- Desired complexity level of implementation
35
- performance_requirements : str
36
- Performance requirements or constraints
37
- stream_callback : Callable, optional
38
- Callback for streaming output
39
- use_cache : bool, default False
40
- Enable caching
41
- validate : bool, default True
42
- Validate parameters
43
-
44
- Returns
45
- -------
46
- Any
47
- """
48
- # Handle mutable defaults to avoid B006 linting error
49
-
50
- return get_shared_client().run_one_function(
51
- {
52
- "name": "ToolImplementationGenerator",
53
- "arguments": {
54
- "tool_description": tool_description,
55
- "tool_parameters": tool_parameters,
56
- "domain": domain,
57
- "complexity_level": complexity_level,
58
- "performance_requirements": performance_requirements,
59
- },
60
- },
61
- stream_callback=stream_callback,
62
- use_cache=use_cache,
63
- validate=validate,
64
- )
65
-
66
-
67
- __all__ = ["ToolImplementationGenerator"]
@@ -1,59 +0,0 @@
1
- """
2
- ToolOptimizer
3
-
4
- Optimizes tool configurations based on quality feedback. Improves tool specifications and impleme...
5
- """
6
-
7
- from typing import Any, Optional, Callable
8
- from ._shared_client import get_shared_client
9
-
10
-
11
- def ToolOptimizer(
12
- tool_config: str,
13
- quality_feedback: str,
14
- optimization_target: str,
15
- *,
16
- stream_callback: Optional[Callable[[str], None]] = None,
17
- use_cache: bool = False,
18
- validate: bool = True,
19
- ) -> Any:
20
- """
21
- Optimizes tool configurations based on quality feedback. Improves tool specifications and impleme...
22
-
23
- Parameters
24
- ----------
25
- tool_config : str
26
- JSON string of the original tool configuration
27
- quality_feedback : str
28
- JSON string of quality evaluation feedback
29
- optimization_target : str
30
- What to optimize for (improve_quality, enhance_performance, etc.)
31
- stream_callback : Callable, optional
32
- Callback for streaming output
33
- use_cache : bool, default False
34
- Enable caching
35
- validate : bool, default True
36
- Validate parameters
37
-
38
- Returns
39
- -------
40
- Any
41
- """
42
- # Handle mutable defaults to avoid B006 linting error
43
-
44
- return get_shared_client().run_one_function(
45
- {
46
- "name": "ToolOptimizer",
47
- "arguments": {
48
- "tool_config": tool_config,
49
- "quality_feedback": quality_feedback,
50
- "optimization_target": optimization_target,
51
- },
52
- },
53
- stream_callback=stream_callback,
54
- use_cache=use_cache,
55
- validate=validate,
56
- )
57
-
58
-
59
- __all__ = ["ToolOptimizer"]
@@ -1,67 +0,0 @@
1
- """
2
- ToolSpecificationGenerator
3
-
4
- Generates complete ToolUniverse-compliant tool specifications based on a description and analysis...
5
- """
6
-
7
- from typing import Any, Optional, Callable
8
- from ._shared_client import get_shared_client
9
-
10
-
11
- def ToolSpecificationGenerator(
12
- tool_description: str,
13
- tool_category: str,
14
- tool_type: str,
15
- similar_tools: str,
16
- existing_tools_summary: str,
17
- *,
18
- stream_callback: Optional[Callable[[str], None]] = None,
19
- use_cache: bool = False,
20
- validate: bool = True,
21
- ) -> Any:
22
- """
23
- Generates complete ToolUniverse-compliant tool specifications based on a description and analysis...
24
-
25
- Parameters
26
- ----------
27
- tool_description : str
28
- Brief description of the desired tool functionality and purpose.
29
- tool_category : str
30
- Target category for the tool (e.g., 'biomedical', 'data_analysis', 'text_proc...
31
- tool_type : str
32
- Specific ToolUniverse tool type (e.g., 'AgenticTool', 'RESTTool', 'PythonTool').
33
- similar_tools : str
34
- JSON string containing configurations of similar existing tools for analysis ...
35
- existing_tools_summary : str
36
- Summary of existing tools in the ecosystem to avoid duplication and identify ...
37
- stream_callback : Callable, optional
38
- Callback for streaming output
39
- use_cache : bool, default False
40
- Enable caching
41
- validate : bool, default True
42
- Validate parameters
43
-
44
- Returns
45
- -------
46
- Any
47
- """
48
- # Handle mutable defaults to avoid B006 linting error
49
-
50
- return get_shared_client().run_one_function(
51
- {
52
- "name": "ToolSpecificationGenerator",
53
- "arguments": {
54
- "tool_description": tool_description,
55
- "tool_category": tool_category,
56
- "tool_type": tool_type,
57
- "similar_tools": similar_tools,
58
- "existing_tools_summary": existing_tools_summary,
59
- },
60
- },
61
- stream_callback=stream_callback,
62
- use_cache=use_cache,
63
- validate=validate,
64
- )
65
-
66
-
67
- __all__ = ["ToolSpecificationGenerator"]
@@ -1,63 +0,0 @@
1
- """
2
- ToolSpecificationOptimizer
3
-
4
- Optimizes tool specifications for clarity, completeness, and usability with comprehensive benchma...
5
- """
6
-
7
- from typing import Any, Optional, Callable
8
- from ._shared_client import get_shared_client
9
-
10
-
11
- def ToolSpecificationOptimizer(
12
- tool_config: str,
13
- optimization_focus: Optional[str] = "all",
14
- target_audience: Optional[str] = "mixed",
15
- similar_tools: Optional[str] = None,
16
- *,
17
- stream_callback: Optional[Callable[[str], None]] = None,
18
- use_cache: bool = False,
19
- validate: bool = True,
20
- ) -> Any:
21
- """
22
- Optimizes tool specifications for clarity, completeness, and usability with comprehensive benchma...
23
-
24
- Parameters
25
- ----------
26
- tool_config : str
27
- JSON string of current tool configuration to optimize
28
- optimization_focus : str
29
- Primary optimization focus
30
- target_audience : str
31
- Target user expertise level
32
- similar_tools : str
33
- JSON string array of similar tools for comparison and benchmarking
34
- stream_callback : Callable, optional
35
- Callback for streaming output
36
- use_cache : bool, default False
37
- Enable caching
38
- validate : bool, default True
39
- Validate parameters
40
-
41
- Returns
42
- -------
43
- Any
44
- """
45
- # Handle mutable defaults to avoid B006 linting error
46
-
47
- return get_shared_client().run_one_function(
48
- {
49
- "name": "ToolSpecificationOptimizer",
50
- "arguments": {
51
- "tool_config": tool_config,
52
- "optimization_focus": optimization_focus,
53
- "target_audience": target_audience,
54
- "similar_tools": similar_tools,
55
- },
56
- },
57
- stream_callback=stream_callback,
58
- use_cache=use_cache,
59
- validate=validate,
60
- )
61
-
62
-
63
- __all__ = ["ToolSpecificationOptimizer"]
tooluniverse/ucsc_tool.py DELETED
@@ -1,60 +0,0 @@
1
- import requests
2
- from .base_tool import BaseTool
3
- from .tool_registry import register_tool
4
-
5
-
6
- @register_tool("UCSCTool")
7
- class UCSCTool(BaseTool):
8
- """
9
- Local tool wrapper for UCSC Genome Browser track API.
10
- Queries knownGene track for genomic regions.
11
- """
12
-
13
- def __init__(self, tool_config):
14
- super().__init__(tool_config)
15
- self.base = "https://api.genome.ucsc.edu/getData/track"
16
- self.session = requests.Session()
17
-
18
- def run(self, arguments):
19
- genome = arguments.get("genome", "hg38")
20
- chrom = arguments.get("chrom")
21
- start = arguments.get("start")
22
- end = arguments.get("end")
23
- track = arguments.get("track", "knownGene")
24
-
25
- if not all([chrom, start is not None, end is not None]):
26
- return {"error": "Missing required parameters: chrom, start, end"}
27
-
28
- params = {
29
- "genome": genome,
30
- "track": track,
31
- "chrom": chrom,
32
- "start": start,
33
- "end": end,
34
- }
35
-
36
- resp = self.session.get(self.base, params=params, timeout=30)
37
- resp.raise_for_status()
38
- data = resp.json()
39
-
40
- features = data.get(track, [])
41
- items_returned = len(features)
42
-
43
- # Extract key fields from each feature
44
- processed_features = []
45
- for feature in features:
46
- processed_features.append(
47
- {
48
- "name": feature.get("name", ""),
49
- "geneName": feature.get("geneName", ""),
50
- "chrom": feature.get("chrom", ""),
51
- "chromStart": feature.get("chromStart"),
52
- "chromEnd": feature.get("chromEnd"),
53
- "strand": feature.get("strand", ""),
54
- }
55
- )
56
-
57
- return {
58
- "itemsReturned": items_returned,
59
- "features": processed_features,
60
- }