googleapis/mcp-toolbox · error

error getting parameters for tool %q: %w

Error message

error getting parameters for tool %q: %w

What it means

After resolving the source, GenerateListToolsResult calls tool.GetParameters(src) to build the parameter schema for the manifest. If a tool's parameter definition fails to resolve (e.g. a parameter referencing an unknown auth service or malformed template), the error is wrapped as "error getting parameters for tool <name>: <cause>".

Source

Thrown at internal/server/mcp/v20241105/manifests.go:123

		tool, ok := pMgr.GetTool(toolName)
		if !ok {
			return ListToolsResult{}, fmt.Errorf("tool does not exist: %s", toolName)
		}
		// Skip a Tool that requires secure params as they are not supported in this protocol version.
		if tool.HasSecureParams() {
			continue
		}
		srcName := tool.GetSourceName()
		var src sources.Source
		if srcName != "" {
			src, ok = pMgr.GetSource(srcName)
			if !ok {
				return ListToolsResult{}, fmt.Errorf("unable to retrieve %s source for tool %q", srcName, tool.GetName())
			}
		}
		params, err := tool.GetParameters(src)
		if err != nil {
			return ListToolsResult{}, fmt.Errorf("error getting parameters for tool %q: %w", toolName, err)
		}
		toolManifest := generateToolManifest(toolName, tool.GetDescription(), tool.GetAuthRequired(), params, tool.GetAnnotations(src), urlParams)
		mcpManifest = append(mcpManifest, toolManifest)
	}
	return ListToolsResult{Tools: mcpManifest}, nil
}

// generatePromptManifest generates a version-specific Prompt manifest for list/prompts
func generatePromptManifest(name, desc string, args prompts.Arguments) Prompt {
	mcpArgs := make([]PromptArgument, 0, len(args))
	for _, arg := range args {
		promptArg := PromptArgument{
			Name:        arg.GetName(),
			Description: arg.GetDesc(),
			Required:    parameters.CheckParamRequired(arg.GetRequired(), arg.GetDefault()),
		}
		mcpArgs = append(mcpArgs, promptArg)
	}

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Read the wrapped cause in the message — it names the specific parameter that failed.
  2. Check each tool parameter's auth field references an authService name that exists in your config.
  3. Validate the parameters block structure (name, type, description, required) against the current config schema.
  4. Fix template placeholders so they reference columns/fields that exist, then restart and retry tools/list.

Example fix

# before: parameter references undefined auth service
parameters:
  - name: user_id
    type: string
    authServices:
      - name: missing-auth  # not defined
# after: reference a defined auth service or drop the block
parameters:
  - name: user_id
    type: string
Defensive patterns

Strategy: validation

Validate before calling

# Lint the config before deploy: every auth reference in parameters must exist in authServices
# and parameter blocks must contain name/type fields
toolbox --tools-file tools.yaml --check  # or run the server locally and call tools/list

Prevention

When it happens

Trigger: tools/list where a tool's parameters section is invalid: an auth parameter referencing an auth service not defined in the config, bad type/required fields, or a template referencing missing sources, causing GetParameters to fail.

Common situations: authServices defined but not linked to tool parameters (or linked with a wrong name); hand-edited YAML with wrong indentation/types in the parameters block; templates referencing fields that do not exist on the source.

Related errors


AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05). Data as JSON: /api/errors/c78c4fd0a6ba3adf. Report an issue: GitHub.