struct
AI::OpenAI::Tools::Mcp
- AI::OpenAI::Tools::Mcp
- Struct
- Value
- Object
Overview
MCP (Model Context Protocol) tool.
Allows models to call tools exposed by remote MCP servers or service connectors.
Defined in:
ai/openai/tool/openai_tools.crConstant Summary
-
ID =
"openai.mcp" -
NAME =
"mcp"
Constructors
Instance Method Summary
-
#allowed_tools : Array(String) | AllowedToolsFilter | Nil
Allowed tool names or filter object.
- #args : Hash(String, JSON::Any)
-
#authorization : String | Nil
OAuth access token for the MCP server/connector.
-
#connector_id : String | Nil
Identifier for a service connector.
-
#headers : Hash(String, String) | Nil
Optional headers to include in MCP requests.
- #id : String
- #name : String
-
#require_approval : String | RequireApprovalFilter | Nil
Approval policy.
-
#server_description : String | Nil
Optional description of the server.
-
#server_label : String
Label to identify the MCP server.
-
#server_url : String | Nil
URL for the MCP server.
- #type : String
Constructor Detail
def self.new(server_label : String, allowed_tools : Array(String) | AllowedToolsFilter | Nil = nil, authorization : String | Nil = nil, connector_id : String | Nil = nil, headers : Hash(String, String) | Nil = nil, require_approval : String | RequireApprovalFilter | Nil = nil, server_description : String | Nil = nil, server_url : String | Nil = nil)
#