{"record":{"id":"be28e4118e0fca11","repo":"googleapis/mcp-toolbox","slug":"invalid-array-value-format","errorCode":null,"errorMessage":"invalid array value format","messagePattern":"invalid array value format","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/firestore/util/converter.go","lineNumber":121,"sourceCode":"\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))\n\t\t\t\t\t\t\tfor i, item := range values {\n\t\t\t\t\t\t\t\tconverted, err := JSONToFirestoreValue(item, client)\n\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\treturn nil, fmt.Errorf(\"array item %d: %w\", i, err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tresult[i] = converted\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn result, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn nil, fmt.Errorf(\"invalid array value format\")\n\t\t\t\tcase \"mapValue\":\n\t\t\t\t\t// Convert map\n\t\t\t\t\tif mapMap, ok := val.(map[string]any); ok {\n\t\t\t\t\t\tif fields, ok := mapMap[\"fields\"].(map[string]any); ok {\n\t\t\t\t\t\t\tresult := make(map[string]any)\n\t\t\t\t\t\t\tfor k, v := range fields {\n\t\t\t\t\t\t\t\tconverted, err := JSONToFirestoreValue(v, client)\n\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\treturn nil, fmt.Errorf(\"map field %q: %w\", k, err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tresult[k] = converted\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn result, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn nil, fmt.Errorf(\"invalid map value format\")\n\t\t\t\tcase \"referenceValue\":\n\t\t\t\t\t// Convert to DocumentRef if client is provided","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/firestore/util/converter.go#L103-L139","documentation":"Shape guard in JSONToFirestoreValue for arrayValue: the value is not a map with a `values` array (or is not a map at all), so its elements cannot be enumerated.","triggerScenarios":"Thrown at internal/tools/firestore/util/converter.go:121 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send arrays as {\"values\": [<item>, ...]}","Ensure the outer value is a JSON object, not a bare array"],"exampleFix":null,"handlingStrategy":"validation","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"}