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
tool.execute.after hook receives raw MCP result instead of assembled output #21145
The tool.execute.after hook fires for MCP tools before the output text is assembled from the raw CallToolResult.content[] array. Plugins hooking this event receive the raw MCP SDK result (which has a content array of {type, text} objects) instead of the {title, output, metadata} shape declared in the Hooks type definition.
This means any plugin that tries to read or transform output.output gets undefined, and even if the plugin mutates the raw result, the text assembly rebuilds the output from result.content independently. The hook is effectively a no-op for MCP tool output transformation.
The Hooks type in packages/plugin/src/index.ts declares the output parameter as:
Activity
github-actions commentedon Apr 6, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.