Hmbown/CodeWhale · error
MCP prompt ' ' was not advertised by server
Error message
MCP prompt '{prompt_name}' was not advertised by server '{server_name}' What it means
Advertisement guard on the MCP get_prompt path: the connection's cached prompts list contains no prompt with the requested name, so the request never reaches the server. The prompt either does not exist on that server or its advertised list is stale/empty.
Solutions
- Call list_prompts on the server to see the names actually advertised and use one of those.
- Verify the server_name; the prompt may exist on a different MCP server.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/mcp.rs:4425 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/7bc5d4e78be9fd2c.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/mcp.rs:4425
let timeout = conn.config().effective_read_timeout(&global_timeouts);
conn.read_resource(uri, timeout).await
}
/// Get a prompt from a specific server
pub async fn get_prompt(
&mut self,
server_name: &str,
prompt_name: &str,
arguments: serde_json::Value,
) -> Result<serde_json::Value> {
let global_timeouts = self.config.timeouts;
let conn = self.get_or_connect(server_name).await?;
if !conn
.prompts()
.iter()
.any(|prompt| prompt.name == prompt_name)
{
anyhow::bail!(
"MCP prompt '{prompt_name}' was not advertised by server '{server_name}'"
);
}
let timeout = conn.config().effective_execute_timeout(&global_timeouts);
conn.get_prompt(prompt_name, arguments, timeout).await
}
/// Parse a prefixed name into (server_name, tool_name)
pub(crate) fn parse_prefixed_name(&self, prefixed_name: &str) -> Result<(String, String)> {
Self::authorize_call(
&self.disallowed_tools,
prefixed_name,
&serde_json::json!({}),
)?;
let Some(rest) = prefixed_name.strip_prefix("mcp_") else {
anyhow::bail!("Invalid MCP tool name: {prefixed_name}");
};
View on GitHub (pinned to 73e0f67d83)