From 1a623e8c309d09171ea557402fe9f905be11cfdd Mon Sep 17 00:00:00 2001 From: Niraj-Fonseka Date: Wed, 19 Mar 2025 08:57:03 -0500 Subject: [PATCH] fixing the imports for the prompts example --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5075308f..84359984 100644 --- a/README.md +++ b/README.md @@ -238,7 +238,8 @@ async def fetch_weather(city: str) -> str: Prompts are reusable templates that help LLMs interact with your server effectively: ```python -from mcp.server.fastmcp import FastMCP, types +from mcp.server.fastmcp import FastMCP +from mcp.server.fastmcp.prompts import base mcp = FastMCP("My App") @@ -249,11 +250,11 @@ def review_code(code: str) -> str: @mcp.prompt() -def debug_error(error: str) -> list[types.Message]: +def debug_error(error: str) -> list[base.Message]: return [ - types.UserMessage("I'm seeing this error:"), - types.UserMessage(error), - types.AssistantMessage("I'll help debug that. What have you tried so far?"), + base.UserMessage("I'm seeing this error:"), + base.UserMessage(error), + base.AssistantMessage("I'll help debug that. What have you tried so far?"), ] ```