Class: OpenAI::Models::Responses::Tool::Mcp
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Responses::Tool::Mcp
- Defined in:
- lib/openai/models/responses/tool.rb
Defined Under Namespace
Modules: AllowedTools, RequireApproval
Instance Attribute Summary collapse
-
#allowed_tools ⇒ Array<String>, ...
List of allowed tool names or a filter object.
-
#headers ⇒ Hash{Symbol=>String}?
Optional HTTP headers to send to the MCP server.
-
#require_approval ⇒ OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter, ...
Specify which of the MCP server’s tools require approval.
-
#server_label ⇒ String
A label for this MCP server, used to identify it in tool calls.
-
#server_url ⇒ String
The URL for the MCP server.
-
#type ⇒ Symbol, :mcp
The type of the MCP tool.
Instance Method Summary collapse
-
#initialize(server_label: , server_url: , allowed_tools: nil, headers: nil, require_approval: nil, type: :mcp) ⇒ Object
constructor
Some parameter documentations has been truncated, see Mcp for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #dump, dump, #inspect, inspect, 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(server_label: , server_url: , allowed_tools: nil, headers: nil, require_approval: nil, type: :mcp) ⇒ Object
Some parameter documentations has been truncated, see OpenAI::Models::Responses::Tool::Mcp for more details.
Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](platform.openai.com/docs/guides/tools-remote-mcp).
|
# File 'lib/openai/models/responses/tool.rb', line 77
|
Instance Attribute Details
#allowed_tools ⇒ Array<String>, ...
List of allowed tool names or a filter object.
62 |
# File 'lib/openai/models/responses/tool.rb', line 62 optional :allowed_tools, union: -> { OpenAI::Responses::Tool::Mcp::AllowedTools }, nil?: true |
#headers ⇒ Hash{Symbol=>String}?
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
69 |
# File 'lib/openai/models/responses/tool.rb', line 69 optional :headers, OpenAI::Internal::Type::HashOf[String], nil?: true |
#require_approval ⇒ OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter, ...
Specify which of the MCP server’s tools require approval.
75 |
# File 'lib/openai/models/responses/tool.rb', line 75 optional :require_approval, union: -> { OpenAI::Responses::Tool::Mcp::RequireApproval }, nil?: true |
#server_label ⇒ String
A label for this MCP server, used to identify it in tool calls.
44 |
# File 'lib/openai/models/responses/tool.rb', line 44 required :server_label, String |
#server_url ⇒ String
The URL for the MCP server.
50 |
# File 'lib/openai/models/responses/tool.rb', line 50 required :server_url, String |
#type ⇒ Symbol, :mcp
The type of the MCP tool. Always ‘mcp`.
56 |
# File 'lib/openai/models/responses/tool.rb', line 56 required :type, const: :mcp |