Class: OpenAI::Models::Beta::AgentTool::Mcp

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

Defined Under Namespace

Modules: ConnectionOrigin

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(allowed_tools:, connection_origin:, credential_id:, request_metadata:, required:, server_label:, transport:, type: :mcp) ⇒ Object



# File 'lib/openai/models/beta/agent_tool.rb', line 147


Instance Attribute Details

#allowed_tools::Array[String]?

The MCP tools the agent may call.



102
# File 'lib/openai/models/beta/agent_tool.rb', line 102

required :allowed_tools, OpenAI::Internal::Type::ArrayOf[String], nil?: true

#connection_originOpenAI::Models::Beta::AgentTool::Mcp::connection_origin

Where outbound MCP HTTP connections originate.



108
# File 'lib/openai/models/beta/agent_tool.rb', line 108

required :connection_origin, enum: -> { OpenAI::Beta::AgentTool::Mcp::ConnectionOrigin }

#credential_idString?

The attached vault credential selected for this MCP server, if any. Optional when exactly one attached credential matches the server URL.



115
# File 'lib/openai/models/beta/agent_tool.rb', line 115

required :credential_id, String, nil?: true

#request_metadata::Hash[Symbol, top]

Metadata included with requests to this MCP server.



121
# File 'lib/openai/models/beta/agent_tool.rb', line 121

required :request_metadata, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown]

#requiredBoolean

Whether this MCP server must initialize before the first turn.



127
# File 'lib/openai/models/beta/agent_tool.rb', line 127

required :required, OpenAI::Internal::Type::Boolean

#server_labelString

A label used to identify the MCP server in tool calls.



133
# File 'lib/openai/models/beta/agent_tool.rb', line 133

required :server_label, String

#transportOpenAI::Models::Beta::mcp_transport

The transport used to connect to the MCP server.



139
# File 'lib/openai/models/beta/agent_tool.rb', line 139

required :transport, union: -> { OpenAI::Beta::McpTransport }

#type:mcp

The type of the object. Always mcp.



145
# File 'lib/openai/models/beta/agent_tool.rb', line 145

required :type, const: :mcp

Instance Method Details

#to_hash{



153
# File 'sig/openai/models/beta/agent_tool.rbs', line 153

def to_hash: -> {