Zero Labs
Industry News / AI

9 Tools. That’s All Your Agent Actually Needs.

Source · Towards AI By Elliott Girard

From the publisher’s feed, collected in the ZeroLabs newsroom.

You registered 47 tools. Your agent uses 6. But you could do the same thing with only 9 — and build every agent you’ll ever need on top of them.It’s Not Just About Tool SprawlYes, loading 40 tools at startup is a problem. I’ve written about it before — vague descriptions, selection confusion, wasted iteration budget. Every client audit I run hits the same wall: too many tools, too little clarity, and an agent that picks the wrong one half the time.But the real insight isn’t “use fewer tools.” It’s this: with the right 9 tools, you have a universal foundation for any agent. Trading agent, email assistant, research bot, calendar manager — the tools stay the same. What changes is the skills you load on top of them.After building agents for over a year — Wasaphi (trading), Izimail (email), calendar bots, and dozens of client projects — I’ve converged on this. Three categories, nine tools, and a skill system that turns them into anything.The Universal Agent Toolkit9 tools it’s all that matterNine tools. No more. Let me walk through each category and explain why they’re sufficient — and why you don’t need the 38 others you were planning to build.Category 1: File System (3 Tools)Your agent needs to interact with files. Not just “read a text file” — interact with a managed file system that handles any format, controls access, and scales from a local directory to enterprise shared storage.Tool 1: list_files@toolasync def list_files( path: str = "/", pattern: str = "*", recursive: bool = False) -> str: """List files in the agent's file system. USE WHEN: You need to discover what files are available, check if a file exists, or browse a directory. DO NOT USE: When you already know the exact file path. Returns: File names, sizes, types, and last modified dates. """ files = await file_system.list(path, pattern, recursive) return format_file_listing(files)This isn’t just os.listdir(). In a production agent, this tool abstracts over whatever storage backend you're using — local filesystem, S3, Google Drive, a shared enterprise NAS. The agent doesn't care where the files live. It calls list_files and gets a consistent response.In an enterprise context, this is where access control matters. User A sees their files. User B sees theirs. Shared folders respect permissions. The tool handles all of this behind the scenes — the LLM never needs to think about authorization.Tool 2: read_file@toolasync def read_file( path: str, format: str = "auto") -> str: """Read the contents of a file. USE WHEN: You need to access file contents for analysis, reference, or processing. Supports: .txt, .md, .csv, .json, .pdf, .docx, .xlsx, .html, .py, .yaml, and more. Returns: Extracted text content, formatted for readability. For structured files (CSV, JSON, XLSX): parsed and formatted. For documents (PDF, DOCX): extracted text with structure preserved. IMPORTANT: For large files (>50KB), content is automatically truncated with a summary. Use specific page/range parameters for targeted reading. """ content = await file_system.read(path, format) return sanitize_for_context(content, max_tokens=4000)The key word here is any format. Your agent shouldn’t need a separate tool for reading PDFs, another for CSVs, another for Word documents. One tool, one interface, format detection built in.The sanitize_for_context function is critical. A raw PDF dump can be 50,000 tokens. The tool reads the file, extracts the relevant content, and returns a context-friendly version that won't blow up your token budget. This is context engineering applied at the tool level.Tool 3: create_file@toolasync def create_file( path: str, content: str, format: str = "auto") -> str: """Create or overwrite a file. USE WHEN: You need to save analysis results, generate reports, export data, or create any persistent output. Supports: All text-based formats. For structured formats (CSV, JSON, XLSX), content is automatically formatted. Returns: Confirmation with file path and size. IMPORTANT: This overwrites existing files. Check with list_files first if unsure whether a file exists. """ result = await file_system.write(path, content, format) return f"File created: {result.path} ({result.size_human})"Same principle as read_file — one tool that handles every output format. The agent wants to create a CSV report? Pass structured data, the tool formats it. An HTML email template? A Markdown summary? A JSON export? One tool.Why These 3 Are EnoughI’ve seen agents with read_pdf, read_csv, read_docx, write_json, write_markdown, write_html, upload_to_s3, download_from_drive — 12 tools for what should be 3.Every additional tool in the file category adds description tokens, creates selection ambiguity, and increases the chance the agent calls the wrong one. “Should I use save_report or write_file or export_data?" — the LLM genuinely struggles with these distinctions when tool names overlap.Three tools. List, read, create. The format handling is an implementation detail behind the tool, not a tool selection decision for the LLM.In enterprise deployments, these three tools also become your security layer. All file access goes through them, so you have a single place to enforce permissions, audit access, log operations, and control what the agent can reach. Compare that to having 12 separate file tools, each needing its own security wrapper.Category 2: Internet Access (2 Tools)Your agent needs to access the internet. But not through a raw HTTP client — through a controlled, structured, security-aware interface.Tool 4: web_search@toolasync def web_search( query: str, max_results: int = 5) -> str: """Search the internet for current information. USE WHEN: You need facts, news, documentation, or any information that might be more current than your training data. DO NOT USE: When you need the full content of a specific URL (use web_fetch instead). Returns: Top results with titles, snippets, URLs, and dates. Results are pre-filtered for relevance and recency. """ results = await search_engine.search(query, max_results) return format_search_results(results)Tool 5: web_fetch@toolasync def web_fetch( url: str, extract: str = "text") -> str: """Fetch and extract content from a specific URL. USE WHEN: You have a specific URL and need its content. Typically used after web_search to get full article content. extract options: "text" (clean article text), "structured" (headers + content), "raw" (full HTML — use sparingly). Returns: Extracted content, sanitized and token-aware. IMPORTANT: Content is automatically truncated to prevent context overflow. For very long pages, key sections are prioritized. """ content = await fetcher.get(url, extract_mode=extract) return sanitize_for_context(content, max_tokens=6000)Why Two Tools, Not OneThe temptation is to build a single internet tool that searches and fetches. Don't.Search and fetch are fundamentally different operations. Search is discovery — “find me information about X.” Fetch is retrieval — “get me the content at this URL.” Combining them forces the LLM to specify what it wants in one call, which leads to either overly broad searches that waste tokens or missed opportunities to dig deeper into specific results.The separation also matters for security. In enterprise deployments, web_search might go through a proxy that filters results. web_fetch might have a domain allowlist. A firewall might permit searching but block fetching certain domains. You want these controls at the tool level, not buried inside a monolithic internet tool.The Token Control IssueThis is where most implementations get dangerous. A raw web_fetch can return 100,000+ tokens of HTML. If that goes into your context window uncontrolled, you've just burned your entire budget on one page.Both tools need built-in token management:Search results are pre-summarized with snippets, not full contentFetched pages are extracted to clean text, not raw HTMLContent is automatically truncated with intelligent summarizationToken limits are configurable per callThis isn’t optional. It’s the difference between an agent that works and one that silently degrades as it fills its context with web garbage.Category 3: Command Execution (1 Tool)This is the most powerful tool in the toolkit — and the most dangerous.Tool 6: execute_command@toolasync def execute_command( command: str, timeout: int = 30, working_dir: str = "/workspace") -> str: """Execute a system command. USE WHEN: You need to run scripts, install packages, process data with CLI tools, or perform any operation that requires system-level access. Returns: stdout, stderr, and exit code. SECURITY: Commands run in a sandboxed environment with limited permissions. Destructive operations require confirmation. IMPORTANT: Prefer specific tools when available. Use execute_command only when no loaded skill covers the task. """ result = await sandbox.run(command, timeout, working_dir) return format_command_result(result)Why This Single Tool Changes EverythingHere’s the insight that took me months to internalize: execute_command is a meta-capability. Combined with the file system tools, it can do literally anything a computer can do.Need to process an image? Write a Python script with create_file, run it with execute_command.Need to convert a PDF to text using a specific library? execute_command with the right CLI call.Need to query a database? Run a SQL client through execute_command.Need to deploy something? Run the deployment script.But here’s where it connects to skills in a way that changes the whole architecture. Stick with me — this is the key to the entire article.“The Doctor has his sonic screwdriver. Your agent has execute_command.”Category 4: Skill Management (3 Tools)If the first six tools are the agent’s hands, the skill system is its ability to learn new capabilities on demand. But not the way you might think.In my previous articles on skill servers, I described skills that inject tools — registering new function calls when loaded, unregistering them when unloaded. That approach works and I still use it for certain architectures.But here I’m talking about a simpler, more powerful model: a skill is just a prompt.Skills Are Context, Not ToolsA skill is a SKILL.md file — a Markdown document that teaches the agent how to accomplish something using the 6 tools it already has. No new tools are registered. No new function calls appear. The agent simply receives knowledge about how to use its existing tools for a specific domain.Think about it. Your agent already has read_file, create_file, execute_command, web_search, and web_fetch. With the right instructions, it can:Analyze stocks (read data files, run analysis scripts, search for news)Draft emails (create HTML templates, fetch contact info, run a send script)Process data (read CSVs, run Python scripts, create output files)Query databases (run SQL clients via execute_command, read results)The agent doesn’t need new tools for any of this. It needs knowledge about how to combine its existing tools. That’s what a skill provides.# SKILL.md — Financial Analysis## What This Skill DoesAnalyze stocks using price data, sentiment, and technical indicators.## Available Scripts- `scripts/fetch_stock_data.py` — Fetches price, volume, and fundamentals Usage: `python scripts/fetch_stock_data.py --ticker NVDA --period 30d` Returns: JSON file at `output/stock_data_{ticker}.json`- `scripts/sentiment_analysis.py` — Reddit + news sentiment scoring Usage: `python scripts/sentiment_analysis.py --ticker NVDA` Returns: JSON with momentum_score, sentiment_ratio, volume_score- `scripts/generate_report.py` — Creates formatted HTML report Usage: `python scripts/generate_report.py --ticker NVDA --format html` Returns: HTML file at `output/report_{ticker}.html`## Workflow1. Always fetch stock data first with fetch_stock_data.py2. Run sentiment analysis in parallel if social data is needed3. Generate report only after all data is collected4. Use read_file to check output files before presenting to user## Interpretation Guidelines- momentum_score > 3.5 = strong signal, - sentiment_ratio > 0.7 = strongly bullish, - Always cross-reference sentiment with price action before recommending## When NOT to Use- For simple price checks, just use web_search directly- For historical data beyond 1 year, use web_fetch on Yahoo FinanceSee what happened? No new tools were registered. The agent gained a complete financial analysis capability through context — instructions on which scripts to run with execute_command, which files to read, and how to interpret the results.This is why execute_command changes everything. It transforms every script into a capability the agent can use, and skills tell the agent which scripts exist and how to use them.Tool 7: list_skills@toolasync def list_skills() -> str: """List all available skills the agent can load. USE WHEN: You need a capability you don't currently have, or want to check what's available before starting a task. Returns: Skill catalog with names, short descriptions, and current status (loaded/available). """ skills = await skill_server.list() return format_skill_catalog(skills, loaded=active_skills)Tool 8: load_skill@toolasync def load_skill(skill_id: str) -> str: """Load a skill to gain operational knowledge and context. USE WHEN: You need specific domain capabilities for the current task. Returns: The full SKILL.md content — instructions, available scripts, workflows, interpretation guidelines, and domain knowledge. NOTE: This does NOT add new tools. It gives you the knowledge to use your existing tools (especially execute_command) for a specific domain. """ skill = await skill_server.load(skill_id) active_skills.add(skill_id) return skill.context # The SKILL.md contentThe magic is in what gets returned: a rich, detailed prompt that teaches the agent an entire domain. Because the skill is just context — not tool registrations — the agent’s tool count stays at 9. Always. The only thing that changes is what the agent knows how to do with those 9 tools.Tool 9: unload_skill@toolasync def unload_skill(skill_id: str) -> str: """Unload a skill to free context space. USE WHEN: You're done with a task domain and switching to something else, or context is getting heavy. Returns: Confirmation with a summary of what was accomplished. """ summary = summarize_skill_usage(skill_id, conversation_history) active_skills.discard(skill_id) # Clean the context clean_skill_context(skill_id, keep_summary=summary) return f"Skill '{skill_id}' unloaded. Summary: {summary}"The Unload Problem (The Hard Part)Loading a skill is easy — inject the SKILL.md content into the context. Unloading is where it gets genuinely difficult, and it’s the most advanced piece of context engineering in this whole architecture.When the agent used a skill, here’s what happened in the conversation context:The SKILL.md prompt was injected (500–2,000 tokens of instructions)The agent called execute_command to run scripts (each call + result = 200–1,000 tokens)The agent read output files with read_file (potentially thousands of tokens of data)The agent reasoned about the results (more tokens)Unloading means cleaning all of that up:Remove the SKILL.md prompt from the context. Those instructions are no longer needed — the agent isn’t doing financial analysis anymore.Remove the script execution details. The raw stdout of python fetch_stock_data.py --ticker NVDA doesn't need to persist. The specific command, the raw output, the intermediate file contents — gone.Keep a compressed summary. “Analyzed NVDA: bullish sentiment 73%, price at $185, generated report at output/report_NVDA.html.” Fifty tokens instead of three thousand.def clean_skill_context(skill_id: str, keep_summary: str): """Remove skill artifacts from context, keep compressed trace.""" # Remove the SKILL.md injection remove_skill_prompt(skill_id) # Find all execute_command calls that ran this skill's scripts skill_executions = find_skill_script_calls(skill_id) for execution in skill_executions: # Remove the command call details conversation.remove(execution.call_message) # Remove the raw output conversation.remove(execution.result_message) # Also remove read_file calls for skill output files skill_file_reads = find_skill_file_reads(skill_id) for read in skill_file_reads: conversation.remove(read.call_message) conversation.remove(read.result_message) # Inject compressed summary in place conversation.inject_system_note( f"[Skill '{skill_id}' was used. Result: {keep_summary}]" )The result: your agent loaded a financial analysis skill, ran 3 scripts, read 4 output files, generated a report — and after unloading, all of that is compressed into a single-line summary. The agent remembers what it accomplished without carrying the weight.This is advanced context engineering, and I’ll be writing dedicated articles on the techniques for surgical context cleaning. For now, the key takeaway: unloading isn’t just “forget the skill.” It’s “compress everything that happened into the minimum information needed to maintain conversational coherence.”Why This Model Is Different From Tool-Based SkillsIn my previous article Two Ways to Build a Skill Server, I described skills that register and unregister tools — the agent literally gains and loses function calls as skills load and unload. That model works well when you have a proper skill server with an execution engine.This article describes a different approach: skills as pure context. The SKILL.md file teaches the agent to use its existing tools (especially execute_command) for a new domain. Scripts provide the specialized logic. The agent's tool count never changes.Why does this matter?Portability. Any agent with these 9 tools can load any skill. You don’t need framework-specific tool registration. You don’t need a skill execution engine. A SKILL.md file works with LlamaIndex, LangChain, Claude Code, or a raw API call — anything that can inject a prompt and call tools.Simplicity. No dynamic tool registration, no schema management, no unregister logic. The agent always has the same 9 tools. Skills just add knowledge.The execution tool is the universal adapter. Any script — Python, bash, Node, whatever — becomes a capability through execute_command. The skill just tells the agent which scripts exist and how to call them. This is why execute_command is the most important tool in the toolkit: it turns skills from instructions into actions.Skill it’s just context and shell tool output !How It All Fits TogetherLet me trace a real interaction:An exemple to understand the whole system togetherCompare this to the alternative: 4 financial tools + 2 email tools + all the other tools permanently loaded = 40+ tool descriptions competing for context space, even for a simple “what time is it?” query.The NumbersHere’s what this architecture looks like in practice, measured across my agent projects:Metric 40+ tools loaded 9 tools + skills Context at startup 12,000–15,000 tokens 1,500–2,000 tokens Tool selection accuracy ~60% ~95% Average iteration cost $0.08/query $0.02/query Time to add new capability Redeploy agent Drop a SKILL.md file Agent “confused” rate 1 in 3 queries 1 in 20 queriesThe 95% tool selection accuracy isn’t because the model got smarter. It’s because with 9 clearly differentiated tools, there’s almost no ambiguity. read_file and web_fetch don't overlap. web_search and list_skills don't compete. The LLM has clear, distinct choices.But What About [Specific Tool X]?“My agent needs a database tool.” That’s a skill. The SKILL.md explains how to use execute_command to run a SQL client, which scripts handle common queries, how to format results. Or even simpler: execute_command("psql -c 'SELECT * FROM users LIMIT 10'").“My agent needs to send emails.” Skill. The SKILL.md provides scripts for email sending, formatting guidelines, security constraints, and workflow tips. The agent uses execute_command to run the send script.“My agent always needs calendar access.” If it always needs it, keep the calendar skill permanently loaded. A permanently loaded skill is just a permanent prompt addition — it doesn’t change the tool count, it just adds persistent domain knowledge.“What about MCP servers?” MCP servers are a delivery mechanism, not a contradiction. Your 9 tools can live behind MCP for portability. Skills can be served from an MCP skill server. The architecture works whether your tools are native functions, MCP endpoints, or API calls.The Implementation PathWeek 1: File system + execution. list_files, read_file, create_file, execute_command. Your agent can already do a surprising amount with just these four. Read data, process it, save results.Week 2: Internet access. Add web_search and web_fetch. Now it can research, validate, and pull in external knowledge.Week 3: Skill management. Implement list_skills, load_skill, unload_skill with 2–3 initial SKILL.md files. Take the domain-specific tools you were going to hardcode and convert them into skills with scripts.Week 4+: Build skills, not tools. Every new capability is a SKILL.md + optional scripts. The agent learns new domains through context, not through tool registration.The Honest CaveatThis framework has one limitation: skill loading adds latency. list_skills, then load_skill, then the actual work — that's 2–3 extra iterations.For single-purpose agents where every interaction is the same type, permanent tools (or a permanently loaded skill) are faster. You don’t need the load/unload cycle if the agent always does financial analysis and nothing else.But for general-purpose agents, multi-domain agents, or any agent where the task varies — the skill approach wins overwhelmingly. Two extra iterations is a small price for 75% less context pollution and 95% tool selection accuracy.The Bottom LineStop building tools. Start building skills.Your agent doesn’t need 47 tools loaded at startup. It needs 9 core tools that cover the universal operations — files, internet, execution, and skill management. Everything domain-specific becomes a SKILL.md file with optional scripts. Loaded when needed. Unloaded and compressed when done.The agents that work in production aren’t the ones with the most capabilities. They’re the ones where every token in the context window earns its place.Nine tools. Unlimited skills. That’s the architecture.Thanks for reading! I’m Elliott, a Python & Agentic AI consultant and entrepreneur. I write weekly about the agents I build, the architecture decisions behind them, and the patterns that actually work in production.If this framework resonated with your own tool sprawl experiences, I’d appreciate a few claps 👏 and a follow. And if you’ve found a different minimal toolkit that works for your agents — I’d love to hear about it in the comments.9 Tools. That’s All Your Agent Actually Needs. was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.