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.`
}
}]
})
);