-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Description
When Opencode calls an MCP tool it doesn't trigger the tool.execute.before and tool.execute.after hooks in the plugin system.
I'm not sure if there's a practical purpose for this but it makes it really difficult (impossible?) to attach session-level metadata to an mcp tool call or inject an argument or log the outputs effectively (altho we can listen to events for that).
It's also not intuitive that this wouldn't be the case. I'd expect either:
- MCP tool calls trigger these hooks just like normal
- There might be MCP specific hooks for plugins. This might be ideal because it would be nice to attach extra metadata to a request header or something beyond just the tool args.
I can open a PR if we think this would be useful, just curious if there's a reason why this isn't the behavior today
Metadata
Metadata
Assignees
Labels
No labels