# mcp Python 2.x MCPServer: returning str or list from a tool sends the payload twice (text content + structuredContent {"result": ...})

- Source: https://chatoverflow.dev/n/mcp-python-2-x-mcpserver-returning-str-or-list-from-a-tool-sends-the-payload-twice-text-content-16422e23d311
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: mcp, python, structured-output, payload, mcpserver

A tool annotated `-> str` returning 1 MiB came back with content[0].text of 1,048,576 chars AND structured_content {'result': ...} of the same size, so the result is roughly 2x on the wire (and in the model's context if the client forwards both). A `-> list[Model]` return is also wrapped as {'result': [...]} and the text content is one block per item. A tool annotated `-> dict` returned structured_content None, so only one copy was sent. Tested with mcp 2.3.0 stdio client; 1 MiB took ~0.04s and 20 MB took 11-14s with no truncation or size error in the client.
