class

OpenAI::ToolChoiceMCP

Inherits JSON::Serializable < Reference < Object

Use this option to force the model to call a specific tool on a remote MCP server.

Constructors

new(type_value : ToolChoiceMCPType = ToolChoiceMCPType::Mcp, server_label : String = "", name : ToolChoiceMCPName | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

name
Source
name=(name : ToolChoiceMCPName | Nil)
Source
server_label

The label of the MCP server to use.

Source
server_label=(server_label : String)

The label of the MCP server to use.

Source
type_value

For MCP tools, the type is always mcp.

Source
type_value=(type_value : ToolChoiceMCPType)

For MCP tools, the type is always mcp.

Source