{"record":{"id":"8709ead67ea955b4","repo":"googleapis/mcp-toolbox","slug":"invalid-tool-name-tool-with-name-q-does-not-exis","errorCode":null,"errorMessage":"invalid tool name: tool with name %q does not exist","messagePattern":"invalid tool name: tool with name %q does not exist","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"internal/server/api.go","lineNumber":106,"sourceCode":"// toolGetHandler handles requests for a single Tool.\nfunc toolGetHandler(s *Server, w http.ResponseWriter, r *http.Request) {\n\tctx, span := s.instrumentation.Tracer.Start(r.Context(), \"toolbox/server/tool/get\")\n\tr = r.WithContext(ctx)\n\n\ttoolName := chi.URLParam(r, \"toolName\")\n\ts.logger.DebugContext(ctx, fmt.Sprintf(\"tool name: %s\", toolName))\n\tspan.SetAttributes(attribute.String(\"tool_name\", toolName))\n\tvar err error\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tspan.SetStatus(codes.Error, err.Error())\n\t\t}\n\t\tspan.End()\n\t}()\n\n\ttool, ok := s.PrimitiveMgr.GetTool(toolName)\n\tif !ok {\n\t\terr = fmt.Errorf(\"invalid tool name: tool with name %q does not exist\", toolName)\n\t\ts.logger.DebugContext(ctx, err.Error())\n\t\t_ = render.Render(w, r, newErrResponse(err, http.StatusNotFound))\n\t\treturn\n\t}\n\tsrcName := tool.GetSourceName()\n\tvar src sources.Source\n\tif srcName != \"\" {\n\t\tsrc, ok = s.PrimitiveMgr.GetSource(srcName)\n\t\tif !ok {\n\t\t\terr = fmt.Errorf(\"unable to retrieve source for tool %s\", toolName)\n\t\t\ts.logger.DebugContext(ctx, err.Error())\n\t\t\t_ = render.Render(w, r, newErrResponse(err, http.StatusNotFound))\n\t\t\treturn\n\t\t}\n\t}\n\ttoolManifest, err := tool.Manifest(src)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"error generating manifest for tool %q: %w\", toolName, err)","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/api.go#L88-L124","documentation":"Error \"invalid tool name: tool with name %q does not exist\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/server/api.go:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}