feat: add validation for missing name parameter in tools/call requests
This commit is contained in:
committed by
Igor Lins e Silva
parent
55d79dc8cd
commit
a85d432b54
@@ -2007,6 +2007,12 @@ def handle_request(request):
|
||||
},
|
||||
}
|
||||
elif method == "tools/call":
|
||||
if not isinstance(params, dict) or "name" not in params:
|
||||
return {
|
||||
"jsonrpc": "2.0",
|
||||
"id": req_id,
|
||||
"error": {"code": -32602, "message": "Invalid params: 'name' is required for tools/call"},
|
||||
}
|
||||
tool_name = params.get("name")
|
||||
tool_args = params.get("arguments") or {}
|
||||
if tool_name not in TOOLS:
|
||||
|
||||
Reference in New Issue
Block a user