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
- Open your tools config and fix the toolset entry so every tool name matches an existing tool definition exactly.
- Check server startup logs for tool registration/initialization failures or duplicate-name warnings that dropped a tool.
- Run a config validation / start the server locally and inspect /api/toolset or the manifest to confirm which tools registered.
- 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
- Cross-check every toolset entry against defined tool names before deploying the config
- Watch startup logs for tool registration/duplicate-name failures
- Keep tool and toolset names in one place or generate the toolset list programmatically
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
- unable to retrieve %s source for tool %q
- error getting parameters for tool %q: %w
- toolset '%s' not found in prebuilt configuration '%s'. Avail
- MCP Auth cannot be enabled together with the legacy HTTP API
- MCP Auth is enabled but Toolbox URL is missing. Please provi
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/17649bddde7fda4d.
Report an issue: GitHub.