googleapis/mcp-toolbox · error

prompt does not exist: %s

Error message

prompt does not exist: %s

What it means

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.

Source

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

			Description: arg.GetDesc(),
			Required:    parameters.CheckParamRequired(arg.GetRequired(), arg.GetDefault()),
		}
		mcpArgs = append(mcpArgs, promptArg)
	}
	return Prompt{
		Name:        name,
		Description: desc,
		Arguments:   mcpArgs,
	}
}

// GenerateListPromptsResult generates the list/prompts result
func GenerateListPromptsResult(pMgr *primitives.PrimitiveManager, g group.Group) (ListPromptsResult, error) {
	mcpManifest := make([]Prompt, 0, len(g.PromptNames))
	for _, promptName := range g.PromptNames {
		prompt, ok := pMgr.GetPrompt(promptName)
		if !ok {
			return ListPromptsResult{}, fmt.Errorf("prompt does not exist: %s", promptName)
		}
		promptManifest := generatePromptManifest(promptName, prompt.GetDesc(), prompt.GetArguments())
		mcpManifest = append(mcpManifest, promptManifest)
	}
	return ListPromptsResult{Prompts: mcpManifest}, nil
}

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Fix the group/toolset entry so every prompt name matches a defined prompt exactly.
  2. Check startup logs for prompt parse/registration failures or duplicate-name drops.
  3. Remove stale prompt entries from the toolset if the prompts were intentionally deleted.
  4. Restart the server with the corrected config and retry prompts/list.

Example fix

# before: group lists a deleted prompt
groups:
  support:
    prompts:
      - triage-prompt  # removed from config
# after: list only existing prompts
groups:
  support:
    prompts:
      - faq-prompt
Defensive patterns

Strategy: validation

Validate before calling

// Verify prompts exist in the manifest before using the group
const res = await mcpRequest("prompts/list");
const available = new Set(res.result.prompts.map(p => p.name));
for (const expected of ["triage-prompt"]) {
  if (!available.has(expected)) throw new Error(`Missing prompt: ${expected}`);
}

Try / catch

if (res.error && /prompt does not exist/.test(res.error.message)) {
  await reloadToolsetConfig(); // refresh group definitions
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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