{"record":{"id":"0038ee30365fd853","repo":"googleapis/mcp-toolbox","slug":"parameter-type-q-cannot-specify-embeddedby","errorCode":null,"errorMessage":"parameter type %q cannot specify 'embeddedBy'","messagePattern":"parameter type %q cannot specify 'embeddedBy'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/util/parameters/parameters.go","lineNumber":432,"sourceCode":"func ParseParameter(ctx context.Context, p map[string]any, paramType string) (Parameter, error) {\n\tdec, err := util.NewStrictDecoder(p)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error creating decoder: %w\", err)\n\t}\n\tswitch paramType {\n\tcase TypeString:\n\t\ta := &StringParameter{}\n\t\tif err := dec.DecodeContext(ctx, a); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to parse as %q: %w\", paramType, err)\n\t\t}\n\t\treturn a, nil\n\tcase TypeInt:\n\t\ta := &IntParameter{}\n\t\tif err := dec.DecodeContext(ctx, a); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to parse as %q: %w\", paramType, err)\n\t\t}\n\t\tif a.GetEmbeddedBy() != \"\" {\n\t\t\treturn nil, fmt.Errorf(\"parameter type %q cannot specify 'embeddedBy'\", paramType)\n\t\t}\n\t\treturn a, nil\n\tcase TypeFloat:\n\t\ta := &FloatParameter{}\n\t\tif err := dec.DecodeContext(ctx, a); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to parse as %q: %w\", paramType, err)\n\t\t}\n\t\tif a.GetEmbeddedBy() != \"\" {\n\t\t\treturn nil, fmt.Errorf(\"parameter type %q cannot specify 'embeddedBy'\", paramType)\n\t\t}\n\t\treturn a, nil\n\tcase TypeBool:\n\t\ta := &BooleanParameter{}\n\t\tif err := dec.DecodeContext(ctx, a); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to parse as %q: %w\", paramType, err)\n\t\t}\n\t\tif a.GetEmbeddedBy() != \"\" {\n\t\t\treturn nil, fmt.Errorf(\"parameter type %q cannot specify 'embeddedBy'\", paramType)","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/util/parameters/parameters.go#L414-L450","documentation":"ParseParameter rejects array/map-typed parameters (and others that aggregate values) that declare an 'embeddedBy' field, because embedding is only meaningful for scalar parameter types whose value is spliced into a string template. The error fires during config parsing of a parameter block in tools.yaml.","triggerScenarios":"Thrown at internal/util/parameters/parameters.go:432 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove 'embeddedBy' from the array/map parameter","Switch the parameter to a scalar type if embedding behavior is needed"],"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"}