2.9 · Lesson

Building Prompts

You have built tools that Go to glossary for large language model (opens in a new tab)A model trained on text to predict the next token, and so to generate language. can call and resources that clients can load. Now you will 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.

The TypeScript MCP SDK provides registerPrompt() to create prompts: