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
@@ -18,7 +18,7 @@ def compose(arguments, tooluniverse, call_tool):
18
18
  tooluniverse: ToolUniverse instance
19
19
  call_tool: Function to call other tools
20
20
 
21
- Returns:
21
+ Returns
22
22
  Dictionary with results and file paths
23
23
  """
24
24
  try:
@@ -13,7 +13,7 @@ def compose(arguments, tooluniverse, call_tool):
13
13
  tooluniverse: ToolUniverse instance
14
14
  call_tool: Function to call other tools
15
15
 
16
- Returns:
16
+ Returns
17
17
  list: List of tool metadata dictionaries (JSON-compatible)
18
18
  """
19
19
  import json
@@ -65,7 +65,7 @@ class ComposeTool(BaseTool):
65
65
  """
66
66
  Automatically discover tool dependencies from composition code.
67
67
 
68
- Returns:
68
+ Returns
69
69
  set: Set of tool names that this composition calls
70
70
  """
71
71
  dependencies = set()
@@ -89,7 +89,7 @@ class ComposeTool(BaseTool):
89
89
  """
90
90
  Create a mapping from tool names to their categories.
91
91
 
92
- Returns:
92
+ Returns
93
93
  dict: Mapping of tool names to category names
94
94
  """
95
95
  tool_to_category = {}
@@ -119,7 +119,7 @@ class ComposeTool(BaseTool):
119
119
  Args:
120
120
  missing_tools (set): Set of missing tool names
121
121
 
122
- Returns:
122
+ Returns
123
123
  tuple: (successfully_loaded, failed_to_load)
124
124
  """
125
125
  if not self.tooluniverse or not self.auto_load_dependencies:
@@ -173,7 +173,7 @@ class ComposeTool(BaseTool):
173
173
  """
174
174
  Load composition code from external Python file.
175
175
 
176
- Returns:
176
+ Returns
177
177
  str: The composition code as a string
178
178
  """
179
179
  if not self.composition_file:
@@ -213,7 +213,7 @@ class ComposeTool(BaseTool):
213
213
  arguments (dict): Input arguments for the composition
214
214
  stream_callback (callable, optional): Callback function for streaming output
215
215
 
216
- Returns:
216
+ Returns
217
217
  Any: Result from the composition execution
218
218
  """
219
219
  if not self.tooluniverse:
@@ -303,7 +303,7 @@ class ComposeTool(BaseTool):
303
303
  Args:
304
304
  stream_callback (callable, optional): Callback function for streaming output
305
305
 
306
- Returns:
306
+ Returns
307
307
  callable: Event emitter function
308
308
  """
309
309
 
@@ -327,7 +327,7 @@ class ComposeTool(BaseTool):
327
327
  arguments (dict): Input arguments
328
328
  stream_callback (callable, optional): Callback function for streaming output
329
329
 
330
- Returns:
330
+ Returns
331
331
  Any: Result from the composition execution
332
332
  """
333
333
  # Resolve file path
@@ -377,7 +377,7 @@ class ComposeTool(BaseTool):
377
377
  arguments (dict): Input arguments
378
378
  stream_callback (callable, optional): Callback function for streaming output
379
379
 
380
- Returns:
380
+ Returns
381
381
  Any: Result from the composition execution
382
382
  """
383
383
  # Initialize execution context
@@ -408,7 +408,7 @@ class ComposeTool(BaseTool):
408
408
  tool_name (str): Name of the tool to call
409
409
  arguments (dict): Arguments to pass to the tool
410
410
 
411
- Returns:
411
+ Returns
412
412
  Any: Result from the tool execution
413
413
  """
414
414
  # Check if tool is available (check both callable_functions and all_tool_dict)
tooluniverse/core_tool.py CHANGED
@@ -43,7 +43,7 @@ class CoreTool(BaseTool):
43
43
  year_to: End year filter
44
44
  language: Language filter (e.g., 'en', 'es', 'fr')
45
45
 
46
- Returns:
46
+ Returns
47
47
  List of paper dictionaries
48
48
  """
49
49
  try:
@@ -134,7 +134,7 @@ class CoreTool(BaseTool):
134
134
  Args:
135
135
  tool_arguments: Dictionary containing search parameters
136
136
 
137
- Returns:
137
+ Returns
138
138
  List of paper dictionaries
139
139
  """
140
140
  query = tool_arguments.get("query", "")
tooluniverse/ctg_tool.py CHANGED
@@ -34,7 +34,7 @@ class ClinicalTrialsTool(RESTfulTool):
34
34
  Args:
35
35
  arguments (dict): Runtime arguments provided to the tool's run method.
36
36
 
37
- Returns:
37
+ Returns
38
38
  dict: A new dictionary with mapped parameter names.
39
39
  """
40
40
 
@@ -54,7 +54,7 @@ class ClinicalTrialsTool(RESTfulTool):
54
54
  Args:
55
55
  arguments (dict): Runtime arguments provided to the tool's run method.
56
56
 
57
- Returns:
57
+ Returns
58
58
  dict: A dictionary of parameters ready for the API requests.
59
59
  """
60
60
  api_params = {}
@@ -77,7 +77,7 @@ class ClinicalTrialsTool(RESTfulTool):
77
77
  Args:
78
78
  arguments (dict): Runtime arguments provided to the tool's run method.
79
79
 
80
- Returns:
80
+ Returns
81
81
  str: The formatted endpoint URL.
82
82
  """
83
83
  url_to_format = self.endpoint_url
@@ -185,7 +185,7 @@ class ClinicalTrialsSearchTool(ClinicalTrialsTool):
185
185
  Args:
186
186
  arguments (dict): A dictionary containing parameters provided by the user/LLM
187
187
 
188
- Returns:
188
+ Returns
189
189
  dict or str: The JSON response from the API as a dictionary,
190
190
  or raw text for non-JSON responses, or an error dictionary.
191
191
  """
@@ -81,7 +81,7 @@ class CustomTool(BaseTool):
81
81
  Args:
82
82
  arguments: Input arguments for the tool
83
83
 
84
- Returns:
84
+ Returns
85
85
  Dict containing the result of tool execution
86
86
  """
87
87
  try:
@@ -39,63 +39,6 @@
39
39
  "return_json": false
40
40
  }
41
41
  },
42
- {
43
- "type": "AgenticTool",
44
- "name": "CodeQualityAnalyzer",
45
- "description": "Analyzes code quality from multiple dimensions including algorithmic correctness, functional implementation capability, performance characteristics, and best practices. Provides detailed feedback and improvement suggestions.",
46
- "prompt": "You are an expert software engineer and code quality analyst. Please analyze the following code implementation and provide comprehensive quality assessment.\n\n## CODE TO ANALYZE\nTool Name: {tool_name}\nTool Description: {tool_description}\nTool Parameters: {tool_parameters}\nImplementation Code: {implementation_code}\nTest Cases: {test_cases}\nTest Execution Results: {test_execution_results}\n\n## ANALYSIS REQUIREMENTS\nPlease provide a comprehensive analysis covering the following dimensions:\n\n### 1. ALGORITHMIC CORRECTNESS (0-10)\n- Mathematical accuracy and logical correctness\n- Algorithm efficiency and time/space complexity\n- Edge case handling and boundary conditions\n- Error propagation and numerical stability\n- Correctness of domain-specific calculations\n\n### 2. FUNCTIONAL IMPLEMENTATION CAPABILITY (0-10)\n- Completeness of required functionality\n- Parameter validation and input handling\n- Return value accuracy and format consistency\n- Integration with external libraries/APIs\n- Feature completeness vs. requirements\n\n### 3. PERFORMANCE CHARACTERISTICS (0-10)\n- Time complexity analysis\n- Space complexity analysis\n- Memory usage optimization\n- Computational efficiency\n- Scalability considerations\n\n### 4. CODE QUALITY AND STRUCTURE (0-10)\n- Code readability and maintainability\n- Function and variable naming\n- Code organization and modularity\n- Documentation quality\n- Adherence to coding standards\n\n### 5. ERROR HANDLING AND ROBUSTNESS (0-10)\n- Exception handling coverage\n- Input validation robustness\n- Error message clarity and usefulness\n- Graceful degradation strategies\n- Recovery mechanisms\n\n### 6. TESTING AND VALIDATION (0-10)\n- Test coverage completeness\n- Test case quality and relevance\n- Edge case testing\n- Performance testing\n- Integration testing considerations\n- **IMPORTANT**: When test_execution_results are provided, use them to validate actual code behavior and adjust scoring accordingly\n\n### 7. SECURITY AND SAFETY (0-10)\n- Input sanitization and validation\n- Resource usage limits\n- Access control considerations\n- Data privacy protection\n- Security best practices\n\n### 8. MAINTAINABILITY AND EXTENSIBILITY (0-10)\n- Code modularity and reusability\n- Configuration flexibility\n- Future enhancement readiness\n- Dependency management\n- Technical debt assessment\n\n## TEST EXECUTION ANALYSIS\nWhen test_execution_results are provided:\n- Analyze actual test outcomes vs. expected results\n- Identify discrepancies between code behavior and test expectations\n- Use real execution data to validate code correctness\n- Adjust quality scores based on actual performance\n- Provide specific feedback on test failures and their implications\n\n## OUTPUT FORMAT\nProvide your analysis in the following JSON format:\n\n```json\n{\n \"overall_score\": <0-10>,\n \"scores\": {\n \"algorithmic_correctness\": <0-10>,\n \"functional_capability\": <0-10>,\n \"performance\": <0-10>,\n \"code_quality\": <0-10>,\n \"error_handling\": <0-10>,\n \"testing\": <0-10>,\n \"security\": <0-10>,\n \"maintainability\": <0-10>\n },\n \"feedback\": {\n \"strengths\": [\"list of code strengths\"],\n \"weaknesses\": [\"list of specific weaknesses\"],\n \"critical_issues\": [\"list of critical issues that must be fixed\"],\n \"improvement_opportunities\": [\"list of areas for improvement\"]\n },\n \"algorithm_analysis\": {\n \"complexity\": \"O(n) analysis\",\n \"correctness_verification\": \"mathematical verification details\",\n \"edge_cases\": \"identified edge cases\",\n \"numerical_stability\": \"numerical computation stability assessment\"\n },\n \"functional_verification\": {\n \"requirements_coverage\": \"percentage of requirements covered\",\n \"missing_features\": [\"list of missing features\"],\n \"integration_points\": [\"external dependencies and integration points\"],\n \"api_consistency\": \"API design consistency assessment\"\n },\n \"test_execution_analysis\": {\n \"test_results_summary\": \"summary of test execution outcomes\",\n \"pass_rate\": \"percentage of tests passed\",\n \"failed_tests\": [\"list of failed tests with reasons\"],\n \"actual_vs_expected\": \"analysis of actual vs expected behavior\"\n },\n \"recommendations\": [\n {\n \"priority\": \"high|medium|low\",\n \"category\": \"algorithm|functionality|performance|quality|security\",\n \"description\": \"specific improvement description\",\n \"action\": \"concrete action to take\",\n \"expected_impact\": \"expected improvement impact\"\n }\n ]\n}\n```\n\n## ANALYSIS GUIDELINES\n- Be thorough and objective in your assessment\n- Provide specific examples from the code when possible\n- Focus on actionable feedback and concrete improvements\n- Consider both immediate fixes and long-term improvements\n- Evaluate code from both technical and business perspectives\n- Provide evidence-based scoring with clear justification\n- **When test_execution_results are available, prioritize actual behavior over theoretical analysis**",
47
- "input_arguments": [
48
- "tool_name",
49
- "tool_description",
50
- "tool_parameters",
51
- "implementation_code",
52
- "test_cases",
53
- "test_execution_results"
54
- ],
55
- "parameter": {
56
- "type": "object",
57
- "properties": {
58
- "tool_name": {
59
- "type": "string",
60
- "description": "Name of the tool being analyzed"
61
- },
62
- "tool_description": {
63
- "type": "string",
64
- "description": "Description of what the tool is supposed to do"
65
- },
66
- "tool_parameters": {
67
- "type": "string",
68
- "description": "JSON string of tool parameters and their types"
69
- },
70
- "implementation_code": {
71
- "type": "string",
72
- "description": "The actual implementation code to analyze"
73
- },
74
- "test_cases": {
75
- "type": "string",
76
- "description": "JSON string of test cases for the tool"
77
- },
78
- "test_execution_results": {
79
- "type": "string",
80
- "description": "JSON string of test execution results including pass/fail status and actual outputs"
81
- }
82
- },
83
- "required": [
84
- "tool_name",
85
- "tool_description",
86
- "tool_parameters",
87
- "implementation_code",
88
- "test_cases"
89
- ]
90
- },
91
- "configs": {
92
- "api_type": "CHATGPT",
93
- "model_id": "o4-mini-0416",
94
- "temperature": 0.3,
95
- "max_new_tokens": 8192,
96
- "return_json": true
97
- }
98
- },
99
42
  {
100
43
  "type": "AgenticTool",
101
44
  "name": "MedicalLiteratureReviewer",
@@ -563,37 +506,6 @@
563
506
  "return_json": false
564
507
  }
565
508
  },
566
- {
567
- "type": "AgenticTool",
568
- "name": "TestCaseGenerator",
569
- "description": "Generates diverse and representative ToolUniverse tool call dictionaries for a given tool based on its parameter schema. Each tool call should be a JSON object with 'name' (the tool's name) and 'arguments' (a dict of input arguments), covering different parameter combinations, edge cases, and typical usage. Can generate targeted test cases based on previous optimization feedback.",
570
- "prompt": "You are an expert software tester. Generate 3-5 diverse ToolUniverse tool call dictionaries for the given tool configuration. Each tool call must be a JSON object with 'name' (tool name) and 'arguments' (input parameters).\n\nFEEDBACK-DRIVEN GENERATION:\nIf tool_config contains '_optimization_feedback' and '_iteration', generate targeted test cases addressing the specific issues mentioned in the feedback. Focus on edge cases, parameter combinations, or usage patterns that need better coverage.\n\nSTANDARD GENERATION:\nCover typical usage, edge cases, and boundary conditions when possible.\n\nTool configuration: {tool_config}\n\nReturn a JSON object with key 'test_cases' containing an array of test case objects. Example format:\n{\"test_cases\": [{\"name\":\"ToolName\",\"arguments\":{\"param\":\"value\"}},{\"name\":\"ToolName\",\"arguments\":{\"param\":123}}]}",
571
- "input_arguments": [
572
- "tool_config"
573
- ],
574
- "parameter": {
575
- "type": "object",
576
- "properties": {
577
- "tool_config": {
578
- "type": "object",
579
- "description": "The full configuration of the tool to generate test cases for. May include '_optimization_feedback' and '_iteration' fields for feedback-driven test generation."
580
- }
581
- },
582
- "required": [
583
- "tool_config"
584
- ]
585
- },
586
- "configs": {
587
- "api_type": "CHATGPT",
588
- "model_id": "o4-mini-0416",
589
- "temperature": 1.0,
590
- "max_new_tokens": 4096,
591
- "return_json": true,
592
- "response_format": {
593
- "type": "json_object"
594
- }
595
- }
596
- },
597
509
  {
598
510
  "type": "AgenticTool",
599
511
  "name": "DescriptionAnalyzer",
@@ -628,40 +540,6 @@
628
540
  "return_json": true
629
541
  }
630
542
  },
631
- {
632
- "type": "AgenticTool",
633
- "name": "ArgumentDescriptionOptimizer",
634
- "description": "Optimizes the descriptions of tool arguments/parameters based on test case results and actual usage patterns. Provides improved descriptions that are more accurate and user-friendly.",
635
- "prompt": "You are an expert technical writer specializing in API documentation. Given a tool's parameter schema and test case results, analyze how each parameter is used and optimize their descriptions to be clear, accurate, and concise.\n\nCRITICAL CONSTRAINTS - PARAMETER DESCRIPTION SCOPE:\n1. If the parameter schema contains '_previous_feedback', use that feedback to address specific issues and improve the parameter descriptions accordingly.\n2. Parameter descriptions should be HIGHLY SPECIFIC to each individual parameter.\n3. NEVER repeat or reference the main tool functionality - assume the user already knows what the tool does.\n4. Focus EXCLUSIVELY on parameter-specific details: data types, formats, constraints, valid values, required formats, examples when helpful.\n5. Each description should answer: 'What should I put in this specific parameter?' not 'What does the tool do?'\n6. Avoid generic phrases like 'for this tool', 'used by the tool', 'enables functionality' unless they provide specific technical context.\n7. Be precise about technical requirements (e.g., 'JSON string', 'integer between 1-100', 'URL format', etc.)\n8. Every word must serve a purpose - eliminate filler words and redundant phrases.\n\nOriginal parameter schema:\n{parameter_schema}\n\nTest results showing parameter usage:\n{test_results}\n\nFor each parameter, suggest an improved description that:\n1. Is brief but informative (1-2 sentences max)\n2. Accurately reflects the parameter's specific purpose, data type, and constraints\n3. Uses clear, simple language with precise technical details\n4. Avoids redundancy with the parameter name\n5. Addresses any issues mentioned in previous feedback\n6. Contains only essential information about what value should be provided\n\nReturn a JSON object with keys: 'optimized_parameters' (object with parameter names as keys and optimized descriptions as values) and 'rationale' (explaining the key changes made).",
636
- "input_arguments": [
637
- "parameter_schema",
638
- "test_results"
639
- ],
640
- "parameter": {
641
- "type": "object",
642
- "properties": {
643
- "parameter_schema": {
644
- "type": "string",
645
- "description": "JSON string of the original parameter schema with properties and descriptions."
646
- },
647
- "test_results": {
648
- "type": "string",
649
- "description": "A JSON string containing test case input/output pairs showing parameter usage."
650
- }
651
- },
652
- "required": [
653
- "parameter_schema",
654
- "test_results"
655
- ]
656
- },
657
- "configs": {
658
- "api_type": "CHATGPT",
659
- "model_id": "o4-mini-0416",
660
- "temperature": 1.0,
661
- "max_new_tokens": 1536,
662
- "return_json": true
663
- }
664
- },
665
543
  {
666
544
  "type": "AgenticTool",
667
545
  "name": "DescriptionQualityEvaluator",
@@ -702,58 +580,6 @@
702
580
  "return_json": true
703
581
  }
704
582
  },
705
- {
706
- "type": "AgenticTool",
707
- "name": "ToolSpecificationGenerator",
708
- "description": "Generates complete ToolUniverse-compliant tool specifications based on a description and analysis of similar existing tools. Creates comprehensive tool configurations including parameters, prompts, and metadata.",
709
- "prompt": "You are an expert tool architect specializing in ToolUniverse tool design. Generate a complete, valid ToolUniverse tool specification based on the provided requirements and analysis of similar tools.\n\n🚨 **CRITICAL REQUIREMENT**: For all tool types except AgenticTool, generate CUSTOM tool implementations with complete standalone code. Do NOT reference existing tool classes. Only use AgenticTool for subjective analysis tasks requiring LLM capabilities.\n\n**PACKAGE USAGE REQUIREMENT**: ALWAYS prioritize using existing, well-maintained Python packages over custom implementations. Leverage established libraries like pandas, numpy, scipy, requests, beautifulsoup4, biopython, etc. Only write custom algorithms when absolutely no suitable package exists.\n\nREQUIREMENTS:\nTool Description: {tool_description}\nTarget Category: {tool_category}\nTarget Type: {tool_type}\nSimilar Tools Analysis: {similar_tools}\nExisting Tools Context: {existing_tools_summary}\n\n**TOOL TYPE SELECTION LOGIC:**\n1. **AgenticTool**: Only for subjective tasks (analysis, interpretation, creative writing)\n2. **CustomTool**: For all computational, API, data processing tasks with complete custom implementation\n\n**FOR CustomTool (Complete custom implementation - PREFERRED for most tasks):**\n```json\n{\n \"type\": \"CustomTool\",\n \"name\": \"ToolName\",\n \"description\": \"Custom implementation for [specific functionality]\",\n \"implementation\": {\n \"language\": \"python\",\n \"dependencies\": [\"package1\", \"package2\"],\n \"installation_commands\": [\"pip install package1\", \"pip install package2\"],\n \"source_code\": \"import requests\\nimport json\\n\\ndef execute_tool(params):\\n # Complete implementation here\\n return result\",\n \"main_function\": \"execute_tool\",\n \"error_handling\": \"try-except blocks for robust error management\",\n \"validation\": \"input parameter validation logic\",\n \"documentation\": \"Complete usage documentation\"\n },\n \"parameter\": {\n \"type\": \"object\",\n \"properties\": {\n \"input_param\": {\n \"type\": \"string\",\n \"description\": \"Description of input parameter\",\n \"required\": true\n }\n },\n \"required\": [\"input_param\"]\n },\n \"return_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"result\": {\"type\": \"string\", \"description\": \"Tool output description\"}\n }\n },\n \"testing\": {\n \"test_cases\": [\n {\n \"input\": {\"input_param\": \"test_value\"},\n \"expected_output_type\": \"object\",\n \"description\": \"Test case description\"\n }\n ],\n \"validation_method\": \"automated testing with assertions\"\n }\n}\n```\n\n**FOR AgenticTool (AI-powered tools - Only for subjective tasks):**\n```json\n{\n \"type\": \"AgenticTool\",\n \"name\": \"ToolName\",\n \"description\": \"AI-powered [subjective task] for [non-computational purpose]\",\n \"prompt\": \"Prompt template with {parameter_name} placeholders for subjective analysis\",\n \"input_arguments\": [\"param1\", \"param2\"],\n \"parameter\": {\n \"type\": \"object\",\n \"properties\": {\n \"param1\": {\"type\": \"string\", \"description\": \"...\", \"required\": true}\n },\n \"required\": [\"param1\"]\n },\n \"configs\": {\n \"api_type\": \"CHATGPT\",\n \"model_id\": \"o4-mini-0416\",\n \"temperature\": 0.7,\n \"max_new_tokens\": 1024,\n \"return_json\": false\n }\n}\n```\n\n**GENERATION REQUIREMENTS:**\n1. **CUSTOM IMPLEMENTATION APPROACH**: For computational/API/data tasks, generate complete standalone Python code\n2. **NO EXISTING TOOL CLASSES**: Do not inherit from or reference PackageTool, RESTTool, XMLTool, etc.\n3. **REAL PACKAGES**: Use actual, installable Python packages (requests, pandas, numpy, etc.)\n4. **COMPLETE CODE**: Include full implementation with imports, error handling, and validation\n5. **TESTING READY**: Provide test cases and validation methods\n6. **AGENTICTOOL ONLY FOR SUBJECTIVE**: Use AgenticTool only for interpretation, analysis, creative tasks\n\n**QUALITY STANDARDS:**\n- Generate complete, executable Python code for CustomTool\n- Include real package dependencies and installation instructions\n- Provide comprehensive error handling and input validation\n- Ensure computational accuracy through established libraries\n- Only use AgenticTool for tasks requiring subjective judgment or LLM capabilities\n\nReturn ONLY a valid JSON object representing the complete tool configuration using the EXACT format for the chosen tool type. No additional text or explanations.",
710
- "input_arguments": [
711
- "tool_description",
712
- "tool_category",
713
- "tool_type",
714
- "similar_tools",
715
- "existing_tools_summary"
716
- ],
717
- "parameter": {
718
- "type": "object",
719
- "properties": {
720
- "tool_description": {
721
- "type": "string",
722
- "description": "Brief description of the desired tool functionality and purpose."
723
- },
724
- "tool_category": {
725
- "type": "string",
726
- "description": "Target category for the tool (e.g., 'biomedical', 'data_analysis', 'text_processing')."
727
- },
728
- "tool_type": {
729
- "type": "string",
730
- "description": "Specific ToolUniverse tool type (e.g., 'AgenticTool', 'RESTTool', 'PythonTool')."
731
- },
732
- "similar_tools": {
733
- "type": "string",
734
- "description": "JSON string containing configurations of similar existing tools for analysis and differentiation."
735
- },
736
- "existing_tools_summary": {
737
- "type": "string",
738
- "description": "Summary of existing tools in the ecosystem to avoid duplication and identify gaps."
739
- }
740
- },
741
- "required": [
742
- "tool_description",
743
- "tool_category",
744
- "tool_type",
745
- "similar_tools",
746
- "existing_tools_summary"
747
- ]
748
- },
749
- "configs": {
750
- "api_type": "CHATGPT",
751
- "model_id": "o4-mini-0416",
752
- "temperature": 1.0,
753
- "max_new_tokens": 40960,
754
- "return_json": true
755
- }
756
- },
757
583
  {
758
584
  "type": "AgenticTool",
759
585
  "name": "AdvancedCodeQualityAnalyzer",
@@ -804,128 +630,6 @@
804
630
  "return_json": true
805
631
  }
806
632
  },
807
- {
808
- "type": "AgenticTool",
809
- "name": "ToolImplementationGenerator",
810
- "description": "Generates domain-specific, functional code implementations based on tool descriptions and requirements with intelligent algorithm selection",
811
- "prompt": "You are an expert software engineer specializing in domain-specific implementations. Generate a complete, functional implementation based on the requirements.\n\n## IMPLEMENTATION REQUEST\nTool Description: {tool_description}\nDomain: {domain}\nComplexity Level: {complexity_level}\nPerformance Requirements: {performance_requirements}\n\nTool Parameters:\n{tool_parameters}\n\n## CRITICAL REQUIREMENT: USE EXISTING PACKAGES\n🚨 **ALWAYS PRIORITIZE EXISTING, WELL-MAINTAINED PACKAGES** over custom implementations. Your goal is to leverage the ecosystem of established, tested, and optimized libraries. **NEVER write custom algorithms unless absolutely no suitable package exists.**\n\n## PACKAGE SELECTION STRATEGY\n1. **FIRST CHOICE**: Use established, widely-adopted packages (e.g., pandas, numpy, scipy, requests, beautifulsoup4)\n2. **SECOND CHOICE**: Use domain-specific packages (e.g., biopython for bioinformatics, matplotlib for plotting)\n3. **THIRD CHOICE**: Use specialized libraries (e.g., opencv-python for computer vision, scikit-learn for ML)\n4. **LAST RESORT**: Only implement custom algorithms when no suitable package exists\n\n## REQUIREMENTS ANALYSIS\n1. Parse the tool description to understand core functionality\n2. **Research existing packages** that can solve this problem\n3. **Evaluate package suitability** (popularity, maintenance, performance)\n4. Design implementation using the best available packages\n5. Generate production-ready code with proper error handling\n\n## CODE GENERATION GUIDELINES\n- **ALWAYS check if an existing package can solve the problem**\n- Use established libraries and algorithms for the domain\n- Include comprehensive input validation\n- Implement proper error handling with meaningful messages\n- Add informative comments explaining the logic\n- Return structured results with validation status\n- Consider edge cases and handle them gracefully\n- Follow domain-specific best practices\n- **Document why you chose specific packages**\n\n## DOMAIN-SPECIFIC PACKAGE RECOMMENDATIONS\n\n### Bioinformatics Tools\n- **Biopython**: Sequence analysis, molecular calculations, file format handling\n- **scipy.stats**: Statistical analysis for biological data\n- **pandas**: Data manipulation and analysis\n- **numpy**: Numerical computations\n- **matplotlib/seaborn**: Data visualization\n\n### Mathematical Tools\n- **numpy**: Numerical methods, linear algebra, optimization\n- **scipy**: Scientific computing, optimization, signal processing\n- **sympy**: Symbolic mathematics\n- **pandas**: Data analysis and statistics\n- **matplotlib**: Mathematical plotting\n\n### Data Science Tools\n- **pandas**: Data manipulation and analysis\n- **numpy**: Numerical computations\n- **scipy**: Statistical methods and optimization\n- **scikit-learn**: Machine learning algorithms\n- **matplotlib/seaborn**: Data visualization\n\n### Web API Tools\n- **requests**: HTTP handling and API calls\n- **urllib3**: HTTP client library\n- **aiohttp**: Asynchronous HTTP client/server\n- **httpx**: Modern HTTP client\n- **beautifulsoup4**: HTML/XML parsing\n\n### Text Processing Tools\n- **nltk**: Natural language processing\n- **spaCy**: Advanced NLP\n- **textblob**: Simple text processing\n- **re**: Regular expressions (built-in)\n- **difflib**: Sequence matching (built-in)\n\n### General Purpose\n- **pathlib**: File path operations (built-in)\n- **json**: JSON handling (built-in)\n- **csv**: CSV file handling (built-in)\n- **datetime**: Date/time operations (built-in)\n- **collections**: Advanced data structures (built-in)\n\n## PACKAGE EVALUATION CRITERIA\nWhen choosing packages, consider:\n1. **Popularity**: GitHub stars, PyPI downloads, community size\n2. **Maintenance**: Recent updates, active development\n3. **Documentation**: Quality and completeness of docs\n4. **Performance**: Speed and memory efficiency\n5. **Compatibility**: Python version support, dependencies\n6. **License**: Open source, commercial-friendly\n\n## IMPLEMENTATION APPROACH\n1. **Research Phase**: Identify 2-3 candidate packages for the problem\n2. **Evaluation Phase**: Compare packages based on criteria above\n3. **Selection Phase**: Choose the best package and document why\n4. **Implementation Phase**: Use the selected package with proper error handling\n5. **Fallback Phase**: If package fails, implement minimal custom solution\n\n## RESPONSE FORMAT\nReturn a comprehensive JSON object:\n\n```json\n{\n \"implementation\": {\n \"source_code\": \"<complete Python function implementation>\",\n \"dependencies\": [\"<required packages>\"],\n \"imports\": [\"<import statements>\"],\n \"algorithm_description\": \"<explanation of chosen algorithm/approach>\",\n \"complexity\": \"<time/space complexity analysis>\",\n \"test_cases\": [\n {\n \"input\": \"<test input>\",\n \"expected_output\": \"<expected result>\",\n \"description\": \"<what this test validates>\"\n }\n ],\n \"package_justification\": \"<explanation of why specific packages were chosen>\",\n \"alternative_packages\": [\"<other packages considered but not chosen>\"]\n },\n \"quality_metrics\": {\n \"estimated_accuracy\": \"<accuracy assessment>\",\n \"performance_characteristics\": \"<performance description>\",\n \"robustness_level\": \"<error handling assessment>\"\n },\n \"documentation\": {\n \"usage_examples\": [\"<code examples>\"],\n \"parameter_explanations\": \"<detailed parameter descriptions>\",\n \"return_format\": \"<description of return value structure>\"\n }\n}\n```\n\n## FINAL REMINDER\n**ALWAYS prefer using existing, well-maintained packages over custom implementations.** Only write custom code when absolutely necessary. Your goal is to create robust, maintainable tools that leverage the Python ecosystem's strengths.",
812
- "input_arguments": [
813
- "tool_description",
814
- "tool_parameters",
815
- "domain",
816
- "complexity_level",
817
- "performance_requirements"
818
- ],
819
- "parameter": {
820
- "type": "object",
821
- "properties": {
822
- "tool_description": {
823
- "type": "string",
824
- "description": "Detailed description of what the tool should accomplish"
825
- },
826
- "tool_parameters": {
827
- "type": "string",
828
- "description": "JSON string of parameter schema for the tool"
829
- },
830
- "domain": {
831
- "type": "string",
832
- "description": "Domain area for specialized implementation",
833
- "enum": [
834
- "bioinformatics",
835
- "data-science",
836
- "web-api",
837
- "mathematical",
838
- "text-processing",
839
- "general"
840
- ],
841
- "default": "general"
842
- },
843
- "complexity_level": {
844
- "type": "string",
845
- "enum": [
846
- "basic",
847
- "intermediate",
848
- "advanced"
849
- ],
850
- "description": "Desired complexity level of implementation",
851
- "default": "intermediate"
852
- },
853
- "performance_requirements": {
854
- "type": "string",
855
- "description": "Performance requirements or constraints"
856
- }
857
- },
858
- "required": [
859
- "tool_description",
860
- "tool_parameters"
861
- ]
862
- },
863
- "configs": {
864
- "api_type": "CHATGPT",
865
- "model_id": "o4-mini-0416",
866
- "temperature": 0.2,
867
- "max_new_tokens": 50000,
868
- "return_json": true
869
- }
870
- },
871
- {
872
- "type": "AgenticTool",
873
- "name": "ToolSpecificationOptimizer",
874
- "description": "Optimizes tool specifications for clarity, completeness, and usability with comprehensive benchmarking against similar tools",
875
- "prompt": "You are an expert in tool design and user experience optimization. Analyze and optimize the provided tool specification for maximum effectiveness.\n\n## TOOL SPECIFICATION TO OPTIMIZE\nCurrent Configuration:\n{tool_config}\n\nOptimization Focus: {optimization_focus}\nTarget Audience: {target_audience}\n\nSimilar Tools for Benchmarking:\n{similar_tools}\n\n## OPTIMIZATION FRAMEWORK\n\n### 1. CLARITY ASSESSMENT\n- Description comprehensiveness and clarity\n- Parameter naming and documentation\n- Usage examples and guidance\n- Error message quality\n\n### 2. COMPLETENESS EVALUATION\n- Required vs optional parameters\n- Edge case handling\n- Output format specification\n- Documentation coverage\n\n### 3. USABILITY ANALYSIS\n- Ease of understanding for target audience\n- Parameter complexity and defaults\n- Error prevention design\n- Workflow integration\n\n### 4. PERFORMANCE OPTIMIZATION\n- Parameter validation efficiency\n- Resource usage considerations\n- Scalability factors\n- Response time optimization\n\n### 5. COMPARATIVE BENCHMARKING\n- Analyze similar tools for best practices\n- Identify competitive advantages\n- Address common user pain points\n- Incorporate proven design patterns\n\n## OPTIMIZATION PROCESS\n1. Evaluate current specification quality\n2. Identify improvement opportunities\n3. Benchmark against similar tools\n4. Generate optimized version\n5. Provide detailed rationale for changes\n\n## RESPONSE FORMAT\nReturn a comprehensive optimization report:\n\n```json\n{\n \"optimized_config\": {\n \"name\": \"<optimized name>\",\n \"description\": \"<improved description>\",\n \"parameter\": {\n \"type\": \"object\",\n \"properties\": \"<optimized parameters>\",\n \"required\": \"<updated required fields>\"\n },\n \"examples\": [\"<usage examples>\"],\n \"metadata\": {\n \"tags\": [\"<relevant tags>\"],\n \"difficulty_level\": \"<user difficulty>\",\n \"estimated_execution_time\": \"<typical runtime>\"\n }\n },\n \"improvements\": [\n {\n \"area\": \"<improvement area>\",\n \"change\": \"<what was changed>\",\n \"rationale\": \"<why this improves the tool>\",\n \"impact\": \"<expected user impact>\"\n }\n ],\n \"quality_score\": {\n \"before\": \"<0-10>\",\n \"after\": \"<0-10>\",\n \"improvement\": \"<difference>\"\n },\n \"recommendations\": [\n {\n \"type\": \"enhancement|fix|optimization\",\n \"description\": \"<recommendation>\",\n \"priority\": \"high|medium|low\"\n }\n ]\n}\n```",
876
- "input_arguments": [
877
- "tool_config",
878
- "optimization_focus",
879
- "target_audience",
880
- "similar_tools"
881
- ],
882
- "parameter": {
883
- "type": "object",
884
- "properties": {
885
- "tool_config": {
886
- "type": "string",
887
- "description": "JSON string of current tool configuration to optimize"
888
- },
889
- "optimization_focus": {
890
- "type": "string",
891
- "enum": [
892
- "clarity",
893
- "completeness",
894
- "usability",
895
- "performance",
896
- "all"
897
- ],
898
- "description": "Primary optimization focus",
899
- "default": "all"
900
- },
901
- "target_audience": {
902
- "type": "string",
903
- "enum": [
904
- "beginner",
905
- "intermediate",
906
- "expert",
907
- "mixed"
908
- ],
909
- "description": "Target user expertise level",
910
- "default": "mixed"
911
- },
912
- "similar_tools": {
913
- "type": "string",
914
- "description": "JSON string array of similar tools for comparison and benchmarking"
915
- }
916
- },
917
- "required": [
918
- "tool_config"
919
- ]
920
- },
921
- "configs": {
922
- "api_type": "CHATGPT",
923
- "model_id": "o4-mini-0416",
924
- "temperature": 0.3,
925
- "max_new_tokens": 3500,
926
- "return_json": true
927
- }
928
- },
929
633
  {
930
634
  "type": "AgenticTool",
931
635
  "name": "DomainExpertValidator",
@@ -1022,80 +726,6 @@
1022
726
  "return_json": true
1023
727
  }
1024
728
  },
1025
- {
1026
- "type": "AgenticTool",
1027
- "name": "ToolOptimizer",
1028
- "description": "Optimizes tool configurations based on quality feedback. Improves tool specifications and implementations to address identified issues.",
1029
- "prompt": "You are an expert tool optimizer. Improve this tool based on the quality feedback:\n\nOriginal Tool Configuration: {tool_config}\nQuality Feedback: {quality_feedback}\nOptimization Target: {optimization_target}\n\nGenerate an optimized version in this JSON format:\n{\n \"optimized_tool\": {\n \"name\": \"improved_tool_name\",\n \"type\": \"tool_type\",\n \"description\": \"enhanced_description\",\n \"parameter\": {\n \"type\": \"object\",\n \"properties\": {},\n \"required\": []\n },\n \"category\": \"category\",\n \"implementation\": {\n \"source_code\": \"improved_code\",\n \"dependencies\": [],\n \"main_function\": \"execute_tool\"\n }\n },\n \"improvements_made\": [\n \"Added input validation\",\n \"Enhanced error handling\",\n \"Improved parameter descriptions\"\n ],\n \"optimization_notes\": \"Summary of key improvements\"\n}\n\nFocus on:\n1. Fixing identified weaknesses\n2. Enhancing parameter validation\n3. Improving error handling\n4. Adding missing functionality\n5. Optimizing for the specified target\n6. Maintaining backward compatibility where possible",
1030
- "input_arguments": [
1031
- "tool_config",
1032
- "quality_feedback",
1033
- "optimization_target"
1034
- ],
1035
- "parameter": {
1036
- "type": "object",
1037
- "properties": {
1038
- "tool_config": {
1039
- "type": "string",
1040
- "description": "JSON string of the original tool configuration"
1041
- },
1042
- "quality_feedback": {
1043
- "type": "string",
1044
- "description": "JSON string of quality evaluation feedback"
1045
- },
1046
- "optimization_target": {
1047
- "type": "string",
1048
- "description": "What to optimize for (improve_quality, enhance_performance, etc.)"
1049
- }
1050
- },
1051
- "required": [
1052
- "tool_config",
1053
- "quality_feedback",
1054
- "optimization_target"
1055
- ]
1056
- },
1057
- "configs": {
1058
- "api_type": "CHATGPT",
1059
- "model_id": "o4-mini-0416",
1060
- "temperature": 0.3,
1061
- "max_new_tokens": 3072,
1062
- "return_json": true
1063
- }
1064
- },
1065
- {
1066
- "type": "AgenticTool",
1067
- "name": "CodeOptimizer",
1068
- "description": "Optimizes code implementation for tools based on quality evaluation. Takes tool configuration and quality evaluation results to produce improved source code.",
1069
- "prompt": "You are an expert software engineer specializing in code optimization. Your task is to optimize the implementation code of a tool based on the provided configuration and quality evaluation.\n\n## TOOL CONFIGURATION\n{tool_config}\n\n## QUALITY EVALUATION\n{quality_evaluation}\n\n## OPTIMIZATION INSTRUCTIONS\nAnalyze the current implementation and quality evaluation feedback, then provide an optimized version that addresses the identified issues. Focus on:\n1. **Code Quality**: Improve readability, structure, and maintainability\n2. **Error Handling**: Enhance exception handling, input validation, and robustness\n3. **Performance**: Optimize algorithms, reduce complexity, improve efficiency\n4. **Best Practices**: Follow Python standards, proper documentation, and clean code principles\n\nReturn a JSON object with the following structure:\n```json\n{\n \"implementation\": {\n \"source_code\": \"<optimized_python_code>\",\n \"dependencies\": [\"<required_packages>\"],\n \"imports\": [\"<import_statements>\"],\n \"improvements_made\": [\"list of specific improvements based on quality evaluation feedback\"],\n \"addressed_issues\": [\"list of issues that were fixed\"],\n \"quality_improvements\": \"summary of overall quality improvements\"\n }\n}\n```\n\nEnsure the optimized code:\n- Maintains the same functionality as the original\n- Addresses the specific issues mentioned in quality evaluation feedback\n- Includes proper error handling and input validation\n- Follows Python best practices and PEP 8 standards\n- Is well-documented with clear docstrings and comments",
1070
- "input_arguments": [
1071
- "tool_config",
1072
- "quality_evaluation"
1073
- ],
1074
- "parameter": {
1075
- "type": "object",
1076
- "properties": {
1077
- "tool_config": {
1078
- "type": "string",
1079
- "description": "JSON string containing the complete tool configuration including current implementation"
1080
- },
1081
- "quality_evaluation": {
1082
- "type": "string",
1083
- "description": "JSON string containing quality evaluation results and feedback"
1084
- }
1085
- },
1086
- "required": [
1087
- "tool_config",
1088
- "quality_evaluation"
1089
- ]
1090
- },
1091
- "configs": {
1092
- "api_type": "CHATGPT",
1093
- "model_id": "o4-mini-0416",
1094
- "temperature": 0.2,
1095
- "max_new_tokens": 4096,
1096
- "return_json": true
1097
- }
1098
- },
1099
729
  {
1100
730
  "type": "AgenticTool",
1101
731
  "name": "LabelGenerator",