{"record":{"id":"6ba2632778e0dbaf","repo":"googleapis/mcp-toolbox","slug":"timestamp-value-must-be-a-string","errorCode":null,"errorMessage":"timestamp value must be a string","messagePattern":"timestamp value must be a string","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/firestore/util/converter.go","lineNumber":92,"sourceCode":"\t\t\t\t\t\treturn float64(num), nil\n\t\t\t\t\t}\n\t\t\t\t\treturn nil, fmt.Errorf(\"invalid double value: %v\", val)\n\t\t\t\tcase \"bytesValue\":\n\t\t\t\t\t// Decode base64 string to bytes\n\t\t\t\t\tif str, ok := val.(string); ok {\n\t\t\t\t\t\treturn base64.StdEncoding.DecodeString(str)\n\t\t\t\t\t}\n\t\t\t\t\treturn nil, fmt.Errorf(\"bytes value must be a base64 encoded string\")\n\t\t\t\tcase \"timestampValue\":\n\t\t\t\t\t// Parse timestamp\n\t\t\t\t\tif str, ok := val.(string); ok {\n\t\t\t\t\t\tt, err := time.Parse(time.RFC3339Nano, str)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, fmt.Errorf(\"invalid timestamp format: %w\", err)\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn t, nil\n\t\t\t\t\t}\n\t\t\t\t\treturn nil, fmt.Errorf(\"timestamp value must be a string\")\n\t\t\t\tcase \"geoPointValue\":\n\t\t\t\t\t// Convert to LatLng\n\t\t\t\t\tif geoMap, ok := val.(map[string]any); ok {\n\t\t\t\t\t\tlat, latOk := geoMap[\"latitude\"].(float64)\n\t\t\t\t\t\tlng, lngOk := geoMap[\"longitude\"].(float64)\n\t\t\t\t\t\tif latOk && lngOk {\n\t\t\t\t\t\t\treturn &latlng.LatLng{\n\t\t\t\t\t\t\t\tLatitude:  lat,\n\t\t\t\t\t\t\t\tLongitude: lng,\n\t\t\t\t\t\t\t}, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn nil, fmt.Errorf(\"invalid geopoint value format\")\n\t\t\t\tcase \"arrayValue\":\n\t\t\t\t\t// Convert array\n\t\t\t\t\tif arrayMap, ok := val.(map[string]any); ok {\n\t\t\t\t\t\tif values, ok := arrayMap[\"values\"].([]any); ok {\n\t\t\t\t\t\t\tresult := make([]any, len(values))","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/firestore/util/converter.go#L74-L110","documentation":"Type-check guard in JSONToFirestoreValue for timestampValue: the value is not a string, so it cannot be parsed as an RFC3339 timestamp.","triggerScenarios":"Thrown at internal/tools/firestore/util/converter.go:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send the timestamp as an RFC3339-formatted string","Use a different value tag if the value is numeric or boolean"],"exampleFix":null,"handlingStrategy":"type-guard","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"}