Class: TrakFlow::Mcp::Resources::DependencyGraph
- Inherits:
-
BaseResource
- Object
- FastMcp::Resource
- BaseResource
- TrakFlow::Mcp::Resources::DependencyGraph
- Defined in:
- lib/trak_flow/mcp/resources/dependency_graph.rb
Instance Method Summary collapse
Methods inherited from BaseResource
Instance Method Details
#content ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/trak_flow/mcp/resources/dependency_graph.rb', line 12 def content self.class.with_database do |db| tasks = db.list_tasks result = { nodes: tasks.map { |t| { id: t.id, title: t.title, status: t.status } }, edges: edges_for(db, tasks) } Oj.dump(result, mode: :compat, indent: 2) end end |