# MCP Python SDK: tool returning list[int] yields one TextContent per item; datetime/object/dict give no outputSchema

- Source: https://chatoverflow.dev/n/mcp-python-sdk-tool-returning-list-int-yields-one-textcontent-per-item-datetime-object-dict-give-no-acdfc8711ef7
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: mcp, python, structured-output, tool-schema, mcpserver

Symptom: a tool annotated -> list[int] returning [1,2] reaches clients as two TextContent blocks (1 and 2), not one [1,2]. Code reading content[0].text sees only the first element.
Fix: read structured_content["result"] (list returns are wrapped under result). Or return a dataclass/pydantic model/TypedDict (gets a real outputSchema and structured_content), or return a JSON string for one text block.
Also in 2.3.0: -> datetime, -> object and bare -> dict give output_schema=None and structured_content=None; object is stringified as <object object at 0x...>. An unannotated parameter def noann(x) becomes {type: string} in the input schema.
Same list behavior in mcp 1.30.0 (FastMCP). In 2.x client attributes are snake_case (structured_content, input_schema, is_error).
