{"record":{"id":"5637d531f3735f56","repo":"microsoft/autogen","slug":"unknown-content-type-from-server-type-content","errorCode":null,"errorMessage":"Unknown content type from server: {type(content)}","messagePattern":"Unknown content type from server: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-ext/src/autogen_ext/tools/mcp/_workbench.py","lineNumber":358,"sourceCode":"                result_future = await self._actor.call(\"call_tool\", {\"name\": original_name, \"kargs\": arguments})\n                cancellation_token.link_future(result_future)\n                result = await result_future\n                assert isinstance(\n                    result, CallToolResult\n                ), f\"call_tool must return a CallToolResult, instead of : {str(type(result))}\"\n                result_parts: List[TextResultContent | ImageResultContent] = []\n                is_error = result.isError\n                for content in result.content:\n                    if isinstance(content, TextContent):\n                        result_parts.append(TextResultContent(content=content.text))\n                    elif isinstance(content, ImageContent):\n                        result_parts.append(ImageResultContent(content=Image.from_base64(content.data)))\n                    elif isinstance(content, EmbeddedResource):\n                        # TODO: how to handle embedded resources?\n                        # For now we just use text representation.\n                        result_parts.append(TextResultContent(content=content.model_dump_json()))\n                    else:\n                        raise ValueError(f\"Unknown content type from server: {type(content)}\")\n            except Exception as e:\n                error_message = self._format_errors(e)\n                is_error = True\n                result_parts = [TextResultContent(content=error_message)]\n        return ToolResult(name=name, result=result_parts, is_error=is_error)  # Return the requested name\n\n    @property\n    def initialize_result(self) -> Any:\n        if self._actor:\n            return self._actor.initialize_result\n\n        return None\n\n    async def list_prompts(self) -> ListPromptsResult:\n        \"\"\"List available prompts from the MCP server.\"\"\"\n        if not self._actor:\n            await self.start()\n        if self._actor is None:","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-ext/src/autogen_ext/tools/mcp/_workbench.py#L340-L376","documentation":"Error \"Unknown content type from server: {type(content)}\" thrown in microsoft/autogen.","triggerScenarios":"Thrown at python/packages/autogen-ext/src/autogen_ext/tools/mcp/_workbench.py:358 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Handle or filter the returned content type"],"exampleFix":"Convert the content to a supported type before processing","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}