[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3

Prompt Templates

Prompts7 min90 BASE XP

What are Prompts inside MCP?

Prompts are predefined, reusable message templates that a user can trigger in the UI. Think of them as complex "slash commands" that inject dense system instructions into the LLM.

server.prompt(
  "senior_code_reviewer",
  { language: z.string().optional() },
  ({ language }) => ({
    messages: [{
      role: "user",
      content: {
        type: "text",
        text: `Act as a Principal ${language || 'Software'} Engineer. Review the following code for memory leaks.`
      }
    }]
  })
);
💡 Key Insight: MCP Prompts are meant for the Host UI to expose to the user (e.g., clicking a button to load a complex workflow), not for the LLM to call autonomously.
SYNAPSE VERIFICATION
QUERY 1 // 3
What is the main use-case for an MCP Prompt?
To force the LLM to generate faster tokens.
To provide a reusable template that users can quickly invoke via the UI.
To act as an automated testing script.
To cache data on the server.
Watch: 139x Rust Speedup
Prompt Templates | Prompts — MCP Academy