22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/pinmark/mcp/tools/list_pending.rb', line 22
def call(server_context:)
queue = server_context.fetch(:queue)
pending = queue.pending.map do |entry|
{
"id" => entry["id"],
"node_id" => entry["node_id"],
"component" => entry["component"],
"source" => entry["source"],
"selector" => entry["selector"],
"text_excerpt" => entry["text_excerpt"],
"comment" => entry["comment"],
"page_path" => entry["page_path"],
"captured_at" => entry["captured_at"],
"ancestry" => entry["ancestry"]
}
end
Tools.text_response({ "count" => pending.size, "annotations" => pending })
end
|