-
Notifications
You must be signed in to change notification settings - Fork 706
Open
Labels
Description
When the pattern doesn't match, I would expect to receive an empty list. Instead I get a marshalling error:
$ echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"glob","arguments":{"pattern":"READ*"}}}' >&"${MCP[1]}"
$ read -t 1 -r line <&"${MCP[0]}"; jq . <<<"$line"
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": "{\"matches\":[\"/Users/jan/suse/lima/README.md\"]}"
}
],
"structuredContent": {
"matches": [
"/Users/jan/suse/lima/README.md"
]
}
}
}
$ echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"glob","arguments":{"pattern":"XXX*"}}}' >&"${MCP[1]}"
$ read -t 1 -r line <&"${MCP[0]}"; jq . <<<"$line"
{
"jsonrpc": "2.0",
"id": 3,
"error": {
"code": 0,
"message": "validating tool output: validating root: validating /properties/matches: type: <invalid reflect.Value> has type \"null\", want \"array\""
}
}