You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Pass sessionID, model, and agent info to tool.definition hook #17954
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The tool.definition hook currently receives only { toolID: string } as input. Plugins that provide tools have no way to know which model or agent will use those tools, and lack session context, making it impossible to adapt tool descriptions or parameters based on model capabilities or session state.
Use case: Plugins providing advanced code exploration tools (symbol zoom, call graph navigation, AST pattern matching) alongside simple tools (read, write, edit) need to conditionally simplify or hide tool descriptions for less capable models that waste tokens on failed calls to advanced tools.
Proposed change: Pass sessionID, model ({ providerID, modelID }), and agent info through to the tool.definition hook. The model and agent variables are already in scope at the call site in ToolRegistry.tools(). Refactoring tools() to accept a single input object { model, sessionID, agent? } also makes the API cleaner for future additions.
This supersedes #17334 / #17331 by including sessionID alongside model and agent in a single change.
Activity
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.