Class: SampleResource
- Inherits:
-
ApplicationResource
- Object
- McpOnRuby::Resource
- ApplicationResource
- SampleResource
- Defined in:
- lib/mcp_on_ruby/generators/templates/sample_resource.rb
Overview
Sample resource demonstrating MCP resource creation
Instance Attribute Summary
Attributes inherited from McpOnRuby::Resource
#description, #metadata, #mime_type, #name, #tags, #uri
Instance Method Summary collapse
-
#initialize ⇒ SampleResource
constructor
A new instance of SampleResource.
Methods inherited from McpOnRuby::Resource
#authorized?, #read, #template?, #template_params, #to_schema
Constructor Details
#initialize ⇒ SampleResource
Returns a new instance of SampleResource.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/mcp_on_ruby/generators/templates/sample_resource.rb', line 5 def initialize super( uri: 'sample_data', name: 'Sample Data', description: 'A sample resource that provides application statistics', mime_type: 'application/json', metadata: { category: 'sample', version: '1.0.0' }, tags: ['sample', 'stats'] ) end |