SmolAgent_Studio / tools /tool_definitions.py
kavyas2912's picture
Upload 6 files
b09c19d verified
#tools/tool_definitions.py
TOOL_TIPS = {
"WebSearchTool": "πŸ” Search the web using DuckDuckGo, Brave, or SerpAPI.",
"VisitWebpageTool": "🌐 Fetch and convert a webpage into readable markdown.",
"PythonTool": "🐍 Execute Python code securely in a sandboxed environment.",
"PythonInterpreterTool": "πŸ§ͺ A stateful Python interpreter with retained execution context.",
"TerminalTool": "πŸ’» Run shell commands. Use with caution.",
"FileTool": "πŸ—‚οΈ Read, write, and manipulate local files for your agent.",
"ImageTool": "πŸ–ΌοΈ Handle image input/output β€” caption, generate, or analyze.",
"FinalAnswerTool": "βœ… Marks the final agent response to stop processing.",
"UserInputTool": "πŸ‘€ Allows dynamic user prompts mid-task.",
"LangChainTool": "πŸ”— Wrap LangChain tools like SerpAPI, SQL Toolkit, Wolfram Alpha.",
"HFModelDownloadsTool": "πŸ“Š Fetch most downloaded HF models for a given task.",
"ApiWebSearchTool": "πŸ›°οΈ Search APIs like Bing or Google for fresh results.",
"Tool.from_hub()": "πŸ“¦ Load external tools from Hugging Face Hub repos.",
"Tool.from_space()": "πŸ§ͺ Import Gradio Spaces as tools.",
"Tool.from_mcp()": "🧠 Load tools dynamically from registered MCP servers.",
"Tool.from_langchain()": "🧬 Convert LangChain tool definitions into SmolAgent-compatible formats.",
"Tool.from_gradio()": "πŸŽ›οΈ Wrap Gradio interfaces as callable tools.",
"ToolCollection.from_mcp()": "🌐 Fetch and register toolsets from Glama, Smithery, and other MCP providers."
}
βœ… This file gives you tooltip metadata for dynamic dropdowns, tool help panels, and config-driven rendering. You can link this file to model_config.json, or expand to include categories, icons, or flags like streaming=True.