Class: OpenAI::Models::Realtime::RealtimeMcpToolCall

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/realtime_mcp_tool_call.rb

Defined Under Namespace

Modules: Error

Instance Attribute Summary collapse

Instance Method Summary collapse

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, 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(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, type: :mcp_call) ⇒ Object

A Realtime item representing an invocation of a tool on an MCP server.

Parameters:

  • id (String)

    The unique ID of the tool call.

  • arguments (String)

    A JSON string of the arguments passed to the tool.

  • name (String)

    The name of the tool that was run.

  • server_label (String)

    The label of the MCP server running the tool.

  • approval_request_id (String, nil) (defaults to: nil)

    The ID of an associated approval request, if any.

  • error (OpenAI::Models::Realtime::RealtimeMcpProtocolError, OpenAI::Models::Realtime::RealtimeMcpToolExecutionError, OpenAI::Models::Realtime::RealtimeMcphttpError, nil) (defaults to: nil)

    The error from the tool call, if any.

  • output (String, nil) (defaults to: nil)

    The output from the tool call.

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

    The type of the item. Always ‘mcp_call`.



# File 'lib/openai/models/realtime/realtime_mcp_tool_call.rb', line 55

Instance Attribute Details

#approval_request_idString?

The ID of an associated approval request, if any.

Returns:

  • (String, nil)


41
# File 'lib/openai/models/realtime/realtime_mcp_tool_call.rb', line 41

optional :approval_request_id, String, nil?: true

#argumentsString

A JSON string of the arguments passed to the tool.

Returns:

  • (String)


17
# File 'lib/openai/models/realtime/realtime_mcp_tool_call.rb', line 17

required :arguments, String

#errorOpenAI::Models::Realtime::RealtimeMcpProtocolError, ...

The error from the tool call, if any.



47
# File 'lib/openai/models/realtime/realtime_mcp_tool_call.rb', line 47

optional :error, union: -> { OpenAI::Realtime::RealtimeMcpToolCall::Error }, nil?: true

#idString

The unique ID of the tool call.

Returns:

  • (String)


11
# File 'lib/openai/models/realtime/realtime_mcp_tool_call.rb', line 11

required :id, String

#nameString

The name of the tool that was run.

Returns:

  • (String)


23
# File 'lib/openai/models/realtime/realtime_mcp_tool_call.rb', line 23

required :name, String

#outputString?

The output from the tool call.

Returns:

  • (String, nil)


53
# File 'lib/openai/models/realtime/realtime_mcp_tool_call.rb', line 53

optional :output, String, nil?: true

#server_labelString

The label of the MCP server running the tool.

Returns:

  • (String)


29
# File 'lib/openai/models/realtime/realtime_mcp_tool_call.rb', line 29

required :server_label, String

#typeSymbol, :mcp_call

The type of the item. Always ‘mcp_call`.

Returns:

  • (Symbol, :mcp_call)


35
# File 'lib/openai/models/realtime/realtime_mcp_tool_call.rb', line 35

required :type, const: :mcp_call