Tools are where agents interact with the real world. A well-designed tool is easy for the LLM to use correctly, hard to misuse, and returns results the LLM can reason about. Bad tool design is the most common reason agents underperform.
Don't build a do-everything tool with 15 optional parameters. Split it into focused tools. An LLM chooses better from specific options than generic ones.
Tool names should be obviously-related to their function. search_internal_docs is better than query_kb_v2.
The tool description is what the LLM reads to decide whether to call it. Write descriptions like you're briefing a new hire on when to use each tool. See tool descriptions matter.
2-4 parameters per tool is the sweet spot. 6+ parameters means the LLM will sometimes miss required ones or hallucinate values. Split or default.
Every optional parameter should have a sensible default. Makes it easier for the LLM to call the tool correctly on first try.
Constrained types (enums for fixed choices, integers for counts) reduce hallucination. Free-form strings invite mistakes.
Too coarse: do_everything_with_database(action, params)
Too fine: separate tools for start_transaction, insert_row, commit
Right: high-level intents like save_customer, find_orders_for_customer
Tool responses should be: