File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -460,9 +460,10 @@ The `MCP::Resource` class provides a way to register resources with the server.
460460
461461``` ruby 
462462resource =  MCP ::Resource .new (
463-   uri:  " example.com/my_resource" 
464-   mime_type:  " text/plain" 
465-   text:  " Lorem ipsum dolor sit amet" 
463+   uri:  " https://example.com/my_resource" 
464+   name:  " My Resource" 
465+   description:  " Lorem ipsum dolor sit amet" 
466+   mime_type:  " text/html" 
466467)
467468
468469server =  MCP ::Server .new (
@@ -478,13 +479,13 @@ server.resources_read_handler do |params|
478479  [{
479480    uri:  params[:uri ],
480481    mimeType:  " text/plain" 
481-     text:  " Hello, world! " 
482+     text:  params[ :uri ] ,
482483  }]
483484end 
484485
485486``` 
486487
487- otherwise ' resources/read'  requests will be a no-op.
488+ otherwise ` resources/read `  requests will be a no-op.
488489
489490## Releases  
490491
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments