Class: SwarmCLI::McpServeOptions

Inherits:
Object
  • Object
show all
Includes:
TTY::Option
Defined in:
lib/swarm_cli/mcp_serve_options.rb

Overview

Options for the swarm mcp serve command

Instance Method Summary collapse

Instance Method Details

#config_fileObject

Convenience accessor



40
41
42
# File 'lib/swarm_cli/mcp_serve_options.rb', line 40

def config_file
  params[:config_file]
end

#validate!Object



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/swarm_cli/mcp_serve_options.rb', line 26

def validate!
  errors = []

  # Config file must exist
  if config_file && !File.exist?(config_file)
    errors << "Configuration file not found: #{config_file}"
  end

  unless errors.empty?
    raise SwarmCLI::ExecutionError, errors.join("\n")
  end
end