Closed
Description
Describe the bug
A clear and concise description of what the bug is.
MCP server currently set request handler of tool calling without args (no zod shape) called directly, without {}. However toolcallback type expects it. It is even worse when you use tool annotation.
To Reproduce
Steps to reproduce the behavior:
- Create a tool without args by MCPServer.tool(name, desc, {}, function)
- try to access extra as a parameter in the function. The type ToolCallback breaks.
- it is worse when using tool annotation.
Expected behavior
A clear and concise description of what you expected to happen.
You can get inferred correct type of extra in the mcpserver.tool
Logs
If applicable, add logs to help explain your problem.
Additional context
Add any other context about the problem here.