{"record":{"id":"27052bf6a4898b47","repo":"googleapis/mcp-toolbox","slug":"unable-to-parse-items-field-w","errorCode":null,"errorMessage":"unable to parse 'items' field: %w","messagePattern":"unable to parse 'items' field: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/util/parameters/parameters.go","lineNumber":1115,"sourceCode":"\tCommonParameter `yaml:\",inline\"`\n\tDefault         *[]any    `yaml:\"default\"`\n\tItems           Parameter `yaml:\"items\"`\n}\n\nfunc (p *ArrayParameter) UnmarshalYAML(ctx context.Context, unmarshal func(interface{}) error) error {\n\tvar rawItem struct {\n\t\tCommonParameter `yaml:\",inline\"`\n\t\tDefault         *[]any                  `yaml:\"default\"`\n\t\tItems           util.DelayedUnmarshaler `yaml:\"items\"`\n\t}\n\tif err := unmarshal(&rawItem); err != nil {\n\t\treturn err\n\t}\n\tp.CommonParameter = rawItem.CommonParameter\n\tp.Default = rawItem.Default\n\ti, err := parseParamFromDelayedUnmarshaler(ctx, &rawItem.Items)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to parse 'items' field: %w\", err)\n\t}\n\tif i.GetAuthServices() != nil && len(i.GetAuthServices()) != 0 {\n\t\treturn fmt.Errorf(\"nested items should not have auth services\")\n\t}\n\tp.Items = i\n\n\treturn nil\n}\n\nfunc (p *ArrayParameter) IsAllowedValues(v []any) bool {\n\ta := p.GetAllowedValues()\n\tif len(a) == 0 {\n\t\treturn true\n\t}\n\tfor _, av := range a {\n\t\tif reflect.DeepEqual(v, av) {\n\t\t\treturn true\n\t\t}","sourceCodeStart":1097,"sourceCodeEnd":1133,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/util/parameters/parameters.go#L1097-L1133","documentation":"ArrayParameter's custom unmarshaling recursively parses its nested 'items' schema. If the schema of the items parameter is invalid (bad type name, malformed structure, disallowed nested auth services), the underlying parse error is wrapped with this message so you know the problem is inside the array's items definition, not the array itself.","triggerScenarios":"Loading a tools.yaml where an array parameter's 'items' block fails parseParamFromDelayedUnmarshaler — e.g. items has type: 'str' (invalid), an unknown field, or nested authServices in the items.","commonSituations":"Typo in the items type name in tools.yaml; copying an array schema from another tool and leaving authServices inside items; hand-editing YAML and breaking indentation of the items block.","solutions":["Open tools.yaml at the offending array parameter and validate the 'items' block: correct 'type' string (string, integer, boolean, float, array, map), no authServices.","Compare against a known-good array parameter schema and fix field names/indentation.","Run the toolbox config validation (toolbox dev or --prebuilt flag loads) to see the wrapped root-cause error beneath this message."],"exampleFix":"# before\n- name: tags\n  type: array\n  items:\n    type: str\n    authServices: [myAuth]\n# after\n- name: tags\n  type: array\n  items:\n    type: string","handlingStrategy":"validation","validationCode":"# Validate tools.yaml before deploying\n.toolbox check: ensure items.type in {string,integer,boolean,float,array,map} and items has no unknown fields","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Lint tools.yaml with a schema validator on every change.","Never put authServices inside items.","Copy parameter schemas from existing working tools only."],"tags":["yaml-config","array-parameter","unmarshal","mcp-toolbox"],"backgroundTag":"invalid-tool-config","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"}