{"record":{"id":"7b7c079b7db220d8","repo":"github/github-mcp-server","slug":"failed-to-build-json-rpc-request-w","errorCode":null,"errorMessage":"failed to build JSON-RPC request: %w","messagePattern":"failed to build JSON-RPC request: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/mcpcurl/main.go","lineNumber":132,"sourceCode":"\t\t\treturn nil\n\t\t},\n\t}\n\n\t// Add schema command\n\tschemaCmd = &cobra.Command{\n\t\tUse:   \"schema\",\n\t\tShort: \"Fetch schema from MCP server\",\n\t\tLong:  \"Fetches the tools schema from the MCP server specified by --stdio-server-cmd\",\n\t\tRunE: func(cmd *cobra.Command, _ []string) error {\n\t\t\tserverCmd, _ := cmd.Flags().GetString(\"stdio-server-cmd\")\n\t\t\tif serverCmd == \"\" {\n\t\t\t\treturn fmt.Errorf(\"--stdio-server-cmd is required\")\n\t\t\t}\n\n\t\t\t// Build the JSON-RPC request for tools/list\n\t\t\tjsonRequest, err := buildJSONRPCRequest(\"tools/list\", \"\", nil)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to build JSON-RPC request: %w\", err)\n\t\t\t}\n\n\t\t\t// Execute the server command and pass the JSON-RPC request\n\t\t\tresponse, err := executeServerCommand(serverCmd, jsonRequest)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error executing server command: %w\", err)\n\t\t\t}\n\n\t\t\t// Output the response\n\t\t\tfmt.Println(response)\n\t\t\treturn nil\n\t\t},\n\t}\n\n\t// Create the tools command\n\ttoolsCmd = &cobra.Command{\n\t\tUse:   \"tools\",\n\t\tShort: \"Access available tools\",","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/cmd/mcpcurl/main.go#L114-L150","documentation":"Error \"failed to build JSON-RPC request: %w\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at cmd/mcpcurl/main.go:132 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":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}