-
Notifications
You must be signed in to change notification settings - Fork 614
[FEATURE]: Support _meta field propagation in MCP tool calls #2094
Copy link
Copy link
Labels
mcp-protocolAlignment with MCP protocol or specificationAlignment with MCP protocol or specificationwxowxo integrationwxo integration
Milestone
Description
Summary
Context Forge Gateway does not currently propagate the _meta field from MCP tool call requests to downstream MCP servers. This field is part of the MCP specification and is the standard mechanism for passing metadata separately from business logic arguments.
Use Case
Propagate trace context and platform execution context (e.g., agentId, tenantId) to MCP servers during tool execution.
These values are:
- Not business inputs - they shouldn't pollute tool arguments
- Platform-owned execution context - similar to OpenTelemetry trace context
- Separate from tool intent - maintaining clean separation between arguments (user-controlled, business-level inputs) and metadata (platform context)
Why not existing options?
| Option | Limitation |
|---|---|
| Headers | Size limits (4-32KB); context variables can exceed this |
| Tool arguments | Risk of name collisions with actual tool parameters |
_meta field |
MCP protocol standard, no size limits, no collision risk ✓ |
Reference
- MCP Specification: https://modelcontextprotocol.io/specification/2025-06-18/schema#jsonrpcrequest
- The
_metafield is part of the JSONRPCRequest schema
Acceptance Criteria
-
_metafield from incomingtools/callrequests is propagated to downstream MCP servers - Works across all transport types (SSE, WebSocket, stdio)
- Unit tests covering
_metapropagation - Integration tests verifying end-to-end
_metadelivery
Additional Context
Discussion originated from IBM internal Slack thread regarding context variable passing for wxo integration.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
mcp-protocolAlignment with MCP protocol or specificationAlignment with MCP protocol or specificationwxowxo integrationwxo integration