Merge pull request #21 from modelcontextprotocol/davidsp/call-tool

Pass arguments as a dictionary instead of spreading them into kwargs
This commit is contained in:
David Soria Parra 2024-10-21 15:54:44 +01:00 • committed by GitHub
commit 6a4bbee5ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -274,7 +274,7 @@ class Server:
logger.debug("Registering handler for CallToolRequest")
async def handler(req: CallToolRequest):
result = await func(req.params.name, **(req.params.arguments or {}))
result = await func(req.params.name, (req.params.arguments or {}))
return ServerResult(CallToolResult(toolResult=result))
self.request_handlers[CallToolRequest] = handler