Skip to content

Commit c484b79

Browse files
authored
Fix incorrect name/title fields in ResourceContents documentation (modelcontextprotocol#1500)
Commit 1c54a77 (PR modelcontextprotocol#663) incorrectly added 'name' and 'title' fields to ResourceContents examples in the documentation. According to the schema, these fields only exist on Resource objects (used in resources/list), not on ResourceContents (TextResourceContents/BlobResourceContents) which are used in: - resources/read responses - embedded resources in prompts and tools - resource update notifications This commit removes the incorrectly documented fields to match the actual schema definition where ResourceContents only contains: - uri (required) - mimeType (optional) - text or blob field depending on content type
1 parent ad8526e commit c484b79

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

docs/specification/draft/server/prompts.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ Embedded resources allow referencing server-side resources directly in messages:
251251
"type": "resource",
252252
"resource": {
253253
"uri": "resource://example",
254-
"name": "example",
255-
"title": "My Example Resource",
256254
"mimeType": "text/plain",
257255
"text": "Resource content"
258256
}

docs/specification/draft/server/resources.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ To retrieve resource contents, clients send a `resources/read` request:
157157
"contents": [
158158
{
159159
"uri": "file:///project/src/main.rs",
160-
"name": "main.rs",
161-
"title": "Rust Software Application Main File",
162160
"mimeType": "text/x-rust",
163161
"text": "fn main() {\n println!(\"Hello world!\");\n}"
164162
}
@@ -240,8 +238,7 @@ to specific resources and receive notifications when they change:
240238
"jsonrpc": "2.0",
241239
"method": "notifications/resources/updated",
242240
"params": {
243-
"uri": "file:///project/src/main.rs",
244-
"title": "Rust Software Application Main File"
241+
"uri": "file:///project/src/main.rs"
245242
}
246243
}
247244
```
@@ -293,8 +290,6 @@ Resources can contain either text or binary data:
293290
```json
294291
{
295292
"uri": "file:///example.txt",
296-
"name": "example.txt",
297-
"title": "Example Text File",
298293
"mimeType": "text/plain",
299294
"text": "Resource content"
300295
}
@@ -305,8 +300,6 @@ Resources can contain either text or binary data:
305300
```json
306301
{
307302
"uri": "file:///example.png",
308-
"name": "example.png",
309-
"title": "Example Image",
310303
"mimeType": "image/png",
311304
"blob": "base64-encoded-data"
312305
}

docs/specification/draft/server/tools.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ or data using a suitable [URI scheme](./resources#common-uri-schemes). Servers t
283283
"type": "resource",
284284
"resource": {
285285
"uri": "file:///project/src/main.rs",
286-
"title": "Project Rust Main File",
287286
"mimeType": "text/x-rust",
288287
"text": "fn main() {\n println!(\"Hello world!\");\n}",
289288
"annotations": {

0 commit comments

Comments
 (0)