Spaces:
Running
Running
Jeremiah Lowin commited on
Commit ·
0b1b3ab
1
Parent(s): 63c76b9
Use union pipes
Browse files
src/fastmcp/server/server.py
CHANGED
|
@@ -640,7 +640,7 @@ def _convert_to_content(
|
|
| 640 |
other_content = []
|
| 641 |
|
| 642 |
for item in result:
|
| 643 |
-
if isinstance(item,
|
| 644 |
mcp_types.append(_convert_to_content(item)[0])
|
| 645 |
else:
|
| 646 |
other_content.append(item)
|
|
|
|
| 640 |
other_content = []
|
| 641 |
|
| 642 |
for item in result:
|
| 643 |
+
if isinstance(item, TextContent | ImageContent | EmbeddedResource | Image):
|
| 644 |
mcp_types.append(_convert_to_content(item)[0])
|
| 645 |
else:
|
| 646 |
other_content.append(item)
|