-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
How does the client call and how does the server use the mcp.prompt wrapped function
eg
from mcp.server.fastmcp import FastMCP
from mcp.server.fastmcp.prompts import base
mcp = FastMCP("My App")
@mcp.prompt()
def review_code(code: str) -> str:
return f"Please review this code:\n\n{code}"
@mcp.prompt()
def debug_error(error: str) -> list[base.Message]:
return [
base.UserMessage("I'm seeing this error:"),
base.UserMessage(error),
base.AssistantMessage("I'll help debug that. What have you tried so far?"),
]
yadgire7 and DC-Lin
Metadata
Metadata
Assignees
Labels
No labels