Class: OpenAI::Models::Beta::McpTransportParam::Stdio

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/mcp_transport_param.rb,
sig/openai/models/beta/mcp_transport_param.rbs

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(command:, cwd:, args: nil, env: nil, env_vars: nil, type: :stdio) ⇒ Object

Starts an MCP server as a local process.

Parameters:

  • command (String)

    The command used to start the MCP server.

  • cwd (String)

    The working directory used to start the MCP server.

  • args (Array<String>, nil) (defaults to: nil)

    Arguments passed to the MCP server command.

  • env (Hash{Symbol=>String}, nil) (defaults to: nil)

    Environment variables set for the MCP server process.

  • env_vars (Array<String>, nil) (defaults to: nil)

    Environment variable names to inherit from the selected execution environment.

  • type (Symbol, :stdio) (defaults to: :stdio)

    The type of the object. Always stdio.



# File 'lib/openai/models/beta/mcp_transport_param.rb', line 96

Instance Attribute Details

#argsArray<String>?

Arguments passed to the MCP server command.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


82
# File 'lib/openai/models/beta/mcp_transport_param.rb', line 82

optional :args, OpenAI::Internal::Type::ArrayOf[String], nil?: true

#commandString

The command used to start the MCP server.

Parameters:

  • value (String)

Returns:

  • (String)


64
# File 'lib/openai/models/beta/mcp_transport_param.rb', line 64

required :command, String

#cwdString

The working directory used to start the MCP server.

Parameters:

  • value (String)

Returns:

  • (String)


70
# File 'lib/openai/models/beta/mcp_transport_param.rb', line 70

required :cwd, String

#envHash{Symbol=>String}?

Environment variables set for the MCP server process.

Parameters:

  • value (::Hash[Symbol, String], nil)

Returns:

  • (Hash{Symbol=>String}, nil)


88
# File 'lib/openai/models/beta/mcp_transport_param.rb', line 88

optional :env, OpenAI::Internal::Type::HashOf[String], nil?: true

#env_varsArray<String>?

Environment variable names to inherit from the selected execution environment.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


94
# File 'lib/openai/models/beta/mcp_transport_param.rb', line 94

optional :env_vars, OpenAI::Internal::Type::ArrayOf[String], nil?: true

#typeSymbol, :stdio

The type of the object. Always stdio.

Parameters:

  • value (:stdio)

Returns:

  • (Symbol, :stdio)


76
# File 'lib/openai/models/beta/mcp_transport_param.rb', line 76

required :type, const: :stdio

Instance Method Details

#to_hash{

Returns:

  • ({)


75
# File 'sig/openai/models/beta/mcp_transport_param.rbs', line 75

def to_hash: -> {