Files
microsoft--agent-framework/python/packages/core/tests
Giles Odigwe aeaabe5abf Python: fix MCP tool argument shadowing the remote tool name (#7799)
* Python: fix MCP tool argument shadowing the remote tool name

The generated MCP function held the remote tool name as the default of a
keyword-only parameter. Tool arguments are splatted into that function, so an
argument named `_remote_tool_name` bound to the parameter instead of `**kwargs`
and changed which remote tool was called.

Move the remote tool name into a factory closure so it is no longer part of the
generated function's signature, matching the prompt path which already binds the
name positionally via `partial`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4cb58e38-4af2-485d-b734-7d70972959f2

* Guard await_args before indexing in MCP regression test

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4cb58e38-4af2-485d-b734-7d70972959f2

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4cb58e38-4af2-485d-b734-7d70972959f2
2026-08-21 01:26:37 +00:00
..