{"record":{"id":"3b1fdafd0ad61ae1","repo":"googleapis/mcp-toolbox","slug":"api-native-endpoints-are-disabled-by-default-ple","errorCode":null,"errorMessage":"/api native endpoints are disabled by default. Please use the standard /mcp JSON-RPC endpoint","messagePattern":"/api native endpoints are disabled by default\\. Please use the standard /mcp JSON-RPC endpoint","errorType":"http","errorClass":null,"httpStatus":410,"severity":"error","filePath":"internal/server/server.go","lineNumber":601,"sourceCode":"\t\t})\n\t}\n\n\t// control plane\n\tmcpR, err := mcpRouter(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tr.Mount(\"/mcp\", mcpR)\n\tif cfg.EnableAPI {\n\t\tapiR, err := apiRouter(s)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tr.Mount(\"/api\", apiR)\n\t} else {\n\t\tr.Handle(\"/api/*\", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t\terr := errors.New(\"/api native endpoints are disabled by default. Please use the standard /mcp JSON-RPC endpoint\")\n\t\t\t_ = render.Render(w, r, newErrResponse(err, http.StatusGone))\n\t\t}))\n\t}\n\tif cfg.UI {\n\t\twebR, err := webRouter()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tr.Mount(\"/ui\", webR)\n\t}\n\t// default endpoint for validating server is running\n\tr.Get(\"/\", func(w http.ResponseWriter, r *http.Request) {\n\t\t_, _ = w.Write([]byte(\"🧰 Hello, World! 🧰\"))\n\t})\n\n\t// healthz endpoint for container orchestration health checks\n\t// (Kubernetes liveness/readiness probes, Docker HEALTHCHECK, etc.).\n\t// Returns 200 OK with a small JSON body so probes can rely on both","sourceCodeStart":583,"sourceCodeEnd":619,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/server.go#L583-L619","documentation":"convertPlainMap converts an ordinary (non-typed) JSON map field-by-field by recursing into JSONToFirestoreValue. If any field's conversion fails, the error is wrapped as \"field %q: %w\" naming the field key. This is a wrapper error; the real cause is the wrapped inner error.","triggerScenarios":"Any plain map passed through JSONToFirestoreValue (or the default branch of the typed-value switch) that contains a field whose value fails conversion, e.g. {\"createdAt\": {\"timestampValue\": \"bad\"}}.","commonSituations":"Document payloads from HTTP requests where one field is mistyped; configs with nested timestamps or geopoints in non-standard formats.","solutions":["Look at the quoted field name in the message and inspect that field's value.","Follow the guidance for the wrapped inner error (timestamp format, geopoint shape, etc.).","Pre-validate each field with JSONToFirestoreValue to isolate the offender."],"exampleFix":"// before\n{\"dueDate\": {\"timestampValue\": \"tomorrow\"}}\n// after\n{\"dueDate\": {\"timestampValue\": \"2024-01-02T00:00:00Z\"}}","handlingStrategy":"try-catch","validationCode":"for k, v := range plainMap {\n    if _, err := JSONToFirestoreValue(v, client); err != nil { return fmt.Errorf(\"field %q invalid: %w\", k, err) }\n}","typeGuard":null,"tryCatchPattern":"if _, err := JSONToFirestoreValue(doc, client); err != nil {\n    var field string\n    if n, _ := fmt.Sscanf(err.Error(), \"field %q\", &field); n == 1 { /* inspect field, follow wrapped inner error */ }\n}","preventionTips":["Validate each field of a document before submitting","Read errors.Unwrap chains to find the root cause","Keep field value types consistent with Firestore's typed-value shapes"],"tags":["firestore","map","error-wrapping"],"backgroundTag":"nested-value-conversion-failed","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"}