[PR #3381] fix: allow tool.execute.after hook to modify MCP tool output #10623

Closed
opened 2026-02-16 18:15:20 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3381

State: closed
Merged: Yes


Previously, the output string was extracted from MCP tool result.content before calling the "tool.execute.after" plugin hook, preventing plugins from modifying the output.

This fix moves the output extraction to after the hook is triggered, allowing plugins to modify result.content and have those changes reflected in the final tool output.

fixes: #3384

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3381 **State:** closed **Merged:** Yes --- Previously, the output string was extracted from MCP tool `result.content` before calling the `"tool.execute.after"` plugin hook, preventing plugins from modifying the output. This fix moves the output extraction to after the hook is triggered, allowing plugins to modify `result.content` and have those changes reflected in the final tool output. fixes: #3384
yindo added the pull-request label 2026-02-16 18:15:20 -05:00
yindo closed this issue 2026-02-16 18:15:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10623