github / github/copilot-cli

MCP Tool with nested string dictionary parameters aren't callable

未关闭
#2,135 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:mcp
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

If I have an MCP tool written in C# using the official MCP library with something like:

```
McpServerTool, Description("Sample")
public static CallToolResult TestTool(Dictionary> param1, string param2)
{
var ctr = new CallToolResult()
ctr.Content = new List() { new TextContentBlock { Text = "true" } };
return ctr;
}
```

Then when I try to call it using the GitHub Copilot CLI, it only sees param2 as part of the signature. param1 gets dropped somehow.

This is a recent regression, it worked in 1.0.4 of the CLI. It also works correctly in Claude.

### Affected version

GitHub Copilot CLI 1.0.7.

### Steps to reproduce the behavior

1. Create a sample MCP server using C# and a tool as described above
2. Configure it to be loaded by Copilot CLI
3. Write a prompt to invoke it describing data for both parameters
4. Note that it only sees the 2nd parameter and can't call the tool

### Expected behavior

It should be able to call the tool with both param1 and param2

### Additional context

Windows 11, x64

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。