{"record":{"id":"23c499af0a00f190","repo":"googleapis/mcp-toolbox","slug":"prompt-does-not-exist-s","errorCode":null,"errorMessage":"prompt does not exist: %s","messagePattern":"prompt does not exist: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/mcp/v20241105/manifests.go","lineNumber":155,"sourceCode":"\t\t\tDescription: arg.GetDesc(),\n\t\t\tRequired:    parameters.CheckParamRequired(arg.GetRequired(), arg.GetDefault()),\n\t\t}\n\t\tmcpArgs = append(mcpArgs, promptArg)\n\t}\n\treturn Prompt{\n\t\tName:        name,\n\t\tDescription: desc,\n\t\tArguments:   mcpArgs,\n\t}\n}\n\n// GenerateListPromptsResult generates the list/prompts result\nfunc GenerateListPromptsResult(pMgr *primitives.PrimitiveManager, g group.Group) (ListPromptsResult, error) {\n\tmcpManifest := make([]Prompt, 0, len(g.PromptNames))\n\tfor _, promptName := range g.PromptNames {\n\t\tprompt, ok := pMgr.GetPrompt(promptName)\n\t\tif !ok {\n\t\t\treturn ListPromptsResult{}, fmt.Errorf(\"prompt does not exist: %s\", promptName)\n\t\t}\n\t\tpromptManifest := generatePromptManifest(promptName, prompt.GetDesc(), prompt.GetArguments())\n\t\tmcpManifest = append(mcpManifest, promptManifest)\n\t}\n\treturn ListPromptsResult{Prompts: mcpManifest}, nil\n}\n","sourceCodeStart":137,"sourceCodeEnd":162,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/mcp/v20241105/manifests.go#L137-L162","documentation":"GenerateListPromptsResult iterates the prompt names of the connected group and fetches each from the PrimitiveManager. If a group references a prompt that is not registered, it returns \"prompt does not exist: <name>\". Like the tool variant, this signals a dangling reference in the toolset/group definition.","triggerScenarios":"prompts/list against a group whose promptNames include a prompt removed, renamed, or misspelled in the config; prompt registration failed at startup; duplicate prompt names causing one to be dropped.","commonSituations":"Edited configs where prompts were renamed or deleted but the toolset list still references them; typos in prompt names; configs shared across projects referencing prompts not present in this one.","solutions":["Fix the group/toolset entry so every prompt name matches a defined prompt exactly.","Check startup logs for prompt parse/registration failures or duplicate-name drops.","Remove stale prompt entries from the toolset if the prompts were intentionally deleted.","Restart the server with the corrected config and retry prompts/list."],"exampleFix":"# before: group lists a deleted prompt\ngroups:\n  support:\n    prompts:\n      - triage-prompt  # removed from config\n# after: list only existing prompts\ngroups:\n  support:\n    prompts:\n      - faq-prompt","handlingStrategy":"validation","validationCode":"// Verify prompts exist in the manifest before using the group\nconst res = await mcpRequest(\"prompts/list\");\nconst available = new Set(res.result.prompts.map(p => p.name));\nfor (const expected of [\"triage-prompt\"]) {\n  if (!available.has(expected)) throw new Error(`Missing prompt: ${expected}`);\n}","typeGuard":null,"tryCatchPattern":"if (res.error && /prompt does not exist/.test(res.error.message)) {\n  await reloadToolsetConfig(); // refresh group definitions\n}","preventionTips":["Keep prompt names and group entries in sync; regenerate group lists when renaming prompts","Check startup logs for prompt parse failures","Remove references to deleted prompts during config cleanup"],"tags":["mcp","prompts-list","prompt","configuration"],"backgroundTag":"missing-prompt-definition","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"}