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
Document non-text content types, binary resources, and elicitation schema options
## Motivation and Context
The SDK tiering system (SEP-1730) requires Tier 1 SDKs to document all non-experimental features
with examples. A documentation coverage audit against the canonical feature list found that the README.md
only showed `type: "text"` content everywhere, leaving several implemented features invisible to users:
- Tool responses with image, audio, and embedded resource content (`MCP::Content::Image` / `Audio` / `EmbeddedResource`)
- Prompt messages carrying image or embedded resource content
- Reading binary resources via `MCP::Resource::BlobContents`
- Reading resources through a registered resource template URI
- Elicitation `requested_schema` flat-object restrictions and client-side validation behavior
- Elicitation default values (SEP-1034) and enum values with `enumNames` (SEP-1330)
All of these are existing SDK capabilities; the conformance suite already exercises them.
This change documents each with prose and a runnable-style example, closing every documentation gap
that does not require new code. Legacy SSE transport remains undocumented because the SDK intentionally
does not implement it.
## How Has This Been Tested?
Documentation-only change. Every code example was written against the current public API in lib/
(`MCP::Content`, `MCP::Resource::TextContents` / `BlobContents`, `MCP::Prompt::Message`, `create_form_elicitation`)
and cross-checked with the working implementations in conformance/server.rb, which pass the conformance suite.
## Breaking Changes
None. This only adds sections to README.md.
MCP spec includes [Prompts](https://modelcontextprotocol.io/specification/latest/server/prompts), which enable servers to define reusable prompt templates and workflows that clients can easily surface to users and LLMs.
@@ -1010,6 +1057,49 @@ The server will handle prompt listing and execution through the MCP protocol met
1010
1057
-`prompts/list` - Lists all registered prompts and their schemas
1011
1058
-`prompts/get` - Retrieves and executes a specific prompt with arguments
1012
1059
1060
+
### Prompts with Image and Embedded Resource Content
1061
+
1062
+
Prompt messages are not limited to text. The same `MCP::Content` types used in tool responses can be used as message content,
1063
+
letting a prompt template include images or inline resource contents. Unlike tool responses, the content object is passed directly rather than as a hash;
1064
+
`MCP::Prompt::Message` serializes it when the prompt result is returned:
1065
+
1066
+
```ruby
1067
+
classCodeReviewPrompt < MCP::Prompt
1068
+
prompt_name "code_review"
1069
+
description "Review a source file with an accompanying diagram"
1070
+
arguments [
1071
+
MCP::Prompt::Argument.new(name:"file_uri", description:"URI of the file to review", required:true),
0 commit comments