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.
- tooluniverse/__init__.py +57 -1
- tooluniverse/admetai_tool.py +1 -1
- tooluniverse/agentic_tool.py +65 -17
- tooluniverse/base_tool.py +19 -8
- tooluniverse/blast_tool.py +132 -0
- tooluniverse/boltz_tool.py +3 -3
- tooluniverse/cache/result_cache_manager.py +167 -12
- tooluniverse/cbioportal_tool.py +42 -0
- tooluniverse/clinvar_tool.py +268 -74
- tooluniverse/compose_scripts/drug_safety_analyzer.py +1 -1
- tooluniverse/compose_scripts/multi_agent_literature_search.py +1 -1
- tooluniverse/compose_scripts/output_summarizer.py +4 -4
- tooluniverse/compose_scripts/tool_discover.py +1941 -443
- tooluniverse/compose_scripts/tool_graph_composer.py +1 -1
- tooluniverse/compose_scripts/tool_metadata_generator.py +1 -1
- tooluniverse/compose_tool.py +9 -9
- tooluniverse/core_tool.py +2 -2
- tooluniverse/ctg_tool.py +4 -4
- tooluniverse/custom_tool.py +1 -1
- tooluniverse/data/agentic_tools.json +0 -370
- tooluniverse/data/alphafold_tools.json +6 -6
- tooluniverse/data/blast_tools.json +112 -0
- tooluniverse/data/cbioportal_tools.json +87 -0
- tooluniverse/data/clinvar_tools.json +235 -0
- tooluniverse/data/compose_tools.json +0 -89
- tooluniverse/data/dbsnp_tools.json +275 -0
- tooluniverse/data/emdb_tools.json +61 -0
- tooluniverse/data/ensembl_tools.json +259 -0
- tooluniverse/data/file_download_tools.json +275 -0
- tooluniverse/data/geo_tools.json +200 -48
- tooluniverse/data/gnomad_tools.json +109 -0
- tooluniverse/data/gtopdb_tools.json +68 -0
- tooluniverse/data/gwas_tools.json +32 -0
- tooluniverse/data/interpro_tools.json +199 -0
- tooluniverse/data/jaspar_tools.json +70 -0
- tooluniverse/data/kegg_tools.json +356 -0
- tooluniverse/data/mpd_tools.json +87 -0
- tooluniverse/data/ols_tools.json +314 -0
- tooluniverse/data/package_discovery_tools.json +64 -0
- tooluniverse/data/packages/categorized_tools.txt +0 -1
- tooluniverse/data/packages/machine_learning_tools.json +0 -47
- tooluniverse/data/paleobiology_tools.json +91 -0
- tooluniverse/data/pride_tools.json +62 -0
- tooluniverse/data/pypi_package_inspector_tools.json +158 -0
- tooluniverse/data/python_executor_tools.json +341 -0
- tooluniverse/data/regulomedb_tools.json +50 -0
- tooluniverse/data/remap_tools.json +89 -0
- tooluniverse/data/screen_tools.json +89 -0
- tooluniverse/data/tool_discovery_agents.json +428 -0
- tooluniverse/data/tool_discovery_agents.json.backup +1343 -0
- tooluniverse/data/uniprot_tools.json +77 -0
- tooluniverse/data/web_search_tools.json +250 -0
- tooluniverse/data/worms_tools.json +55 -0
- tooluniverse/dataset_tool.py +2 -2
- tooluniverse/dbsnp_tool.py +196 -58
- tooluniverse/default_config.py +36 -3
- tooluniverse/emdb_tool.py +30 -0
- tooluniverse/enrichr_tool.py +14 -14
- tooluniverse/ensembl_tool.py +140 -47
- tooluniverse/execute_function.py +594 -29
- tooluniverse/extended_hooks.py +4 -4
- tooluniverse/file_download_tool.py +269 -0
- tooluniverse/gene_ontology_tool.py +1 -1
- tooluniverse/generate_tools.py +3 -3
- tooluniverse/geo_tool.py +81 -28
- tooluniverse/gnomad_tool.py +100 -52
- tooluniverse/gtopdb_tool.py +41 -0
- tooluniverse/humanbase_tool.py +10 -10
- tooluniverse/interpro_tool.py +72 -0
- tooluniverse/jaspar_tool.py +30 -0
- tooluniverse/kegg_tool.py +230 -0
- tooluniverse/logging_config.py +2 -2
- tooluniverse/mcp_client_tool.py +57 -129
- tooluniverse/mcp_integration.py +52 -49
- tooluniverse/mcp_tool_registry.py +147 -528
- tooluniverse/mpd_tool.py +42 -0
- tooluniverse/ncbi_eutils_tool.py +96 -0
- tooluniverse/ols_tool.py +435 -0
- tooluniverse/openalex_tool.py +8 -8
- tooluniverse/openfda_tool.py +2 -2
- tooluniverse/output_hook.py +15 -15
- tooluniverse/package_discovery_tool.py +217 -0
- tooluniverse/package_tool.py +1 -1
- tooluniverse/paleobiology_tool.py +30 -0
- tooluniverse/pmc_tool.py +2 -2
- tooluniverse/pride_tool.py +30 -0
- tooluniverse/pypi_package_inspector_tool.py +593 -0
- tooluniverse/python_executor_tool.py +711 -0
- tooluniverse/regulomedb_tool.py +30 -0
- tooluniverse/remap_tool.py +44 -0
- tooluniverse/remote/boltz/boltz_mcp_server.py +1 -1
- tooluniverse/remote/depmap_24q2/depmap_24q2_mcp_tool.py +3 -3
- tooluniverse/remote/immune_compass/compass_tool.py +3 -3
- tooluniverse/remote/pinnacle/pinnacle_tool.py +2 -2
- tooluniverse/remote/transcriptformer/transcriptformer_tool.py +3 -3
- tooluniverse/remote/uspto_downloader/uspto_downloader_mcp_server.py +3 -3
- tooluniverse/remote_tool.py +4 -4
- tooluniverse/screen_tool.py +44 -0
- tooluniverse/scripts/filter_tool_files.py +2 -2
- tooluniverse/smcp.py +93 -12
- tooluniverse/smcp_server.py +100 -21
- tooluniverse/space/__init__.py +46 -0
- tooluniverse/space/loader.py +133 -0
- tooluniverse/space/validator.py +353 -0
- tooluniverse/tool_finder_embedding.py +5 -3
- tooluniverse/tool_finder_keyword.py +12 -10
- tooluniverse/tool_finder_llm.py +12 -8
- tooluniverse/tools/{UCSC_get_genes_by_region.py → BLAST_nucleotide_search.py} +22 -26
- tooluniverse/tools/BLAST_protein_search.py +63 -0
- tooluniverse/tools/ClinVar_search_variants.py +26 -15
- tooluniverse/tools/CodeQualityAnalyzer.py +3 -3
- tooluniverse/tools/EMDB_get_structure.py +46 -0
- tooluniverse/tools/GtoPdb_get_targets.py +52 -0
- tooluniverse/tools/InterPro_get_domain_details.py +46 -0
- tooluniverse/tools/InterPro_get_protein_domains.py +49 -0
- tooluniverse/tools/InterPro_search_domains.py +52 -0
- tooluniverse/tools/JASPAR_get_transcription_factors.py +52 -0
- tooluniverse/tools/MPD_get_phenotype_data.py +59 -0
- tooluniverse/tools/PRIDE_search_proteomics.py +52 -0
- tooluniverse/tools/PackageAnalyzer.py +55 -0
- tooluniverse/tools/Paleobiology_get_fossils.py +52 -0
- tooluniverse/tools/PyPIPackageInspector.py +59 -0
- tooluniverse/tools/ReMap_get_transcription_factor_binding.py +59 -0
- tooluniverse/tools/ReferenceInfoAnalyzer.py +55 -0
- tooluniverse/tools/RegulomeDB_query_variant.py +46 -0
- tooluniverse/tools/SCREEN_get_regulatory_elements.py +59 -0
- tooluniverse/tools/{ArgumentDescriptionOptimizer.py → TestResultsAnalyzer.py} +13 -13
- tooluniverse/tools/ToolDiscover.py +11 -11
- tooluniverse/tools/UniProt_id_mapping.py +63 -0
- tooluniverse/tools/UniProt_search.py +63 -0
- tooluniverse/tools/UnifiedToolGenerator.py +59 -0
- tooluniverse/tools/WoRMS_search_species.py +49 -0
- tooluniverse/tools/XMLToolOptimizer.py +55 -0
- tooluniverse/tools/__init__.py +119 -29
- tooluniverse/tools/_shared_client.py +3 -3
- tooluniverse/tools/alphafold_get_annotations.py +3 -3
- tooluniverse/tools/alphafold_get_prediction.py +3 -3
- tooluniverse/tools/alphafold_get_summary.py +3 -3
- tooluniverse/tools/cBioPortal_get_cancer_studies.py +46 -0
- tooluniverse/tools/cBioPortal_get_mutations.py +52 -0
- tooluniverse/tools/{gnomAD_query_variant.py → clinvar_get_clinical_significance.py} +8 -11
- tooluniverse/tools/clinvar_get_variant_details.py +49 -0
- tooluniverse/tools/dbSNP_get_variant_by_rsid.py +7 -7
- tooluniverse/tools/dbsnp_get_frequencies.py +46 -0
- tooluniverse/tools/dbsnp_search_by_gene.py +52 -0
- tooluniverse/tools/download_binary_file.py +66 -0
- tooluniverse/tools/download_file.py +71 -0
- tooluniverse/tools/download_text_content.py +55 -0
- tooluniverse/tools/dynamic_package_discovery.py +59 -0
- tooluniverse/tools/ensembl_get_sequence.py +52 -0
- tooluniverse/tools/{Ensembl_lookup_gene_by_symbol.py → ensembl_get_variants.py} +11 -11
- tooluniverse/tools/ensembl_lookup_gene.py +46 -0
- tooluniverse/tools/geo_get_dataset_info.py +46 -0
- tooluniverse/tools/geo_get_sample_info.py +46 -0
- tooluniverse/tools/geo_search_datasets.py +67 -0
- tooluniverse/tools/gnomad_get_gene_constraints.py +49 -0
- tooluniverse/tools/kegg_find_genes.py +52 -0
- tooluniverse/tools/kegg_get_gene_info.py +46 -0
- tooluniverse/tools/kegg_get_pathway_info.py +46 -0
- tooluniverse/tools/kegg_list_organisms.py +44 -0
- tooluniverse/tools/kegg_search_pathway.py +46 -0
- tooluniverse/tools/ols_find_similar_terms.py +63 -0
- tooluniverse/tools/{get_hyperopt_info.py → ols_get_ontology_info.py} +13 -10
- tooluniverse/tools/ols_get_term_ancestors.py +67 -0
- tooluniverse/tools/ols_get_term_children.py +67 -0
- tooluniverse/tools/{TestCaseGenerator.py → ols_get_term_info.py} +12 -9
- tooluniverse/tools/{CodeOptimizer.py → ols_search_ontologies.py} +22 -14
- tooluniverse/tools/ols_search_terms.py +71 -0
- tooluniverse/tools/python_code_executor.py +79 -0
- tooluniverse/tools/python_script_runner.py +79 -0
- tooluniverse/tools/web_api_documentation_search.py +63 -0
- tooluniverse/tools/web_search.py +71 -0
- tooluniverse/uniprot_tool.py +219 -16
- tooluniverse/url_tool.py +19 -1
- tooluniverse/uspto_tool.py +1 -1
- tooluniverse/utils.py +12 -12
- tooluniverse/web_search_tool.py +229 -0
- tooluniverse/worms_tool.py +64 -0
- {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/METADATA +8 -3
- {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/RECORD +184 -92
- tooluniverse/data/genomics_tools.json +0 -174
- tooluniverse/tools/ToolDescriptionOptimizer.py +0 -67
- tooluniverse/tools/ToolImplementationGenerator.py +0 -67
- tooluniverse/tools/ToolOptimizer.py +0 -59
- tooluniverse/tools/ToolSpecificationGenerator.py +0 -67
- tooluniverse/tools/ToolSpecificationOptimizer.py +0 -63
- tooluniverse/ucsc_tool.py +0 -60
- {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/WHEEL +0 -0
- {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/entry_points.txt +0 -0
- {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/licenses/LICENSE +0 -0
- {tooluniverse-1.0.9.1.dist-info → tooluniverse-1.0.11.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "SCREENRESTTool",
|
|
4
|
+
"name": "SCREEN_get_regulatory_elements",
|
|
5
|
+
"description": "Get candidate cis-regulatory elements (cCREs) from SCREEN database for specific genomic regions",
|
|
6
|
+
"parameter": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"gene_name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Gene symbol to search for regulatory elements (e.g., BRCA1, TP53)"
|
|
12
|
+
},
|
|
13
|
+
"element_type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Type of regulatory element (promoter, enhancer, insulator)",
|
|
16
|
+
"default": "enhancer"
|
|
17
|
+
},
|
|
18
|
+
"limit": {
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"description": "Number of results to return",
|
|
21
|
+
"default": 10,
|
|
22
|
+
"minimum": 1,
|
|
23
|
+
"maximum": 50
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": [
|
|
27
|
+
"gene_name"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"fields": {
|
|
31
|
+
"endpoint": "https://www.encodeproject.org/search/?type=Experiment&assay_title=ChIP-seq&target.label={gene_name}&biosample_ontology.classification=cell_line&format=json&limit={limit}",
|
|
32
|
+
"return_format": "JSON"
|
|
33
|
+
},
|
|
34
|
+
"return_schema": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"regulatory_elements": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"accession": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"assay_title": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"target": {
|
|
49
|
+
"type": "object"
|
|
50
|
+
},
|
|
51
|
+
"biosample_ontology": {
|
|
52
|
+
"type": "object"
|
|
53
|
+
},
|
|
54
|
+
"description": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"gene_name": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"element_type": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"count": {
|
|
67
|
+
"type": "integer"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"test_examples": [
|
|
72
|
+
{
|
|
73
|
+
"gene_name": "BRCA1",
|
|
74
|
+
"element_type": "enhancer",
|
|
75
|
+
"limit": 5
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"gene_name": "TP53",
|
|
79
|
+
"element_type": "promoter",
|
|
80
|
+
"limit": 3
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"gene_name": "MYC",
|
|
84
|
+
"element_type": "enhancer",
|
|
85
|
+
"limit": 5
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
]
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "AgenticTool",
|
|
4
|
+
"name": "UnifiedToolGenerator",
|
|
5
|
+
"description": "Generates complete ToolUniverse tools using simplified XML format that simultaneously creates both implementation code and specification",
|
|
6
|
+
"prompt": "You are an expert tool architect. Generate a complete ToolUniverse tool with both implementation code and specification simultaneously.\n\n## INPUT\nTool Description: {tool_description}\nReference Information: \n{reference_info}\nTemplate Structure: \n{xml_template}\n\n## TASK\nGenerate a tool that follows the exact XML structure shown in xml_template, filling in both the code and spec sections with complete, functional content.\n\n## CODE SECTION REQUIREMENTS\n\n1. **Structure & Imports**\n - Include ALL necessary imports at the top\n - Use @register_tool decorator with camelCase tool name\n - Inherit from BaseTool\n - Implement __init__(self, tool_config=None) calling super().__init__(tool_config)\n - Implement run(self, arguments: Dict[str, Any]) -> Dict[str, Any]\n\n2. **Return Format**\n - Success: {\"status\": \"success\", \"data\": <result>}\n - Error: {\"status\": \"error\", \"error\": <error_message>}\n\n3. **Implementation Quality**\n - Write COMPLETE, EXECUTABLE code (not pseudocode or placeholders)\n - Validate all inputs properly\n - Handle edge cases (empty inputs, invalid types, boundary conditions)\n - Add comprehensive error handling with clear error messages\n - Use descriptive variable names\n - Add comments only for complex logic\n - Follow Python best practices (PEP 8)\n - Keep code clean and simple - avoid over-engineering\n\n4. **Package Selection** (use reference_info)\n - Prioritize packages mentioned in reference_info with high quality scores\n - Use Python standard library when possible\n - For external packages: prefer widely-used ones (requests, pandas, numpy, etc.)\n - Avoid obscure or unmaintained packages\n - Do NOT import packages that aren't actually used\n\n5. **Functionality**\n - Implement the core functionality completely\n - Make the tool actually work, not just a skeleton\n - Test logic should work with the provided test examples\n\n## SPEC SECTION REQUIREMENTS\n\n1. **Naming Conventions**\n - type: PascalCase class name (e.g., \"StringReverserTool\")\n - name: camelCase tool identifier (e.g., \"stringReverser\")\n - Ensure type matches the actual class name in code\n\n2. **Required Fields**\n - type: string (PascalCase class name)\n - name: string (camelCase identifier)\n - description: string (clear, concise description of what the tool does)\n - parameter: object (JSON Schema for input parameters)\n - return_schema: object (JSON Schema for return value)\n - test_examples: array (simplified format - just input objects)\n - label: array of strings (categorization tags)\n\n3. **Optional Fields**\n - Add custom fields if the tool needs specific configuration settings that the code will access via tool_config\n - implementation: string (optional strategy description)\n\n4. **Parameter Schema**\n - Use proper JSON Schema types (string, number, integer, boolean, object, array)\n - Include descriptions for each parameter\n - Mark required parameters in both properties (required: true) and required array\n - Provide reasonable constraints (min/max, enum values, patterns)\n\n5. **Return Schema**\n - Document the complete return structure\n - Include status, data, and error fields\n - Describe what data contains on success\n\n6. **Test Examples**\n - Provide 3-5 realistic test cases\n - Use simplified format: just the input object (e.g., {\"param1\": \"value1\"})\n - Cover different scenarios: normal cases, edge cases, different parameter combinations\n - Ensure test inputs match the parameter schema\n\n7. **Labels**\n - Add 3-5 relevant categorization labels\n - Use clear, searchable terms (e.g., \"string\", \"text-processing\", \"utility\")\n\n## PACKAGE RECOMMENDATION USAGE\n\nWhen reference_info contains package_recommendations:\n- Review the quality scores and reasoning\n- Use the highest-rated packages that fit the task\n- Consider alternatives if the top choice has constraints\n- Mention the package selection rationale briefly in comments if non-obvious\n\n## CRITICAL RULES\n\n1. Follow the EXACT XML structure from xml_template (no additions, no omissions)\n2. MUST wrap code and spec content in CDATA sections: <code><![CDATA[...]]></code>\n3. Return ONLY the XML content - no markdown code blocks, no explanations, no extra text\n4. Ensure the type field in spec exactly matches the class name in code\n5. Generate complete, working code - not templates or TODOs\n6. Make test examples that will actually work with your implementation\n\nGenerate production-ready, functional tools!",
|
|
7
|
+
"input_arguments": [
|
|
8
|
+
"tool_description",
|
|
9
|
+
"reference_info",
|
|
10
|
+
"xml_template"
|
|
11
|
+
],
|
|
12
|
+
"parameter": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"tool_description": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Description of the desired tool functionality"
|
|
18
|
+
},
|
|
19
|
+
"reference_info": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "JSON string containing curated reference information including API documentation and package recommendations"
|
|
22
|
+
},
|
|
23
|
+
"xml_template": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "XML template example showing the expected format with code and spec sections"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": [
|
|
29
|
+
"tool_description",
|
|
30
|
+
"reference_info",
|
|
31
|
+
"xml_template"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"configs": {
|
|
35
|
+
"api_type": "CHATGPT",
|
|
36
|
+
"model_id": "gpt-5",
|
|
37
|
+
"temperature": 1.0,
|
|
38
|
+
"max_new_tokens": 16000,
|
|
39
|
+
"return_json": false
|
|
40
|
+
},
|
|
41
|
+
"return_schema": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "XML-formatted tool definition with code and spec sections"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "AgenticTool",
|
|
48
|
+
"name": "XMLToolOptimizer",
|
|
49
|
+
"description": "Optimizes tools defined in XML format based on test results and quality feedback",
|
|
50
|
+
"prompt": "You are an expert code and spec optimizer. Optimize the XML-defined tool based on comprehensive context.\n\n## CURRENT XML TOOL\n{xml_tool}\n\n## OPTIMIZATION CONTEXT\n{optimization_context}\n\n## CRITICAL: CHECK FOR INSTRUCTIONS\n\nIf optimization_context contains an \"instruction\" field, follow it as TOP PRIORITY:\n- User refused dependencies → Use standard library only\n- Installation failed → Use different packages\n- Reimplementation required → Generate completely new approach\n\n## OPTIMIZATION STRATEGY\n\n### Analyze Test Results First\nIf test_results.test_details exists:\n1. Examine ALL test outputs - each test has `output.result`\n2. Look for error patterns in test outputs\n3. Check if errors are from:\n - Schema validation (spec issue - fix the <spec>)\n - Code execution (code issue - fix the <code>)\n - Both (fix both)\n4. Schema issues: Check \"required\" fields, parameter types, format\n5. Code issues: Check imports, logic, error handling\n\n### Fix Schema Issues (Common Problems)\nIf validation errors appear:\n- \"required\": true should be \"required\": [\"field1\", \"field2\"] (array format)\n- Check parameter types match tool expectations\n- Ensure return_schema matches actual returns\n- Verify all referenced fields exist\n\n### Fix Code Issues\nIf test outputs show errors:\n1. Analyze each error type from test outputs\n2. Identify root cause from error message\n3. Apply targeted fixes to the <code> section\n4. Ensure fixes don't break existing functionality\n\n### Improve Code Quality\n1. Simplify complex logic\n2. Remove unnecessary code\n3. Optimize algorithms and data structures\n4. Improve error handling\n5. Enhance input validation\n\n### Learn from History\n- Check improvement_history for past attempts\n- Avoid repeating failed approaches\n- If same error persists, completely change strategy\n\n## RESPONSE FORMAT\n\nReturn the optimized XML in the EXACT same format as xml_tool:\n\n<code><![CDATA[\n [optimized Python code]\n]]></code>\n<spec><![CDATA[\n [updated JSON spec if needed]\n]]></spec>\n\n## RULES\n1. Optimize BOTH <code> AND <spec> - spec issues are common causes of failures\n2. Keep the same XML structure with CDATA sections\n3. MUST wrap content in CDATA: <code><![CDATA[...]]></code>\n4. When fixing validation errors, update <spec> parameter.required field\n5. Maintain tool name and core functionality\n6. Ensure code is executable and syntactically correct\n7. Return ONLY the XML (no markdown blocks, no explanations)\n\nMake it work, make it simple, make it better!",
|
|
51
|
+
"input_arguments": [
|
|
52
|
+
"xml_tool",
|
|
53
|
+
"optimization_context"
|
|
54
|
+
],
|
|
55
|
+
"parameter": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {
|
|
58
|
+
"xml_tool": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "Current XML-formatted tool definition with code and spec sections"
|
|
61
|
+
},
|
|
62
|
+
"optimization_context": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "JSON string containing test results, quality feedback, iteration info, improvement history, and any special instructions"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"required": [
|
|
68
|
+
"xml_tool",
|
|
69
|
+
"optimization_context"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"configs": {
|
|
73
|
+
"api_type": "CHATGPT",
|
|
74
|
+
"model_id": "o4-mini",
|
|
75
|
+
"temperature": 1.0,
|
|
76
|
+
"max_new_tokens": 12000,
|
|
77
|
+
"return_json": false
|
|
78
|
+
},
|
|
79
|
+
"return_schema": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "Optimized XML-formatted tool definition"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"type": "AgenticTool",
|
|
86
|
+
"name": "ReferenceInfoAnalyzer",
|
|
87
|
+
"description": "Analyzes and curates reference information to provide high-quality context for tool generation",
|
|
88
|
+
"prompt": "You are an expert at analyzing technical documentation and extracting relevant information for tool development.\n\n## TASK\nAnalyze the collected reference information and extract the most relevant, high-quality context for generating a tool.\n\n## INPUT\nTool Description: {tool_description}\nRaw Reference Information: {raw_reference_info}\n\n## ANALYSIS PROCESS\n\n1. **Relevance Filtering**\n - Identify which documentation, packages, and examples are most relevant\n - Score each item by relevance (0-10)\n - Filter out low-quality or irrelevant information\n\n2. **Key Information Extraction**\n - Extract API endpoints, methods, parameters\n - Identify recommended packages and their purposes\n - Note common usage patterns and best practices\n - Capture important constraints or requirements\n\n3. **Context Curation**\n - Organize information by category (APIs, packages, examples)\n - Prioritize official documentation over third-party sources\n - Include code examples where available\n - Summarize complex information concisely\n\n4. **Package Recommendations**\n - List recommended packages with rationale\n - Note package purposes and key features\n - Identify potential alternatives\n - Flag any compatibility or dependency concerns\n\n## OUTPUT FORMAT\n\nReturn JSON:\n\n{\n \"curated_info\": {\n \"api_documentation\": [\n {\n \"source\": \"documentation source\",\n \"relevance_score\": 9,\n \"key_points\": [\"important point 1\", \"important point 2\"],\n \"url\": \"documentation URL\"\n }\n ],\n \"package_recommendations\": [\n {\n \"package_name\": \"package-name\",\n \"purpose\": \"what it's used for\",\n \"relevance_score\": 8,\n \"features\": [\"key feature 1\", \"key feature 2\"],\n \"alternatives\": [\"alternative package\"]\n }\n ],\n \"usage_examples\": [\n {\n \"description\": \"example description\",\n \"code_snippet\": \"example code\",\n \"source\": \"where found\"\n }\n ],\n \"best_practices\": [\n \"best practice 1\",\n \"best practice 2\"\n ],\n \"important_constraints\": [\n \"constraint or limitation to consider\"\n ]\n },\n \"summary\": \"Brief summary of key findings\",\n \"confidence_score\": 8.5,\n \"recommendations\": [\n \"Specific recommendation for implementation\"\n ]\n}\n\n## GUIDELINES\n- Be selective - quality over quantity\n- Prioritize actionable information\n- Provide specific, concrete details\n- Flag uncertainties or gaps in information\n- Focus on what's most helpful for code generation",
|
|
89
|
+
"input_arguments": [
|
|
90
|
+
"tool_description",
|
|
91
|
+
"raw_reference_info"
|
|
92
|
+
],
|
|
93
|
+
"parameter": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {
|
|
96
|
+
"tool_description": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"description": "Description of the tool being generated"
|
|
99
|
+
},
|
|
100
|
+
"raw_reference_info": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "JSON string containing raw reference information from web search and package discovery"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"required": [
|
|
106
|
+
"tool_description",
|
|
107
|
+
"raw_reference_info"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"configs": {
|
|
111
|
+
"api_type": "CHATGPT",
|
|
112
|
+
"model_id": "gpt-5",
|
|
113
|
+
"temperature": 1.0,
|
|
114
|
+
"max_new_tokens": 6000,
|
|
115
|
+
"return_json": true
|
|
116
|
+
},
|
|
117
|
+
"return_schema": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"properties": {
|
|
120
|
+
"curated_info": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"description": "Curated and organized reference information"
|
|
123
|
+
},
|
|
124
|
+
"summary": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"description": "Brief summary of key findings"
|
|
127
|
+
},
|
|
128
|
+
"confidence_score": {
|
|
129
|
+
"type": "number",
|
|
130
|
+
"description": "Confidence in the quality of curated information (0-10)"
|
|
131
|
+
},
|
|
132
|
+
"recommendations": {
|
|
133
|
+
"type": "array",
|
|
134
|
+
"items": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"description": "Specific recommendations for implementation"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"required": [
|
|
141
|
+
"curated_info",
|
|
142
|
+
"summary"
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"type": "AgenticTool",
|
|
148
|
+
"name": "PackageAnalyzer",
|
|
149
|
+
"description": "Analyzes package candidates and recommends the best options based on quality metrics and suitability",
|
|
150
|
+
"prompt": "You are an expert Python package evaluator. Analyze package candidates and recommend the best options.\n\n## TASK\nEvaluate packages for a tool and recommend the most suitable ones.\n\n## INPUT\nTool Description: {tool_description}\nPackage Candidates: {package_candidates}\n\n## EVALUATION CRITERIA\n\n1. **Functionality Match** (weight: 30%)\n - Does it provide required functionality?\n - How well does it match the use case?\n - Is it specifically designed for this purpose?\n\n2. **Quality Indicators** (weight: 25%)\n - Download statistics (popularity)\n - GitHub stars and activity\n - Version maturity (avoid 0.x if possible)\n - Last update recency\n\n3. **Maintenance** (weight: 20%)\n - Active development\n - Regular releases\n - Responsive maintainers\n - Issue resolution rate\n\n4. **Documentation** (weight: 15%)\n - Quality and completeness\n - Code examples\n - API reference\n - Tutorials available\n\n5. **Ecosystem** (weight: 10%)\n - Minimal dependencies\n - Python version compatibility\n - License compatibility\n - Community size\n\n## ANALYSIS PROCESS\n\n1. Score each package on criteria above (0-10)\n2. Calculate weighted total score\n3. Identify pros and cons\n4. Recommend top 3 packages\n5. Suggest implementation approach\n\n## OUTPUT FORMAT\n\nReturn JSON:\n\n{\n \"recommended_packages\": [\n {\n \"package_name\": \"package-name\",\n \"overall_score\": 8.5,\n \"scores\": {\n \"functionality_match\": 9,\n \"quality\": 8,\n \"maintenance\": 9,\n \"documentation\": 8,\n \"ecosystem\": 8\n },\n \"pros\": [\n \"Well-documented\",\n \"Actively maintained\",\n \"Popular and reliable\"\n ],\n \"cons\": [\n \"Slightly heavy dependencies\"\n ],\n \"usage_guidance\": \"Use for main functionality, handles X well\",\n \"installation\": \"pip install package-name\"\n }\n ],\n \"implementation_strategy\": \"Detailed recommendation on how to use these packages together\",\n \"alternatives\": [\n {\n \"package_name\": \"alternative\",\n \"reason\": \"Lighter weight but less features\"\n }\n ],\n \"warnings\": [\n \"Potential issue or consideration\"\n ]\n}\n\n## GUIDELINES\n- Prioritize well-maintained, popular packages\n- Favor packages with good documentation\n- Consider standard library alternatives\n- Be honest about limitations\n- Provide actionable recommendations",
|
|
151
|
+
"input_arguments": [
|
|
152
|
+
"tool_description",
|
|
153
|
+
"package_candidates"
|
|
154
|
+
],
|
|
155
|
+
"parameter": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"properties": {
|
|
158
|
+
"tool_description": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"description": "Description of the tool being generated"
|
|
161
|
+
},
|
|
162
|
+
"package_candidates": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"description": "JSON string containing package candidates with their metadata (from PyPI, search results, etc.)"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"required": [
|
|
168
|
+
"tool_description",
|
|
169
|
+
"package_candidates"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"configs": {
|
|
173
|
+
"api_type": "CHATGPT",
|
|
174
|
+
"model_id": "gpt-5",
|
|
175
|
+
"temperature": 1.0,
|
|
176
|
+
"max_new_tokens": 4000,
|
|
177
|
+
"return_json": true
|
|
178
|
+
},
|
|
179
|
+
"return_schema": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"properties": {
|
|
182
|
+
"recommended_packages": {
|
|
183
|
+
"type": "array",
|
|
184
|
+
"items": {
|
|
185
|
+
"type": "object"
|
|
186
|
+
},
|
|
187
|
+
"description": "Top recommended packages with detailed analysis"
|
|
188
|
+
},
|
|
189
|
+
"implementation_strategy": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"description": "How to use recommended packages together"
|
|
192
|
+
},
|
|
193
|
+
"alternatives": {
|
|
194
|
+
"type": "array",
|
|
195
|
+
"items": {
|
|
196
|
+
"type": "object"
|
|
197
|
+
},
|
|
198
|
+
"description": "Alternative packages to consider"
|
|
199
|
+
},
|
|
200
|
+
"warnings": {
|
|
201
|
+
"type": "array",
|
|
202
|
+
"items": {
|
|
203
|
+
"type": "string"
|
|
204
|
+
},
|
|
205
|
+
"description": "Potential issues or considerations"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"required": [
|
|
209
|
+
"recommended_packages",
|
|
210
|
+
"implementation_strategy"
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"type": "AgenticTool",
|
|
216
|
+
"name": "TestResultsAnalyzer",
|
|
217
|
+
"description": "Analyzes test execution results and extracts key issues for targeted optimization",
|
|
218
|
+
"prompt": "You are an expert test analyst. Analyze test results and identify root causes of failures.\n\n## TASK\nAnalyze test execution results and provide actionable insights for optimization.\n\n## INPUT\nTest Results: {test_results}\nTool Implementation: {tool_implementation}\n\n## ANALYSIS PROCESS\n\n1. **Error Pattern Recognition**\n - Group similar errors together\n - Identify recurring patterns\n - Classify error types (import, runtime, logic, etc.)\n\n2. **Root Cause Analysis**\n - Trace errors to their source\n - Identify underlying issues\n - Distinguish symptoms from causes\n\n3. **Impact Assessment**\n - Determine severity of each issue\n - Assess how many tests affected\n - Identify blocking vs. non-blocking issues\n\n4. **Solution Prioritization**\n - Rank issues by impact and fix difficulty\n - Identify quick wins\n - Flag complex issues needing major refactoring\n\n## OUTPUT FORMAT\n\nReturn JSON:\n\n{\n \"key_issues\": [\n {\n \"issue_type\": \"ImportError|AttributeError|TypeError|ValueError|LogicError\",\n \"description\": \"Clear description of the issue\",\n \"affected_tests\": 3,\n \"severity\": \"critical|high|medium|low\",\n \"root_cause\": \"Underlying reason for the failure\",\n \"suggested_fix\": \"Specific, actionable fix\",\n \"code_location\": \"Where the fix should be applied\"\n }\n ],\n \"optimization_priorities\": [\n {\n \"priority\": 1,\n \"focus_area\": \"Error handling|Input validation|Logic fix|Dependency issue\",\n \"description\": \"What needs to be optimized\",\n \"expected_impact\": \"How many tests this will fix\",\n \"difficulty\": \"easy|medium|hard\"\n }\n ],\n \"error_patterns\": [\n {\n \"pattern\": \"Description of recurring pattern\",\n \"occurrences\": 5,\n \"fix_approach\": \"How to fix this pattern\"\n }\n ],\n \"success_analysis\": {\n \"passing_tests\": 2,\n \"total_tests\": 5,\n \"success_rate\": 0.4,\n \"what_works_well\": [\"Aspect that's working correctly\"]\n },\n \"detailed_errors\": [\n {\n \"test_description\": \"Test that failed\",\n \"error_type\": \"ImportError\",\n \"error_message\": \"Exact error message\",\n \"traceback\": \"Relevant traceback lines\",\n \"analysis\": \"Why this error occurred\"\n }\n ],\n \"recommendations\": [\n \"Specific recommendation for improvement\"\n ]\n}\n\n## GUIDELINES\n- Focus on actionable insights\n- Provide specific, not generic, fixes\n- Prioritize high-impact issues\n- Be clear and concise\n- Include code-level details when possible",
|
|
219
|
+
"input_arguments": [
|
|
220
|
+
"test_results",
|
|
221
|
+
"tool_implementation"
|
|
222
|
+
],
|
|
223
|
+
"parameter": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"properties": {
|
|
226
|
+
"test_results": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"description": "JSON string containing test execution results with pass/fail status, error messages, and tracebacks"
|
|
229
|
+
},
|
|
230
|
+
"tool_implementation": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"description": "Current tool implementation code for context"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"required": [
|
|
236
|
+
"test_results",
|
|
237
|
+
"tool_implementation"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
"configs": {
|
|
241
|
+
"api_type": "CHATGPT",
|
|
242
|
+
"model_id": "gpt-5",
|
|
243
|
+
"temperature": 1.0,
|
|
244
|
+
"max_new_tokens": 5000,
|
|
245
|
+
"return_json": true
|
|
246
|
+
},
|
|
247
|
+
"return_schema": {
|
|
248
|
+
"type": "object",
|
|
249
|
+
"properties": {
|
|
250
|
+
"key_issues": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"items": {
|
|
253
|
+
"type": "object"
|
|
254
|
+
},
|
|
255
|
+
"description": "Main issues identified from test failures"
|
|
256
|
+
},
|
|
257
|
+
"optimization_priorities": {
|
|
258
|
+
"type": "array",
|
|
259
|
+
"items": {
|
|
260
|
+
"type": "object"
|
|
261
|
+
},
|
|
262
|
+
"description": "Prioritized list of optimization actions"
|
|
263
|
+
},
|
|
264
|
+
"error_patterns": {
|
|
265
|
+
"type": "array",
|
|
266
|
+
"items": {
|
|
267
|
+
"type": "object"
|
|
268
|
+
},
|
|
269
|
+
"description": "Recurring error patterns found"
|
|
270
|
+
},
|
|
271
|
+
"success_analysis": {
|
|
272
|
+
"type": "object",
|
|
273
|
+
"description": "Analysis of what's working well"
|
|
274
|
+
},
|
|
275
|
+
"detailed_errors": {
|
|
276
|
+
"type": "array",
|
|
277
|
+
"items": {
|
|
278
|
+
"type": "object"
|
|
279
|
+
},
|
|
280
|
+
"description": "Detailed breakdown of each error"
|
|
281
|
+
},
|
|
282
|
+
"recommendations": {
|
|
283
|
+
"type": "array",
|
|
284
|
+
"items": {
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
287
|
+
"description": "Overall recommendations"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"required": [
|
|
291
|
+
"key_issues",
|
|
292
|
+
"optimization_priorities"
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"type": "AgenticTool",
|
|
298
|
+
"name": "CodeQualityAnalyzer",
|
|
299
|
+
"description": "Analyzes code quality from multiple dimensions including algorithmic correctness, functional implementation capability, performance characteristics, and best practices. Provides detailed feedback and improvement suggestions.",
|
|
300
|
+
"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\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\n### 3. PERFORMANCE CHARACTERISTICS (0-10)\n- Time complexity analysis\n- Space complexity analysis\n- Computational efficiency\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\n### 5. ERROR HANDLING AND ROBUSTNESS (0-10)\n- Exception handling coverage\n- Input validation robustness\n- Error message clarity\n\n## OUTPUT FORMAT\n\nProvide your analysis in the following JSON format:\n\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 },\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 },\n \"recommendations\": [\n {\n \"priority\": \"high|medium|low\",\n \"description\": \"specific improvement description\",\n \"action\": \"concrete action to take\"\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\n- **When test_execution_results are available, prioritize actual behavior over theoretical analysis**",
|
|
301
|
+
"input_arguments": [
|
|
302
|
+
"tool_name",
|
|
303
|
+
"tool_description",
|
|
304
|
+
"tool_parameters",
|
|
305
|
+
"implementation_code",
|
|
306
|
+
"test_cases",
|
|
307
|
+
"test_execution_results"
|
|
308
|
+
],
|
|
309
|
+
"parameter": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"properties": {
|
|
312
|
+
"tool_name": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"description": "Name of the tool being analyzed"
|
|
315
|
+
},
|
|
316
|
+
"tool_description": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"description": "Description of what the tool is supposed to do"
|
|
319
|
+
},
|
|
320
|
+
"tool_parameters": {
|
|
321
|
+
"type": "string",
|
|
322
|
+
"description": "JSON string of tool parameters and their types"
|
|
323
|
+
},
|
|
324
|
+
"implementation_code": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"description": "The actual implementation code to analyze"
|
|
327
|
+
},
|
|
328
|
+
"test_cases": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"description": "JSON string of test cases for the tool"
|
|
331
|
+
},
|
|
332
|
+
"test_execution_results": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"description": "JSON string of test execution results including pass/fail status and actual outputs"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
"required": [
|
|
338
|
+
"tool_name",
|
|
339
|
+
"tool_description",
|
|
340
|
+
"tool_parameters",
|
|
341
|
+
"implementation_code",
|
|
342
|
+
"test_cases",
|
|
343
|
+
"test_execution_results"
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
"configs": {
|
|
347
|
+
"api_type": "CHATGPT",
|
|
348
|
+
"model_id": "o4-mini",
|
|
349
|
+
"temperature": 1.0,
|
|
350
|
+
"max_new_tokens": 8000,
|
|
351
|
+
"return_json": true
|
|
352
|
+
},
|
|
353
|
+
"return_schema": {
|
|
354
|
+
"type": "object",
|
|
355
|
+
"description": "Code quality analysis results including scores, feedback, and recommendations"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"type": "ComposeTool",
|
|
360
|
+
"name": "ToolDiscover",
|
|
361
|
+
"description": "Generates new ToolUniverse-compliant tools based on short descriptions using XML format for simultaneous code and specification generation. Automatically discovers similar tools, curates high-quality reference information, and iteratively optimizes the tool using agentic optimization.",
|
|
362
|
+
"parameter": {
|
|
363
|
+
"type": "object",
|
|
364
|
+
"properties": {
|
|
365
|
+
"tool_description": {
|
|
366
|
+
"type": "string",
|
|
367
|
+
"description": "Short description of the desired tool functionality"
|
|
368
|
+
},
|
|
369
|
+
"max_iterations": {
|
|
370
|
+
"type": "integer",
|
|
371
|
+
"description": "Maximum number of optimization iterations",
|
|
372
|
+
"default": 2
|
|
373
|
+
},
|
|
374
|
+
"save_to_file": {
|
|
375
|
+
"type": "boolean",
|
|
376
|
+
"description": "Whether to save the generated tool files",
|
|
377
|
+
"default": true
|
|
378
|
+
},
|
|
379
|
+
"output_file": {
|
|
380
|
+
"type": "string",
|
|
381
|
+
"description": "Optional file path to save the generated tool"
|
|
382
|
+
},
|
|
383
|
+
"save_dir": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"description": "Directory path to save the generated tool files (defaults to current working directory)",
|
|
386
|
+
"default": null
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"required": [
|
|
390
|
+
"tool_description"
|
|
391
|
+
]
|
|
392
|
+
},
|
|
393
|
+
"auto_load_dependencies": true,
|
|
394
|
+
"fail_on_missing_tools": false,
|
|
395
|
+
"required_tools": [],
|
|
396
|
+
"composition_file": "tool_discover.py",
|
|
397
|
+
"composition_function": "compose",
|
|
398
|
+
"return_schema": {
|
|
399
|
+
"type": "object",
|
|
400
|
+
"properties": {
|
|
401
|
+
"tool_config": {
|
|
402
|
+
"type": "object",
|
|
403
|
+
"description": "Generated tool configuration"
|
|
404
|
+
},
|
|
405
|
+
"quality_score": {
|
|
406
|
+
"type": "number",
|
|
407
|
+
"description": "Final quality score"
|
|
408
|
+
},
|
|
409
|
+
"saved_files": {
|
|
410
|
+
"type": "array",
|
|
411
|
+
"description": "List of saved files",
|
|
412
|
+
"items": {
|
|
413
|
+
"type": "string"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
"output_directory": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"description": "Directory where the files were saved"
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"required": [
|
|
422
|
+
"tool_config",
|
|
423
|
+
"quality_score",
|
|
424
|
+
"saved_files"
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
]
|