Skip to content

Commit 685198f

Browse files
committed
Update prompts doc page
1 parent 430ab13 commit 685198f

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/spec/prompts.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ A Prompt in the Model Context Protocol (MCP) represents a pre-defined set of mes
4747

4848
Prompt Templates are prompts that can be dynamically generated or customized based on provided arguments. They allow servers to expose a flexible set of prompts that can be tailored to specific use cases. Clients can use these templates by providing the required arguments when retrieving the prompt.
4949

50+
### Embedded Resource Contents
51+
52+
Prompts can include embedded resource contents from the MCP server. This allows servers to provide context-rich prompts that incorporate relevant data or files directly into the prompt structure.
53+
5054
## Use Cases
5155

5256
Common use cases for prompts include providing standardized instructions for code reviews, data analysis tasks, or creative writing exercises. Here are examples of kinds of prompts that an MCP server could expose:
@@ -222,7 +226,7 @@ Example:
222226
The server MUST respond with a `GetPromptResult` containing:
223227

224228
- `description`: An optional string describing the prompt
225-
- `messages`: An array of `SamplingMessage` objects representing the prompt content
229+
- `messages`: An array of `PromptMessage` objects representing the prompt content, which may include embedded resource contents
226230

227231
Example:
228232
```json
@@ -245,6 +249,21 @@ Example:
245249
"type": "text",
246250
"text": "Certainly! I'd be happy to review the Python code snippet and provide feedback on its quality and potential improvements. Let's analyze it:"
247251
}
252+
},
253+
{
254+
"role": "user",
255+
"content": {
256+
"uri": "file:///workspace/project/requirements.txt",
257+
"mimeType": "text/plain",
258+
"text": "flask==2.0.1\nnumpy==1.21.0\npandas==1.3.0\n"
259+
}
260+
},
261+
{
262+
"role": "assistant",
263+
"content": {
264+
"type": "text",
265+
"text": "I see you've also provided the contents of the requirements.txt file. This gives us additional context about the project environment. Let's consider these dependencies in our code review as well."
266+
}
248267
}
249268
]
250269
}

0 commit comments

Comments
 (0)