Is your feature request related to a problem? Please describe.
It is currently difficult to handle extremely large responses from tool calls when building agent systems, as there is no middleware in the tool invocation chain for interception or truncation of tool results.
Describe alternatives you've considered
No response
Additional context
No response
Describe the thing to improve
Introduce a middleware system for the tool invocation process (similar to agent-like middlewares) that can intercept, transform, truncate, or otherwise process tool responses before returning the result to the user or downstream consumers.
Is your feature request related to a problem? Please describe.
It is currently difficult to handle extremely large responses from tool calls when building agent systems, as there is no middleware in the tool invocation chain for interception or truncation of tool results.
Describe alternatives you've considered
No response
Additional context
No response
Describe the thing to improve
Introduce a middleware system for the tool invocation process (similar to agent-like middlewares) that can intercept, transform, truncate, or otherwise process tool responses before returning the result to the user or downstream consumers.