Class: HTM::MCP::MemoryStatsResource

Inherits:
FastMcp::Resource
  • Object
show all
Defined in:
lib/htm/mcp/resources.rb

Overview

Resource: Memory Statistics

Instance Method Summary collapse

Instance Method Details

#contentObject



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/htm/mcp/resources.rb', line 32

def content
  htm = Session.htm_instance
  {
    total_nodes:        HTM::Models::Node.count,
    total_tags:         HTM::Models::Tag.count,
    total_robots:       HTM::Models::Robot.count,
    current_robot:      htm.robot_name,
    robot_id:           htm.robot_id,
    robot_initialized:  Session.robot_initialized?,
    embedding_provider: HTM.configuration.embedding_provider,
    embedding_model:    HTM.configuration.embedding_model
  }.to_json
end