Class: RubyEventStore::MCP::Tools::Stats
- Inherits:
-
Object
- Object
- RubyEventStore::MCP::Tools::Stats
- Defined in:
- lib/ruby_event_store/mcp/tools/stats.rb
Instance Method Summary collapse
Instance Method Details
#call(event_store, args) ⇒ Object
24 25 26 27 |
# File 'lib/ruby_event_store/mcp/tools/stats.rb', line 24 def call(event_store, args) specification = args.key?("stream") ? event_store.read.stream(args.fetch("stream")) : event_store.read format_stats(specification, stream: args["stream"]) end |
#name ⇒ Object
7 8 9 |
# File 'lib/ruby_event_store/mcp/tools/stats.rb', line 7 def name "stats" end |
#schema ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ruby_event_store/mcp/tools/stats.rb', line 11 def schema { name: name, description: "Show event count and unique event types. Use stream to get per-stream stats.", inputSchema: { type: "object", properties: { stream: { type: "string", description: "Show stats for a specific stream" } } } } end |