{"record":{"id":"69f3c5e5b32a834b","repo":"googleapis/mcp-toolbox","slug":"error-parsing-parameters-w","errorCode":null,"errorMessage":"error parsing parameters: %w","messagePattern":"error parsing parameters: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/util/parameters/parameters.go","lineNumber":388,"sourceCode":"\t\treturn err\n\t}\n\tfor _, u := range rawList {\n\t\tp, err := parseParamFromDelayedUnmarshaler(ctx, &u)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t(*c) = append((*c), p)\n\t}\n\treturn nil\n}\n\n// parseParamFromDelayedUnmarshaler is a helper function that is required to parse\n// parameters because there are multiple different types\nfunc parseParamFromDelayedUnmarshaler(ctx context.Context, u *util.DelayedUnmarshaler) (Parameter, error) {\n\tvar p map[string]any\n\terr := u.Unmarshal(&p)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error parsing parameters: %w\", err)\n\t}\n\n\tt, ok := p[\"type\"]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"parameter is missing 'type' field\")\n\t}\n\n\ttypeStr, ok := t.(string)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"parameter 'type' field must be a string, got %T\", t)\n\t}\n\n\tparam, err := ParseParameter(ctx, p, typeStr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := validateParameter(param); err != nil {","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/util/parameters/parameters.go#L370-L406","documentation":"parseParamFromDelayedUnmarshaler failed to unmarshal a raw parameter entry from tools.yaml into a generic map. This is a wrapping error: the underlying cause is malformed YAML (wrong indentation, invalid scalar, type mismatch) inside a tool's 'parameters' or 'templateParameters' block, surfaced with %w context during config parsing.","triggerScenarios":"Thrown at internal/util/parameters/parameters.go:388 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped cause in the error chain to find the exact YAML issue","Validate the tools.yaml parameter block against the documented parameter schema","Check indentation and quoting of the failing parameter entry"],"exampleFix":null,"handlingStrategy":"try-catch","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"}