-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
Version: 3.0.0
If I define an McpTool which doesn't need any arguments, the Mcp call will fail upon execution.
e.g.
/*
* Returns the types of something that are supported.
*
* @return list<array{type: string, long_name: string}>
*/
#[McpTool(name: 'supportedTypes')]
public function supportedTypes(): array
{
return [
[
'type' => 'a',
'long_name' => 'Alpha',
],
[
'type' => 'b',
'long_name' => 'Beta',
]
];
}
Executing this tool results in the following error:
{"method":"tools/call","code":-32602,"message":"Invalid parameters for tool 'supportedTypes': Invalid type. Expected `object`, but received `unknown`.","data":{"validation_errors":[{"pointer":"/","keyword":"type","message":"Invalid type. Expected `object`, but received `unknown`."}]}}
in Version 2.x it worked
Metadata
Metadata
Assignees
Labels
No labels