Commit e9403c5
committed
[Doc] Tweak an example for
`MCP::Resource` doesn't have `text` attribute:
https://github.com/modelcontextprotocol/ruby-sdk/blob/v0.1.0/lib/mcp/resource.rb#L8-L13
I've replaced it with attributes that it actually supports.
Also, the use of `text: "Hello, world!"` in the example of `server.resources_read_handler` implementation resulted in
an unexpected response the first time I worked with `Resource`. While it may not be the best (but better),
in my experience using Resources with Cline, `text: params[:uri]` served as a clearer response when interacting with an LLM,
making it easier to understand.MCP::Resource in the README1 parent fda5640 commit e9403c5
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
463 | | - | |
464 | | - | |
465 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
466 | 467 | | |
467 | 468 | | |
468 | 469 | | |
| |||
478 | 479 | | |
479 | 480 | | |
480 | 481 | | |
481 | | - | |
| 482 | + | |
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
485 | 486 | | |
486 | 487 | | |
487 | | - | |
| 488 | + | |
488 | 489 | | |
489 | 490 | | |
490 | 491 | | |
| |||
0 commit comments