[FEATURE] ToolBuild hooks: Pre & Post
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I'd like to be able to manipulate the list of tools sent to LLM based on the user query.
For this purpose, I'd like to have PreToolBuild and PostToolBuild hooks.
So I can add, remove, or modify tools, their properties and enums.
Neither MCP SPEC nor current hooks allow this.
Proposed Solution
Implement ToolBuild hooks so I could fire them at runtime and make manipulations with the tools the agent has based on the user query.
Alternative Solutions
A proxy server that intercepts and modifies the tools. Is a classy solution.
Priority
High - Significant impact on productivity
Feature Category
Configuration and settings
Use Case Example
I’d like to intelligently remove and modify unnecessary tools or optional and not relevant properties or enums to save tokens and have LLM focused.
Additional Context
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗