Skip to content

feat(mcp): forward plugin-set _meta to downstream MCP tool calls#1

Open
moghtader wants to merge 16 commits intodevfrom
feat/mcp-forward-tool-use-id-meta
Open

feat(mcp): forward plugin-set _meta to downstream MCP tool calls#1
moghtader wants to merge 16 commits intodevfrom
feat/mcp-forward-tool-use-id-meta

Conversation

@moghtader
Copy link
Copy Markdown
Owner

Issue for this PR

Closes anomalyco#17084

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Plugins can mutate args in tool.execute.before but there's no way to set _meta on downstream MCP tools/call requests. I need this to forward correlation IDs to my MCP servers without stuffing them into tool arguments.

This adds _meta as an optional field on the tool.execute.before hook output. If a plugin sets it, it gets forwarded in client.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 _meta shows up in the JSON-RPC request when set by a plugin and is absent when not.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@moghtader moghtader force-pushed the feat/mcp-forward-tool-use-id-meta branch 3 times, most recently from 5bded43 to bba746b Compare April 8, 2026 06:29
@moghtader moghtader force-pushed the feat/mcp-forward-tool-use-id-meta branch 2 times, most recently from df2283c to 5623429 Compare April 8, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Support _meta when calling downstream MCP tools

8 participants