googleapis/mcp-toolbox · error

tool does not exist: %s

Error message

tool does not exist: %s

What it means

GenerateListToolsResult iterates the tool names of the connected group and fetches each from the PrimitiveManager. If a group references a tool name that is not registered (GetTool fails), it returns "tool does not exist: <name>". This is a config/integrity problem: a toolset lists a tool the manager does not contain.

Source

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

		}
		if len(authParamList) > 0 {
			authParam[name] = authParamList
		}
	}
	return InputSchema{
		Type:       "object",
		Properties: properties,
		Required:   required,
	}, authParam
}

// GenerateListToolsResult generates tools/list method result according to mcp schema
func GenerateListToolsResult(pMgr *primitives.PrimitiveManager, g group.Group, urlParams map[string]string) (ListToolsResult, error) {
	mcpManifest := make([]Tool, 0, len(g.ToolNames))
	for _, toolName := range g.ToolNames {
		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)

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Open your tools config and fix the toolset entry so every tool name matches an existing tool definition exactly.
  2. Check server startup logs for tool registration/initialization failures or duplicate-name warnings that dropped a tool.
  3. Run a config validation / start the server locally and inspect /api/toolset or the manifest to confirm which tools registered.
  4. Update or regenerate the toolset config if it was based on an older schema or prebuilt config.

Example fix

# before: toolset references a removed tool
toolsets:
  finance:
    - list-orders
    - removed-query
# after: only tools that exist
toolsets:
  finance:
    - list-orders
    - run-query
Defensive patterns

Strategy: validation

Validate before calling

# Before starting clients, check the manifest for the expected tools
curl -s http://127.0.0.1:5000/mcp/<group>/... -X POST \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq '.result.tools[].name'

Try / catch

if (res.error && res.error.code === -32600 && /tool does not exist/.test(res.error.message)) {
  // reload config or reconnect to a valid toolset
}

Prevention

When it happens

Trigger: tools/list against a toolset whose definition includes a tool name that was removed, renamed, or misspelled in the config; two tool definitions sharing a name so one is dropped during registration; a prebuilt/templated config referencing a tool unavailable in the current build.

Common situations: Hand-edited tools.yaml where a toolset references a deleted tool; case-sensitivity mistakes in tool names; SDK/source gating (a tool compiled out or failing to initialize) leaving a dangling reference; stale docs/samples pointing at removed tools.

Related errors


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