File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,8 @@ async def fetch_weather(city: str) -> str:
238238Prompts are reusable templates that help LLMs interact with your server effectively:
239239
240240``` python
241- from mcp.server.fastmcp import FastMCP, types
241+ from mcp.server.fastmcp import FastMCP
242+ from mcp.server.fastmcp.prompts import base
242243
243244mcp = FastMCP(" My App" )
244245
@@ -249,11 +250,11 @@ def review_code(code: str) -> str:
249250
250251
251252@mcp.prompt ()
252- def debug_error (error : str ) -> list[types .Message]:
253+ def debug_error (error : str ) -> list[base .Message]:
253254 return [
254- types .UserMessage(" I'm seeing this error:" ),
255- types .UserMessage(error),
256- types .AssistantMessage(" I'll help debug that. What have you tried so far?" ),
255+ base .UserMessage(" I'm seeing this error:" ),
256+ base .UserMessage(error),
257+ base .AssistantMessage(" I'll help debug that. What have you tried so far?" ),
257258 ]
258259```
259260
You can’t perform that action at this time.
0 commit comments