{"record":{"id":"1ff38dadd82f55c2","repo":"googleapis/mcp-toolbox","slug":"method-not-found","errorCode":"METHOD_NOT_FOUND","errorMessage":"method not found","messagePattern":"method not found","errorType":"http","errorClass":"jsonrpc.Error","httpStatus":null,"severity":"error","filePath":"internal/server/mcp.go","lineNumber":696,"sourceCode":"\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}\n\n\t// Create method-specific span with semantic conventions\n\t// Note: Trace context is already extracted and set in ctx by the caller\n\tctx, span := s.instrumentation.Tracer.Start(ctx, baseMessage.Method,\n\t\ttrace.WithSpanKind(trace.SpanKindServer),\n\t)\n\tdefer span.End()\n\n\t// Determine network transport and protocol based on header presence","sourceCodeStart":678,"sourceCodeEnd":714,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/mcp.go#L678-L714","documentation":"Error \"method not found\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/server/mcp.go:696 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"}