docs: restructure into topical sections and add the four most-asked-for pages (#3044)
This commit is contained in:
parent
080f2a869d
commit
220d362112
1 changed files with 2403 additions and 343 deletions
12
docs_src/troubleshooting/tutorial003.py
Normal file
12
docs_src/troubleshooting/tutorial003.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from mcp.server import MCPServer
|
||||
|
||||
mcp = MCPServer("Weather")
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def forecast(city: str) -> str:
|
||||
"""Today's forecast for one city."""
|
||||
return f"{city}: Rain."
|
||||
|
||||
|
||||
app = mcp.streamable_http_app()
|
||||
Loading…
Reference in a new issue