Class: GrowwMcp::Tools::GetSmartOrders

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

Class Method Summary collapse

Class Method Details

.call(server_context:, smart_order_type: nil, page: nil, page_size: nil) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/groww_mcp/tools/smart_order_tools.rb', line 22

def call(server_context:, smart_order_type: nil, page: nil, page_size: nil)
  client = server_context[:client]
  result = client.smart_order_list(smart_order_type: smart_order_type, page: page, page_size: page_size)
  format_response(result)
rescue GrowwMcp::ApiError => e
  error_response(e)
end