{"record":{"id":"7bc5d4e78be9fd2c","repo":"Hmbown/CodeWhale","slug":"mcp-prompt-prompt-name-was-not-advertised-by-s","errorCode":null,"errorMessage":"MCP prompt '{prompt_name}' was not advertised by server '{server_name}'","messagePattern":"MCP prompt '(.+?)' was not advertised by server '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/mcp.rs","lineNumber":4425,"sourceCode":"        let timeout = conn.config().effective_read_timeout(&global_timeouts);\n        conn.read_resource(uri, timeout).await\n    }\n\n    /// Get a prompt from a specific server\n    pub async fn get_prompt(\n        &mut self,\n        server_name: &str,\n        prompt_name: &str,\n        arguments: serde_json::Value,\n    ) -> Result<serde_json::Value> {\n        let global_timeouts = self.config.timeouts;\n        let conn = self.get_or_connect(server_name).await?;\n        if !conn\n            .prompts()\n            .iter()\n            .any(|prompt| prompt.name == prompt_name)\n        {\n            anyhow::bail!(\n                \"MCP prompt '{prompt_name}' was not advertised by server '{server_name}'\"\n            );\n        }\n        let timeout = conn.config().effective_execute_timeout(&global_timeouts);\n        conn.get_prompt(prompt_name, arguments, timeout).await\n    }\n\n    /// Parse a prefixed name into (server_name, tool_name)\n    pub(crate) fn parse_prefixed_name(&self, prefixed_name: &str) -> Result<(String, String)> {\n        Self::authorize_call(\n            &self.disallowed_tools,\n            prefixed_name,\n            &serde_json::json!({}),\n        )?;\n        let Some(rest) = prefixed_name.strip_prefix(\"mcp_\") else {\n            anyhow::bail!(\"Invalid MCP tool name: {prefixed_name}\");\n        };\n","sourceCodeStart":4407,"sourceCodeEnd":4443,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/mcp.rs#L4407-L4443","documentation":"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.","triggerScenarios":"Thrown at crates/tui/src/mcp.rs:4425 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}