github / github/copilot-cli

Empty Input Schema Breaks Copilot CLI

オープン
#1,825 コメント 1 件 リアクション 10 件 担当者 0 名 GitHub で見る
area:mcp area:tools
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the bug

Tools with no input parameters use an empty JSON Schema for their Input Schema. This causes Copilot CLI to reject the tool entirely and fail on **any** prompt when the MCP server is connected.

## Error from Copilot CLI:

```text
✘ Model call failed: {"message":"Invalid schema for function 'ai-game-developer-assets-prefab-save':
In context=(), object schema missing properties.","code":"invalid_function_parameters"}
(Request ID: D7FC:AD056:2DA15A3:3398963:69A8149D)
```

### Affected version

0.0.365 Commit: 76d0881

### Steps to reproduce the behavior

1. To have an MCP tool with this **Input Schema**:
```json
{
"type": "object",
"additionalProperties": false
}
```
2. Start `copilot`.
3. Type any prompt when connected to the MCP with the tool.

## Result
Copilot is stuck producing this error again and again. Nothing else happens, doesn't matter what prompt to type. Only adding an input argument into the input json schema of the tool resolves the problem.

### Sample (functional Input Schema)
```json
{
"type": "object",
"properties": {
"dummy": {
"type": "string"
}
},
"required": ["dummy"]
}
```

### Expected behavior

Copilot doesn't have the error about MCP tool with no arguments and can continue to operate and use it.

### Additional context

Seems like Copilot CLI requires every `object` schema to have a `properties` field. An empty object schema (with only `additionalProperties: false` and no `properties`) is rejected as invalid.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。