feat(mcp): forward plugin-set _meta to downstream MCP tool calls#21539
feat(mcp): forward plugin-set _meta to downstream MCP tool calls#21539moghtader wants to merge 3 commits intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, here are related PRs that might be relevant to this PR (excluding the current PR #21539): Related PRs:
These PRs all deal with enhancing the plugin hook system for tool execution, which is the same area being modified by PR #21539. |
df2283c to
5623429
Compare
Issue for this PR
Closes #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