Class: HTM::MCP::RecentMemoriesResource
- Inherits:
-
FastMcp::Resource
- Object
- FastMcp::Resource
- HTM::MCP::RecentMemoriesResource
- Defined in:
- lib/htm/mcp/resources.rb
Overview
Resource: Recent Memories
Instance Method Summary collapse
Instance Method Details
#content ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/htm/mcp/resources.rb', line 64 def content recent = HTM::Models::Node.eager(:tags) .order(Sequel.desc(:created_at)) .limit(20) .all .map do |node| { id: node.id, content: node.content[0..200], tags: node..map(&:name), created_at: node.created_at.iso8601 } end { recent_memories: recent }.to_json end |