googleapis/mcp-toolbox · error
invalid tool name: tool with name %q does not exist
Error message
invalid tool name: tool with name %q does not exist
What it means
Error "invalid tool name: tool with name %q does not exist" thrown in googleapis/mcp-toolbox.
Source
Thrown at internal/server/api.go:106
// toolGetHandler handles requests for a single Tool.
func toolGetHandler(s *Server, w http.ResponseWriter, r *http.Request) {
ctx, span := s.instrumentation.Tracer.Start(r.Context(), "toolbox/server/tool/get")
r = r.WithContext(ctx)
toolName := chi.URLParam(r, "toolName")
s.logger.DebugContext(ctx, fmt.Sprintf("tool name: %s", toolName))
span.SetAttributes(attribute.String("tool_name", toolName))
var err error
defer func() {
if err != nil {
span.SetStatus(codes.Error, err.Error())
}
span.End()
}()
tool, ok := s.PrimitiveMgr.GetTool(toolName)
if !ok {
err = fmt.Errorf("invalid tool name: tool with name %q does not exist", toolName)
s.logger.DebugContext(ctx, err.Error())
_ = render.Render(w, r, newErrResponse(err, http.StatusNotFound))
return
}
srcName := tool.GetSourceName()
var src sources.Source
if srcName != "" {
src, ok = s.PrimitiveMgr.GetSource(srcName)
if !ok {
err = fmt.Errorf("unable to retrieve source for tool %s", toolName)
s.logger.DebugContext(ctx, err.Error())
_ = render.Render(w, r, newErrResponse(err, http.StatusNotFound))
return
}
}
toolManifest, err := tool.Manifest(src)
if err != nil {
err = fmt.Errorf("error generating manifest for tool %q: %w", toolName, err)View on GitHub (pinned to 8cc6e09de2)
When it happens
Trigger: Thrown at internal/server/api.go:106 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/8709ead67ea955b4.
Report an issue: GitHub.