{"record":{"id":"bc5be8fad8baac7f","repo":"huggingface/smolagents","slug":"parameter-structured-output-was-not-specified-c","errorCode":null,"errorMessage":"Parameter 'structured_output' was not specified. Currently it defaults to False, but in version 1.25, the default will change to True. To suppress this warning, explicitly set structured_output=True (new behavior) or structured_output=False (legacy behavior). See documentation at https://huggingface.co/docs/smolagents/tutorials/tools#structured-output-and-output-schema-support for more details.","messagePattern":"Parameter 'structured_output' was not specified\\. Currently it defaults to False, but in version 1\\.25, the default will change to True\\. To suppress this warning, explicitly set structured_output=True \\(new behavior\\) or structured_output=False \\(legacy behavior\\)\\. See documentation at https://huggingface\\.co/docs/smolagents/tutorials/tools#structured-output-and-output-schema-support for more details\\.","errorType":"console","errorClass":"FutureWarning","httpStatus":null,"severity":"warning","filePath":"src/smolagents/mcp_client.py","lineNumber":93,"sourceCode":"        try:\n            mcp_client = MCPClient(...)\n            tools = mcp_client.get_tools()\n\n            # use your tools here.\n        finally:\n            mcp_client.disconnect()\n        ```\n    \"\"\"\n\n    def __init__(\n        self,\n        server_parameters: \"StdioServerParameters\" | dict[str, Any] | list[\"StdioServerParameters\" | dict[str, Any]],\n        adapter_kwargs: dict[str, Any] | None = None,\n        structured_output: bool | None = None,\n    ):\n        # Handle future warning for structured_output default value change\n        if structured_output is None:\n            warnings.warn(\n                \"Parameter 'structured_output' was not specified. \"\n                \"Currently it defaults to False, but in version 1.25, the default will change to True. \"\n                \"To suppress this warning, explicitly set structured_output=True (new behavior) or structured_output=False (legacy behavior). \"\n                \"See documentation at https://huggingface.co/docs/smolagents/tutorials/tools#structured-output-and-output-schema-support for more details.\",\n                FutureWarning,\n                stacklevel=2,\n            )\n            structured_output = False\n\n        try:\n            from mcpadapt.core import MCPAdapt\n            from mcpadapt.smolagents_adapter import SmolAgentsAdapter\n        except ModuleNotFoundError:\n            raise ModuleNotFoundError(\"Please install 'mcp' extra to use MCPClient: `pip install 'smolagents[mcp]'`\")\n        if isinstance(server_parameters, dict):\n            transport = server_parameters.get(\"transport\")\n            if transport is None:\n                transport = \"streamable-http\"","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/huggingface/smolagents/blob/30bb1161095dbae2271e6bc3cc4c219cc3897a57/src/smolagents/mcp_client.py#L75-L111","documentation":"MCPClient's structured_output parameter currently defaults to False (legacy behavior) but will default to True in smolagents 1.25. Passing structured_output=None (or omitting it) emits this FutureWarning explaining how to pin either behavior explicitly.","triggerScenarios":"Creating MCPClient(server_parameters) without structured_output after upgrading; MCP tool outputs then default to plain strings, with a warning nudging explicit choice.","commonSituations":"Upgrading smolagents across the 1.25 boundary; MCP tools whose output schema parsing (structured dicts vs strings) changes subtly after the default flip breaks downstream parsing.","solutions":["Decide behavior explicitly: pass structured_output=True to get schema-parsed tool outputs now","Pass structured_output=False to keep legacy string outputs if your prompts expect them","Run your test suite both ways before 1.25 lands to detect breakage early"],"exampleFix":"# before\nclient = MCPClient(server_parameters)\n\n# after\nclient = MCPClient(server_parameters, structured_output=True)","handlingStrategy":"validation","validationCode":"client = MCPClient(server_parameters, structured_output=True)  # or False, but always explicit","typeGuard":null,"tryCatchPattern":"import warnings\nwith warnings.catch_warnings():\n    warnings.simplefilter('ignore', FutureWarning)\n    client = MCPClient(server_parameters)","preventionTips":["Always pass structured_output explicitly","Test MCP tools against both True and False before 1.25","Subscribe to smolagents release notes for default flips"],"tags":["smolagents","mcp","deprecation","future-warning"],"backgroundTag":"deprecated-default-value-change","analyzedSha":"30bb1161095dbae2271e6bc3cc4c219cc3897a57","analyzedAt":"2026-08-28T18:52:54.169Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}