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 =

Returns MCP tool identifier string.

Returns:

  • (String)

    MCP tool identifier string.

'rai_license_status'
DESCRIPTION =

Returns Human-readable description of this tool.

Returns:

  • (String)

    Human-readable description of this tool.

'Show rai license activation status'
ANNOTATIONS =

Returns MCP protocol annotations describing tool capabilities.

Returns:

  • (Hash)

    MCP protocol annotations describing tool capabilities.

{
  '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



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

def call
  result = RosettAi::Licensing::LicenseValidator.new.validate
  {
    active: result[:valid],
    tier: result[:tier]&.to_s,
    key_present: result[:key_present],
    message: result[:message]
  }
rescue StandardError => e
  ResponseHelper.error("License check failed: #{e.message}")
end