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/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.0 to 1.0 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
+30-2Lines changed: 30 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,6 +203,14 @@ 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)
208
+
support optional
209
+
[annotations](/specification/2025-06-18/server/resources#annotations) that
210
+
provide metadata about audience, priority, and modification times. This is the
211
+
same annotation format used by resources and prompts.
212
+
</Note>
213
+
206
214
#### Text Content
207
215
208
216
```json
@@ -219,9 +227,16 @@ Tool results may contain [**structured**](#structured-content) or **unstructured
219
227
"type": "image",
220
228
"data": "base64-encoded-data",
221
229
"mimeType": "image/png"
230
+
"annotations": {
231
+
"audience": ["user"],
232
+
"priority": 0.9
233
+
}
234
+
222
235
}
223
236
```
224
237
238
+
This example demonstrates the use of an optional Annotation.
239
+
225
240
#### Audio Content
226
241
227
242
```json
@@ -243,10 +258,16 @@ or data. In this case, the tool will return a URI that can be subscribed to or f
243
258
"uri": "file:///project/src/main.rs",
244
259
"name": "main.rs",
245
260
"description": "Primary application entry point",
246
-
"mimeType": "text/x-rust"
261
+
"mimeType": "text/x-rust",
262
+
"annotations": {
263
+
"audience": ["assistant"],
264
+
"priority": 0.9
265
+
}
247
266
}
248
267
```
249
268
269
+
Resource links support the same [Resource annotations](/specification/2025-06-18/server/resources#annotations) as regular resources to help clients understand how to use them.
270
+
250
271
<Info>
251
272
Resource links returned by tools are not guaranteed to appear in the results
252
273
of a `resources/list` request.
@@ -264,11 +285,18 @@ or data using a suitable [URI scheme](./resources#common-uri-schemes). Servers t
Embedded resources support the same [Resource annotations](/specification/2025-06-18/server/resources#annotations) as regular resources to help clients understand how to use them.
299
+
272
300
#### Structured Content
273
301
274
302
**Structured** content is returned as a JSON object in the `structuredContent` field of a result.
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.0 to 1.0 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
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,6 +203,14 @@ 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)
208
+
support optional
209
+
[annotations](/specification/draft/server/resources#annotations) that provide
210
+
metadata about audience, priority, and modification times. This is the same
211
+
annotation format used by resources and prompts.
212
+
</Note>
213
+
206
214
#### Text Content
207
215
208
216
```json
@@ -218,7 +226,11 @@ Tool results may contain [**structured**](#structured-content) or **unstructured
218
226
{
219
227
"type": "image",
220
228
"data": "base64-encoded-data",
221
-
"mimeType": "image/png"
229
+
"mimeType": "image/png",
230
+
"annotations": {
231
+
"audience": ["user"],
232
+
"priority": 0.9
233
+
}
222
234
}
223
235
```
224
236
@@ -247,6 +259,8 @@ or data. In this case, the tool will return a URI that can be subscribed to or f
247
259
}
248
260
```
249
261
262
+
Resource links support the same [Resource annotations](/specification/draft/server/resources#annotations) as regular resources to help clients understand how to use them.
263
+
250
264
<Info>
251
265
Resource links returned by tools are not guaranteed to appear in the results
252
266
of a `resources/list` request.
@@ -264,11 +278,18 @@ or data using a suitable [URI scheme](./resources#common-uri-schemes). Servers t
Embedded resources support the same [Resource annotations](/specification/draft/server/resources#annotations) as regular resources to help clients understand how to use them.
292
+
272
293
#### Structured Content
273
294
274
295
**Structured** content is returned as a JSON object in the `structuredContent` field of a result.
0 commit comments