Forward extra kwargs in McpServer.call_tool override#426
Merged
Conversation
The override `McpServer.call_tool(self, tool_name, arguments)` drops kwargs
that newer versions of `openai-agents` pass to the parent. When the agents
SDK at `agents/mcp/util.py` resolves a non-None `merged_meta`, it calls
`server.call_tool(tool.name, json_data, meta=merged_meta)`, which fails:
TypeError: McpServer.call_tool() got an unexpected keyword argument 'meta'
This breaks all MCP tool calls (system.ai UC functions, Genie spaces,
Vector Search, custom Apps-hosted MCP servers) for users on a recent
`openai-agents` whenever the meta-passing branch is taken.
Forward `**kwargs` to the parent so the override stays compatible with both
old and new SDK signatures: empty kwargs forward as no-ops to old parents,
and `meta` (or any future additions) reach new parents intact.
Co-authored-by: Isaac
Signed-off-by: Bryan Qiu <bryan.qiu@databricks.com>
Co-authored-by: Isaac Signed-off-by: Bryan Qiu <bryan.qiu@databricks.com>
annzhang-db
approved these changes
May 8, 2026
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.
The override
McpServer.call_tool(self, tool_name, arguments)drops kwargs that newer versions ofopenai-agentspass to the parent. When the agents SDK atagents/mcp/util.pyresolves a non-Nonemerged_meta, it callsserver.call_tool(tool.name, json_data, meta=merged_meta), which fails:This breaks all MCP tool calls (system.ai UC functions, Genie spaces, Vector Search, custom Apps-hosted MCP servers) for users on a recent
openai-agentswhenever the meta-passing branch is taken.Forward
**kwargsto the parent so the override stays compatible with both old and new SDK signatures: empty kwargs forward as no-ops to old parents, andmeta(or any future additions) reach new parents intact.Co-authored-by: Isaac