2.9 · Lesson

Building Prompts

You've built tools that LLMsA model trained on text to predict the next token, and so to generate language. can call and resources that clients can load. Now you'll learn about prompts - reusable templates that guide users in how to interact with your MCP server. Unlike tools and resources, prompts are user-controlled - users explicitly choose when to use them through a UI menu or slash command.

FastMCP provides the @mcp.prompt() decorator to create prompts: