{"record":{"id":"7c52719e1183576e","repo":"googleapis/mcp-toolbox","slug":"invalid-request","errorCode":"INVALID_REQUEST","errorMessage":"not supporting batch requests","messagePattern":"not supporting batch requests","errorType":"http","errorClass":"jsonrpc.Error","httpStatus":null,"severity":"error","filePath":"internal/server/mcp.go","lineNumber":687,"sourceCode":"\toperationStart := time.Now()\n\n\tlogger, err := util.LoggerFromContext(ctx)\n\tif err != nil {\n\t\treturn \"\", jsonrpc.NewError(\"\", jsonrpc.INTERNAL_ERROR, err.Error(), nil), err\n\t}\n\n\t// Generic baseMessage could either be a JSONRPCNotification or JSONRPCRequest\n\tvar baseMessage jsonrpc.BaseMessage\n\tif err = util.DecodeJSON(bytes.NewBuffer(body), &baseMessage); err != nil {\n\t\t// The id cannot be determined from an undecodable body (batch or parse\n\t\t// error). Per JSON-RPC 2.0, the response id MUST be null in that case.\n\t\t// See https://www.jsonrpc.org/specification#response_object\n\n\t\t// check if user is sending a batch request\n\t\tvar a []any\n\t\tunmarshalErr := json.Unmarshal(body, &a)\n\t\tif unmarshalErr == nil {\n\t\t\terr = fmt.Errorf(\"not supporting batch requests\")\n\t\t\treturn \"\", jsonrpc.NewError(nil, jsonrpc.INVALID_REQUEST, err.Error(), nil), err\n\t\t}\n\n\t\treturn \"\", jsonrpc.NewError(nil, jsonrpc.PARSE_ERROR, err.Error(), nil), err\n\t}\n\n\t// Check if method is present\n\tif baseMessage.Method == \"\" {\n\t\terr = fmt.Errorf(\"method not found\")\n\t\treturn \"\", jsonrpc.NewError(baseMessage.Id, jsonrpc.METHOD_NOT_FOUND, err.Error(), nil), err\n\t}\n\tlogger.DebugContext(ctx, fmt.Sprintf(\"method is: %s\", baseMessage.Method))\n\n\t// Check for JSON-RPC 2.0\n\tif baseMessage.Jsonrpc != jsonrpc.JSONRPC_VERSION {\n\t\terr = fmt.Errorf(\"invalid json-rpc version\")\n\t\treturn \"\", jsonrpc.NewError(baseMessage.Id, jsonrpc.INVALID_REQUEST, err.Error(), nil), err\n\t}","sourceCodeStart":669,"sourceCodeEnd":705,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/mcp.go#L669-L705","documentation":"Error \"not supporting batch requests\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/server/mcp.go:687 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}