@@ -406,7 +406,7 @@ tool = MCP::Tool.define(
406406 read_only_hint: true
407407 }
408408) do |args , server_context |
409- Tool ::Response .new ([{ type: " text" , text: " OK" }])
409+ MCP :: Tool ::Response .new ([{ type: " text" , text: " OK" }])
410410end
411411```
412412
@@ -438,7 +438,7 @@ class MyPrompt < MCP::Prompt
438438 prompt_name " my_prompt" # Optional - defaults to underscored class name
439439 description " This prompt performs specific functionality..."
440440 arguments [
441- Prompt ::Argument .new (
441+ MCP :: Prompt ::Argument .new (
442442 name: " message" ,
443443 description: " Input message" ,
444444 required: true
@@ -447,16 +447,16 @@ class MyPrompt < MCP::Prompt
447447
448448 class << self
449449 def template (args , server_context: )
450- Prompt ::Result .new (
450+ MCP :: Prompt ::Result .new (
451451 description: " Response description" ,
452452 messages: [
453- Prompt ::Message .new (
453+ MCP :: Prompt ::Message .new (
454454 role: " user" ,
455- content: Content ::Text .new (" User message" )
455+ content: MCP :: Content ::Text .new (" User message" )
456456 ),
457- Prompt ::Message .new (
457+ MCP :: Prompt ::Message .new (
458458 role: " assistant" ,
459- content: Content ::Text .new (args[" message" ])
459+ content: MCP :: Content ::Text .new (args[" message" ])
460460 )
461461 ]
462462 )
@@ -474,23 +474,23 @@ prompt = MCP::Prompt.define(
474474 name: " my_prompt" ,
475475 description: " This prompt performs specific functionality..." ,
476476 arguments: [
477- Prompt ::Argument .new (
477+ MCP :: Prompt ::Argument .new (
478478 name: " message" ,
479479 description: " Input message" ,
480480 required: true
481481 )
482482 ]
483483) do |args , server_context: |
484- Prompt ::Result .new (
484+ MCP :: Prompt ::Result .new (
485485 description: " Response description" ,
486486 messages: [
487- Prompt ::Message .new (
487+ MCP :: Prompt ::Message .new (
488488 role: " user" ,
489- content: Content ::Text .new (" User message" )
489+ content: MCP :: Content ::Text .new (" User message" )
490490 ),
491- Prompt ::Message .new (
491+ MCP :: Prompt ::Message .new (
492492 role: " assistant" ,
493- content: Content ::Text .new (args[" message" ])
493+ content: MCP :: Content ::Text .new (args[" message" ])
494494 )
495495 ]
496496 )
@@ -502,10 +502,10 @@ e.g. around authentication state or user preferences.
502502
503503### Key Components
504504
505- - ` Prompt::Argument ` - Defines input parameters for the prompt template
506- - ` Prompt::Message ` - Represents a message in the conversation with a role and content
507- - ` Prompt::Result ` - The output of a prompt template containing description and messages
508- - ` Content::Text ` - Text content for messages
505+ - ` MCP:: Prompt::Argument` - Defines input parameters for the prompt template
506+ - ` MCP:: Prompt::Message` - Represents a message in the conversation with a role and content
507+ - ` MCP:: Prompt::Result` - The output of a prompt template containing description and messages
508+ - ` MCP:: Content::Text` - Text content for messages
509509
510510### Usage
511511
0 commit comments