Class: GrowwMcp::Tools::GetOrderDetail

Inherits:
BaseTool
  • Object
show all
Defined in:
lib/groww_mcp/tools/order_tools.rb

Class Method Summary collapse

Class Method Details

.call(server_context:, order_id:, segment: "CASH") ⇒ Object



60
61
62
63
64
65
66
# File 'lib/groww_mcp/tools/order_tools.rb', line 60

def call(server_context:, order_id:, segment: "CASH")
  client = server_context[:client]
  result = client.order_detail(order_id, segment: segment)
  format_response(result)
rescue GrowwMcp::ApiError => e
  error_response(e)
end