Walk through prompts/list and prompts/get.
Quick Answer
prompts/list (optionally paginated) returns every prompt's name, description, and arguments metadata, letting a host populate a menu or slash-command palette. When the user selects one and fills in any required arguments, the client calls prompts/get with the prompt's name and an arguments map of string values. The server renders its template with those values substituted in and returns a GetPromptResult containing a description and a messages array — each message has a role (user or assistant) and content (text, image, or an embedded resource) — which the host then injects directly into the conversation, exactly as if those messages had been composed by hand.
Detailed Answer
The prompts flow mirrors tools' list/invoke pattern. The result is a set of ready-to-use conversation messages, not a single result payload.
Discovery
{"method": "prompts/list"}
// -> {"prompts": [{"name": "code-review", "description": "...", "arguments": [...]}]}
Retrieval
{"method": "prompts/get", "params": {
"name": "code-review",
"arguments": {"diff": "diff --git a/app.py ...", "strictness": "strict"}
}}
// Result
{"result": {
"description": "A strict code review of the provided diff",
"messages": [
{"role": "user", "content": {"type": "text",
"text": "Review this diff strictly against our team's standards (null-safety, test coverage, no unused imports):\n\ndiff --git a/app.py ..."}}
]
}}
What the host does with the result
The host takes the messages array and injects it into the active conversation, as if the user had typed it. Often the user only saw a short slash command (/code-review strictness=strict) and a small form for the diff. The actual rendered prompt sent to the model is far more detailed and specific than what they typed.
Multi-message prompts
A GetPromptResult isn't limited to one message. A prompt can return several — a user message with instructions followed by an assistant message that seeds a partial response, for instance. This lets a server construct a small pre-scripted exchange, a common pattern for few-shot-style guidance, rather than a single freeform instruction.