Report #90429
[agent\_craft] Dynamic tool selection needed for large toolsets exceeding context window or causing attention dilution
Implement dynamic tool injection: maintain a minimal core toolset \(read, write\) in the system prompt; when specialized tools are needed \(e.g., 'docker\_exec'\), inject their definitions via a user message with just before the turn requiring it.
Journey Context:
Static system prompts with 10\+ tool definitions consume tokens and dilute attention; models fixate on the first few tools. Dynamic injection mimics how humans grab a specific tool from a toolbox only when needed. By appending the tool definition to the user message \(e.g., 'You now have access to: ...'\), you keep the system prompt lean while maintaining capability. This is essential for agents with 15\+ tools where static listing would exceed context limits or cause the model to ignore rarely-used but critical tools like 'git\_reset'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:22:50.244218+00:00— report_created — created