mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 06:54:18 +01:00
chore: create union for working with message content (#939)
This commit is contained in:
@@ -45,14 +45,7 @@ def main(
|
||||
app = Server("mcp-streamable-http-demo")
|
||||
|
||||
@app.call_tool()
|
||||
async def call_tool(
|
||||
name: str, arguments: dict
|
||||
) -> list[
|
||||
types.TextContent
|
||||
| types.ImageContent
|
||||
| types.AudioContent
|
||||
| types.EmbeddedResource
|
||||
]:
|
||||
async def call_tool(name: str, arguments: dict) -> list[types.Content]:
|
||||
ctx = app.request_context
|
||||
interval = arguments.get("interval", 1.0)
|
||||
count = arguments.get("count", 5)
|
||||
|
||||
Reference in New Issue
Block a user