Module: Studio

Defined in:
lib/studio.rb,
lib/studio/tool.rb,
lib/studio/version.rb,
lib/studio/blueprint.rb

Overview

rubocop:todo Style/Documentation

Defined Under Namespace

Classes: Blueprint, Error, Tool

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.serve(argv) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/studio.rb', line 14

def self.serve(argv)
  if argv.empty?
    warn "Usage: studio <command> [blueprint_args...]"
    exit 1
  end

  blueprint = Blueprint.new(argv)
  tool_class = Tool.for_blueprint(blueprint)

  server = MCP::Server.new(
    name: "studio_server",
    tools: [tool_class]
  )

  transport = MCP::Transports::StdioTransport.new(server)
  transport.open
rescue StandardError => e
  warn "Studio error: #{e.message}"
  exit 1
end