Class: RosettAi::Mcp::Tools::LicenseStatusTool

Inherits:
Object
  • Object
show all
Defined in:
lib/rosett_ai/mcp/tools/license_status_tool.rb

Overview

MCP tool: show license status.

Returns the current license activation status. Read-only operation.

Author:

  • hugo

  • claude

Constant Summary collapse

TOOL_NAME =
'rai_license_status'
DESCRIPTION =
'Show rai license activation status'
ANNOTATIONS =
{
  'readOnlyHint' => true,
  'destructiveHint' => false,
  'idempotentHint' => true,
  'openWorldHint' => false
}.freeze

Instance Method Summary collapse

Instance Method Details

#callHash

Executes the license status check.

Returns:

  • (Hash)

    license status information



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/rosett_ai/mcp/tools/license_status_tool.rb', line 30

def call
  manager = RosettAi::Licensing::Manager.new
  status = manager.status
  {
    active: status[:active],
    tier: status[:tier],
    expires_at: status[:expires_at]&.to_s,
    features: status[:features]
  }
rescue StandardError => e
  ResponseHelper.error("License check failed: #{e.message}")
end