Skip to content

Fix outbound MCP tool calls that wrap parameters in kwargs #1163

Description

@Bionic711

Issue

Outbound MCP tool calls can forward tool parameters under a kwargs wrapper instead of as top-level MCP tool arguments. This breaks MCP servers such as Splunk that require schema fields like type, because the server receives kwargs but cannot see the required field.

Steps to Reproduce

  1. Configure an outbound MCP action with a discovered tool that has required input parameters, such as a Splunk MCP tool requiring type.
  2. Invoke the tool through SimpleChat's Semantic Kernel MCP action surface.
  3. Observe the MCP server validation response.

Expected Behavior

SimpleChat forwards tool inputs as top-level fields inside the MCP tools/call arguments object, for example { "type": "..." }.

Actual Behavior

SimpleChat can forward { "kwargs": { "type": "..." } }, so the MCP server reports missing required fields such as type. Tools without parameters can still work, which makes the issue appear only for parameterized tools.

Impact

P1 user-facing integration bug. Parameterized outbound MCP tools cannot reliably execute against standards-compliant MCP servers, blocking external-system actions such as Splunk queries while leaving no-parameter tools unaffected.

Notes

The MCP protocol expects tools/call parameters to include name and an arguments object whose properties are the tool parameters. The likely SimpleChat code path is the dynamic MCP Semantic Kernel function wrapper in semantic_kernel_plugins/mcp_plugin.py, which receives **kwargs and forwards the resulting mapping into the MCP factory. The fix should normalize wrapper-shaped arguments before schema validation and before the native MCP connector invocation, while preserving legitimate tools that intentionally define a top-level kwargs field.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpythonPull requests that update python code

Type

No type

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions