@@ -373,7 +373,7 @@ This gem provides a `MCP::Tool` class that can be used to create tools in two wa
373373
374374``` ruby
375375class MyTool < MCP ::Tool
376- title " My Tool"
376+ title " My Tool" # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
377377 description " This tool performs specific functionality..."
378378 input_schema(
379379 properties: {
@@ -385,7 +385,8 @@ class MyTool < MCP::Tool
385385 read_only_hint: true ,
386386 destructive_hint: false ,
387387 idempotent_hint: true ,
388- open_world_hint: false
388+ open_world_hint: false ,
389+ title: " My Tool"
389390 )
390391
391392 def self .call (message: , server_context: )
@@ -401,10 +402,11 @@ tool = MyTool
401402``` ruby
402403tool = MCP ::Tool .define(
403404 name: " my_tool" ,
404- title: " My Tool" ,
405+ title: " My Tool" , # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
405406 description: " This tool performs specific functionality..." ,
406407 annotations: {
407- read_only_hint: true
408+ read_only_hint: true ,
409+ title: " My Tool"
408410 }
409411) do |args , server_context |
410412 MCP ::Tool ::Response .new ([{ type: " text" , text: " OK" }])
@@ -418,11 +420,11 @@ e.g. around authentication state.
418420
419421Tools can include annotations that provide additional metadata about their behavior. The following annotations are supported:
420422
421- - ` title ` : A human-readable title for the tool
422- - ` read_only_hint ` : Indicates if the tool only reads data (doesn't modify state)
423423- ` destructive_hint ` : Indicates if the tool performs destructive operations
424424- ` idempotent_hint ` : Indicates if the tool's operations are idempotent
425425- ` open_world_hint ` : Indicates if the tool operates in an open world context
426+ - ` read_only_hint ` : Indicates if the tool only reads data (doesn't modify state)
427+ - ` title ` : A human-readable title for the tool
426428
427429Annotations can be set either through the class definition using the ` annotations ` class method or when defining a tool using the ` define ` method.
428430
@@ -437,7 +439,7 @@ The `MCP::Prompt` class provides two ways to create prompts:
437439``` ruby
438440class MyPrompt < MCP ::Prompt
439441 prompt_name " my_prompt" # Optional - defaults to underscored class name
440- title " My Prompt"
442+ title " My Prompt" # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
441443 description " This prompt performs specific functionality..."
442444 arguments [
443445 MCP ::Prompt ::Argument .new (
@@ -474,7 +476,7 @@ prompt = MyPrompt
474476``` ruby
475477prompt = MCP ::Prompt .define(
476478 name: " my_prompt" ,
477- title: " My Prompt" ,
479+ title: " My Prompt" , # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
478480 description: " This prompt performs specific functionality..." ,
479481 arguments: [
480482 MCP ::Prompt ::Argument .new (
@@ -561,7 +563,7 @@ The `MCP::Resource` class provides a way to register resources with the server.
561563resource = MCP ::Resource .new (
562564 uri: " https://example.com/my_resource" ,
563565 name: " my-resource" ,
564- title: " My Resource" ,
566+ title: " My Resource" , # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
565567 description: " Lorem ipsum dolor sit amet" ,
566568 mime_type: " text/html" ,
567569)
0 commit comments