Class: Pinmark::Mcp::Tools::MarkAddressed
- Inherits:
-
MCP::Tool
- Object
- MCP::Tool
- Pinmark::Mcp::Tools::MarkAddressed
- Defined in:
- lib/pinmark/mcp/tools/mark_addressed.rb
Class Method Summary collapse
Class Method Details
.call(id:, server_context:) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/pinmark/mcp/tools/mark_addressed.rb', line 23 def call(id:, server_context:) queue = server_context.fetch(:queue) result = queue.mark_addressed(id) unless result[:found] return Tools.text_response({ "ok" => false, "error" => "No annotation with id=#{id}" }) end Tools.text_response({ "ok" => true, "id" => id, "already_addressed" => result[:already_addressed] }) end |