LLMs, GenAI, RAG, agents, evaluation · insight-0632
Prefer narrow, purpose-built tools over generic ones like raw SQL or HTTP
- Evidence type
- practitioner heuristic
- Difficulty
- medium
- Roles
- Applied AI, ML engineer
- Industries
- aviation, banking
Summary: situation, action, reason, boundary
Situation
A customer-service agent gets a run_sql tool or a generic http_request tool "so it can handle anything".
Action
Replace generic tools with narrow ones whose parameters encode business limits, for example issue_voucher(booking_id, reason_code) with the amount computed server-side from policy.
Reason
Narrow interfaces make mistakes harder to express. Anthropic's guidance recommends tool arguments that make errors difficult, and OWASP names excessive functionality as a root cause of excessive agency.
Boundary
Production agents acting on customer, financial or operational data.
Symptom or risk
The model can read or change any table or call any endpoint, so one bad generation becomes a data leak or an unauthorised change.
Exceptions
Analyst copilots on read-only replicas with row-level security, where flexibility is the product.
Trade-offs
More tools to build and document; group them by task to keep each request's tool list short.
Pitfalls
Passing amounts or permissions chosen by the model straight to the backend.
Lessons and concepts
Claims and their sources
Anthropic's agent guidance recommends designing tools and their arguments so mistakes are harder to make, and testing how the model uses them.
OWASP's Excessive Agency entry names excessive functionality as a root cause and recommends granular tools over open-ended ones such as a shell-command runner.