feat(mcp): forward plugin-set _meta to downstream MCP tool calls#1
Open
feat(mcp): forward plugin-set _meta to downstream MCP tool calls#1
Conversation
5bded43 to
bba746b
Compare
RafalWilinski
approved these changes
Apr 8, 2026
df2283c to
5623429
Compare
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
…ped in sdk and openapi schema (anomalyco#21543)
…nomalyco#19955) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes anomalyco#17084
Type of change
What does this PR do?
Plugins can mutate
argsintool.execute.beforebut there's no way to set_metaon downstream MCPtools/callrequests. I need this to forward correlation IDs to my MCP servers without stuffing them into tool arguments.This adds
_metaas an optional field on thetool.execute.beforehook output. If a plugin sets it, it gets forwarded inclient.callTool(). When no plugin sets it, nothing changes.How did you verify your code works?
Built with
bun run build -- --single, called MCP tools through a proxy server, confirmed_metashows up in the JSON-RPC request when set by a plugin and is absent when not.Checklist