class Riffer::Tools::Response

Riffer::Tools::Response represents the result of a tool execution.

All tools must return a Response object from their +call+ method. Use +Response.success+ for successful results and +Response.error+ for failures.

class MyTool < Riffer::Tool def call(context:, **kwargs) result = perform_operation Riffer::Tools::Response.success(result) rescue MyError => e Riffer::Tools::Response.error(e.message) end end