GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(mcp): forward plugin-set _meta to downstream MCP tool calls by moghtader · Pull Request #1 · moghtader/opencode

Conversation

@moghtader

@moghtader moghtader commented Apr 8, 2026

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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
RafalWilinski
RafalWilinski approved these changes Apr 8, 2026
View reviewed changes
@Brendonovich
ui: fix sticky session diffs header (anomalyco#21486)
988c989
@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
moghtader and others added 15 commits April 8, 2026 09:04
@moghtader
feat(mcp): forward plugin-set _meta to downstream MCP tool calls
5623429
@moghtader
Merge branch 'dev' into feat/mcp-forward-tool-use-id-meta
e193156
@rekram1-node @opencode-agent
test: update webfetch test (anomalyco#21398)
cd87d4f
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@rekram1-node
fix: ensure that /providers list and shell endpoints are correctly ty…
039c601
…ped in sdk and openapi schema (anomalyco#21543)
@adamdotdevin
fix(app): patch tool diff rendering
d98be39
@adamdotdevin
fix(app): diff list normalization
689b1a4
@rekram1-node
fix: dont show invalid variants for BP (anomalyco#21555)
00cb883
@rekram1-node
tweak: separate ModelsDev.Model and Config model schemas (anomalyco#2…
4961d72
…1561)
@kitlangton
refactor(effect): build task tool from agent services (anomalyco#21017)
38f8714
@OpeOginni
fix(app): skip url password setting for same-origin server and web app (
51535d8
anomalyco#19923)
@kitlangton
fix: propagate abort signal to inline read tool (anomalyco#21584)
2bdd279
@kitlangton
refactor(effect): inline session processor interrupt cleanup (anomaly…
8bdcc22
…co#21593)
@vglafirov @rekram1-node
feat(llm): integrate GitLab DWS tool approval with permission system (a…
cd8e8a9
…nomalyco#19955)

Co-authored-by: Aiden Cline <[email protected]>
@opencode-agent
chore: update nix node_modules hashes
d82b163
@rekram1-node
Merge branch 'dev' into feat/mcp-forward-tool-use-id-meta
5900ab3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@RafalWilinski RafalWilinski RafalWilinski approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Support _meta when calling downstream MCP tools

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@moghtader @RafalWilinski @Brendonovich @rekram1-node @adamdotdevin @kitlangton @OpeOginni @vglafirov
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.