You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/specification/2025-06-18/server/prompts.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,6 +186,10 @@ Messages in a prompt can contain:
186
186
-`role`: Either "user" or "assistant" to indicate the speaker
187
187
-`content`: One of the following content types:
188
188
189
+
<Note>
190
+
All content types in prompt messages support optional [annotations](/specification/2025-06-18/server/resources#annotations) for metadata about audience, priority, and modification times.
Copy file name to clipboardExpand all lines: docs/specification/2025-06-18/server/resources.mdx
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,6 +305,36 @@ Resources can contain either text or binary data:
305
305
}
306
306
```
307
307
308
+
### Annotations
309
+
310
+
Resources, resource templates and content blocks support optional annotations that provide hints to clients about how to use or display the resource:
311
+
312
+
-**`audience`**: An array indicating the intended audience(s) for this resource. Valid values are `"user"` and `"assistant"`. For example, `["user", "assistant"]` indicates content useful for both.
313
+
-**`priority`**: A number from 0 to 1 indicating the importance of this resource. A value of 1 means "most important" (effectively required), while 0 means "least important" (entirely optional).
314
+
-**`lastModified`**: An ISO 8601 formatted timestamp indicating when the resource was last modified (e.g., `"2025-01-12T15:00:58Z"`).
315
+
316
+
Example resource with annotations:
317
+
318
+
```json
319
+
{
320
+
"uri": "file:///project/README.md",
321
+
"name": "README.md",
322
+
"title": "Project Documentation",
323
+
"mimeType": "text/markdown",
324
+
"annotations": {
325
+
"audience": ["user"],
326
+
"priority": 0.8,
327
+
"lastModified": "2025-01-12T15:00:58Z"
328
+
}
329
+
}
330
+
```
331
+
332
+
Clients can use these annotations to:
333
+
334
+
- Filter resources based on their intended audience
335
+
- Prioritize which resources to include in context
336
+
- Display modification times or sort by recency
337
+
308
338
## Common URI Schemes
309
339
310
340
The protocol defines several standard URI schemes. This list not
Copy file name to clipboardExpand all lines: docs/specification/2025-06-18/server/tools.mdx
+28-2Lines changed: 28 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,6 +203,10 @@ Tool results may contain [**structured**](#structured-content) or **unstructured
203
203
204
204
**Unstructured** content is returned in the `content` field of a result, and can contain multiple content items of different types:
205
205
206
+
<Note>
207
+
All content types (text, image, audio, resource links, and embedded resources) support optional [annotations](resources#annotations) that provide metadata about audience, priority, and modification times. This is the same annotation format used by resources and prompts.
208
+
</Note>
209
+
206
210
#### Text Content
207
211
208
212
```json
@@ -219,9 +223,16 @@ Tool results may contain [**structured**](#structured-content) or **unstructured
219
223
"type": "image",
220
224
"data": "base64-encoded-data",
221
225
"mimeType": "image/png"
226
+
"annotations": {
227
+
"audience": ["user"],
228
+
"priority": 0.9
229
+
}
230
+
222
231
}
223
232
```
224
233
234
+
This example demonstrates the use of an optional Annotation.
235
+
225
236
#### Audio Content
226
237
227
238
```json
@@ -243,10 +254,17 @@ or data. In this case, the tool will return a URI that can be subscribed to or f
243
254
"uri": "file:///project/src/main.rs",
244
255
"name": "main.rs",
245
256
"description": "Primary application entry point",
246
-
"mimeType": "text/x-rust"
257
+
"mimeType": "text/x-rust",
258
+
"annotations": {
259
+
"audience": ["assistant"],
260
+
"priority": 0.9
261
+
}
247
262
}
248
263
```
249
264
265
+
Resource links support the same [Resource annotations](resources#annotations) as regular resources to help clients understand how to use them.
266
+
267
+
250
268
<Info>
251
269
Resource links returned by tools are not guaranteed to appear in the results
252
270
of a `resources/list` request.
@@ -264,11 +282,19 @@ or data using a suitable [URI scheme](./resources#common-uri-schemes). Servers t
Copy file name to clipboardExpand all lines: docs/specification/draft/server/prompts.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,6 +186,10 @@ Messages in a prompt can contain:
186
186
-`role`: Either "user" or "assistant" to indicate the speaker
187
187
-`content`: One of the following content types:
188
188
189
+
<Note>
190
+
All content types in prompt messages support optional [annotations](/specification/2025-06-18/server/resources#annotations) for metadata about audience, priority, and modification times.
Copy file name to clipboardExpand all lines: docs/specification/draft/server/resources.mdx
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,6 +305,36 @@ Resources can contain either text or binary data:
305
305
}
306
306
```
307
307
308
+
### Annotations
309
+
310
+
Resources, resource templates and content blocks support optional annotations that provide hints to clients about how to use or display the resource:
311
+
312
+
-**`audience`**: An array indicating the intended audience(s) for this resource. Valid values are `"user"` and `"assistant"`. For example, `["user", "assistant"]` indicates content useful for both.
313
+
-**`priority`**: A number from 0 to 1 indicating the importance of this resource. A value of 1 means "most important" (effectively required), while 0 means "least important" (entirely optional).
314
+
-**`lastModified`**: An ISO 8601 formatted timestamp indicating when the resource was last modified (e.g., `"2025-01-12T15:00:58Z"`).
315
+
316
+
Example resource with annotations:
317
+
318
+
```json
319
+
{
320
+
"uri": "file:///project/README.md",
321
+
"name": "README.md",
322
+
"title": "Project Documentation",
323
+
"mimeType": "text/markdown",
324
+
"annotations": {
325
+
"audience": ["user"],
326
+
"priority": 0.8,
327
+
"lastModified": "2025-01-12T15:00:58Z"
328
+
}
329
+
}
330
+
```
331
+
332
+
Clients can use these annotations to:
333
+
334
+
- Filter resources based on their intended audience
335
+
- Prioritize which resources to include in context
336
+
- Display modification times or sort by recency
337
+
308
338
## Common URI Schemes
309
339
310
340
The protocol defines several standard URI schemes. This list not
Copy file name to clipboardExpand all lines: docs/specification/draft/server/tools.mdx
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,6 +203,10 @@ Tool results may contain [**structured**](#structured-content) or **unstructured
203
203
204
204
**Unstructured** content is returned in the `content` field of a result, and can contain multiple content items of different types:
205
205
206
+
<Note>
207
+
All content types (text, image, audio, resource links, and embedded resources) support optional [annotations](resources#annotations) that provide metadata about audience, priority, and modification times. This is the same annotation format used by resources and prompts.
208
+
</Note>
209
+
206
210
#### Text Content
207
211
208
212
```json
@@ -218,7 +222,11 @@ Tool results may contain [**structured**](#structured-content) or **unstructured
218
222
{
219
223
"type": "image",
220
224
"data": "base64-encoded-data",
221
-
"mimeType": "image/png"
225
+
"mimeType": "image/png",
226
+
"annotations": {
227
+
"audience": ["user"],
228
+
"priority": 0.9
229
+
}
222
230
}
223
231
```
224
232
@@ -247,6 +255,9 @@ or data. In this case, the tool will return a URI that can be subscribed to or f
247
255
}
248
256
```
249
257
258
+
Resource links support the same [Resource annotations](resources#annotations) as regular resources to help clients understand how to use them.
259
+
260
+
250
261
<Info>
251
262
Resource links returned by tools are not guaranteed to appear in the results
252
263
of a `resources/list` request.
@@ -264,11 +275,18 @@ or data using a suitable [URI scheme](./resources#common-uri-schemes). Servers t
0 commit comments