googleapis/mcp-toolbox · error
parameter type %q cannot specify 'embeddedBy'
Error message
parameter type %q cannot specify 'embeddedBy'
What it means
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.
Source
Thrown at internal/util/parameters/parameters.go:432
func ParseParameter(ctx context.Context, p map[string]any, paramType string) (Parameter, error) {
dec, err := util.NewStrictDecoder(p)
if err != nil {
return nil, fmt.Errorf("error creating decoder: %w", err)
}
switch paramType {
case TypeString:
a := &StringParameter{}
if err := dec.DecodeContext(ctx, a); err != nil {
return nil, fmt.Errorf("unable to parse as %q: %w", paramType, err)
}
return a, nil
case TypeInt:
a := &IntParameter{}
if err := dec.DecodeContext(ctx, a); err != nil {
return nil, fmt.Errorf("unable to parse as %q: %w", paramType, err)
}
if a.GetEmbeddedBy() != "" {
return nil, fmt.Errorf("parameter type %q cannot specify 'embeddedBy'", paramType)
}
return a, nil
case TypeFloat:
a := &FloatParameter{}
if err := dec.DecodeContext(ctx, a); err != nil {
return nil, fmt.Errorf("unable to parse as %q: %w", paramType, err)
}
if a.GetEmbeddedBy() != "" {
return nil, fmt.Errorf("parameter type %q cannot specify 'embeddedBy'", paramType)
}
return a, nil
case TypeBool:
a := &BooleanParameter{}
if err := dec.DecodeContext(ctx, a); err != nil {
return nil, fmt.Errorf("unable to parse as %q: %w", paramType, err)
}
if a.GetEmbeddedBy() != "" {
return nil, fmt.Errorf("parameter type %q cannot specify 'embeddedBy'", paramType)View on GitHub (pinned to 8cc6e09de2)
Solutions
- Remove 'embeddedBy' from the array/map parameter
- Switch the parameter to a scalar type if embedding behavior is needed
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/util/parameters/parameters.go:432 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/0038ee30365fd853.
Report an issue: GitHub.