Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Update content type in advanced_tool function (#2147)

hyeonjae24e2b09d9540
diff --git a/docs/servers/tools.mdx b/docs/servers/tools.mdx
index e9ee1af77..8b2279ccf 100644
--- a/docs/servers/tools.mdx
+++ b/docs/servers/tools.mdx
@@ -625,7 +625,7 @@ from fastmcp.tools.tool import ToolResult
def advanced_tool() -> ToolResult:
"""Tool with full control over output."""
return ToolResult(
- content=[TextContent(text="Human-readable summary")],
+ content=[TextContent(type="text", text="Human-readable summary")],
structured_content={"data": "value", "count": 42}
)
```