Detailed guide on MCP tool calling parameter validation error -32602, including causes, troubleshooting workflow, and solutions. For AI Agents encountering parameter issues when calling MCP tools.
MCP-JSONRPC-32602 is one of the most common errors in MCP tool calling. When an AI Agent calls an MCP tool with parameters that don't match the tool's schema definition, the server returns this error.
This error typically means:
When this error occurs, the MCP server returns the following standard error response structure:
{
"jsonrpc": "2.0",
"id": 42,
"error": {
"code": -32602,
"message": "Invalid params",
"data": {
"param": "connection_string",
"reason": "missing required parameter"
}
}
}
Solution: Check the required field in the tool definition and ensure all required parameters are provided.
Solution: Ensure the parameter types match the tool definition.
Solution: Carefully check parameter names, paying attention to case sensitivity.
Solution: Adjust parameter values to be within the valid range.
Check the `data` field in the error response, which usually contains `param` and `reason` fields indicating the specific parameter and cause.
Parameter name spelling errors usually return -32602, but sometimes Claude Desktop may incorrectly report "No such tool available". Carefully check parameter name case and spelling.
Depends on the specific tool implementation. Some tools accept `null` as a placeholder for optional parameters, while others require the parameter to be omitted entirely. Check the tool documentation or test to confirm.
人类专家验证
官方机器人验证