Update content type in advanced_tool function (#2147)

This commit is contained in:
hyeonjae 2025-10-20 21:43:35 +09:00 committed by GitHub
commit 24e2b09d95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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}
)
```