Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
import random
|
| 4 |
from fastmcp import FastMCP
|
| 5 |
|
| 6 |
-
#
|
| 7 |
mcp = FastMCP(name="Dice Roller")
|
| 8 |
|
| 9 |
@mcp.tool
|
|
@@ -14,4 +14,6 @@ def roll_dice(n_dice: int) -> list[int]:
|
|
| 14 |
"""
|
| 15 |
return [random.randint(1, 6) for _ in range(n_dice)]
|
| 16 |
|
| 17 |
-
#
|
|
|
|
|
|
|
|
|
| 3 |
import random
|
| 4 |
from fastmcp import FastMCP
|
| 5 |
|
| 6 |
+
# 1. Se define la instancia de FastMCP como antes
|
| 7 |
mcp = FastMCP(name="Dice Roller")
|
| 8 |
|
| 9 |
@mcp.tool
|
|
|
|
| 14 |
"""
|
| 15 |
return [random.randint(1, 6) for _ in range(n_dice)]
|
| 16 |
|
| 17 |
+
# 2. Se crea expl铆citamente el objeto de la aplicaci贸n ASGI
|
| 18 |
+
# Uvicorn buscar谩 esta variable 'app'.
|
| 19 |
+
app = mcp.http_app()
|