Class: OpenAI::Models::BetaResponseItem::Beta::BetaResponseItem::McpCall

Inherits:
Internal::Type::BaseModel show all
Defined in:
sig/openai/models/beta/beta_response_item.rbs

Defined Under Namespace

Modules: Status Classes: Agent

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

#initializeObject

Parameters:

  • id

    The unique ID of the tool call.

  • arguments

    A JSON string of the arguments passed to the tool.

  • name

    The name of the tool that was run.

  • server_label

    The label of the MCP server running the tool.

  • agent

    The agent that produced this item.

  • approval_request_id

    Unique identifier for the MCP tool call approval request. Include this value in a subsequent mcp_approval_response input to approve or reject the corresponding tool call.

  • error

    The error from the tool call, if any.

  • output

    The output from the tool call.

  • status

    The status of the tool call. One of in_progress, completed, incomplete, calling, or failed.

  • type

    The type of the item. Always mcp_call.



1519
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1519

def initialize: (

Instance Attribute Details

#agentOpenAI::Beta::BetaResponseItem::McpCall::Agent?

The agent that produced this item.

Returns:

  • (OpenAI::Beta::BetaResponseItem::McpCall::Agent, nil)


1473
1474
1475
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1473

def agent
  @agent
end

#approval_request_idString?

Unique identifier for the MCP tool call approval request. Include this value in a subsequent mcp_approval_response input to approve or reject the corresponding tool call.

Returns:

  • (String, nil)


1478
1479
1480
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1478

def approval_request_id
  @approval_request_id
end

#argumentsString

A JSON string of the arguments passed to the tool.

Returns:

  • (String)


1461
1462
1463
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1461

def arguments
  @arguments
end

#errorOpenAI::Models::Beta::beta_mcp_tool_call_error?

The error from the tool call, if any.

Returns:

  • (OpenAI::Models::Beta::beta_mcp_tool_call_error, nil)


1481
1482
1483
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1481

def error
  @error
end

#idString

The unique ID of the tool call.

Returns:

  • (String)


1458
1459
1460
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1458

def id
  @id
end

#nameString

The name of the tool that was run.

Returns:

  • (String)


1464
1465
1466
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1464

def name
  @name
end

#outputString?

The output from the tool call.

Returns:

  • (String, nil)


1484
1485
1486
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1484

def output
  @output
end

#server_labelString

The label of the MCP server running the tool.

Returns:

  • (String)


1467
1468
1469
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1467

def server_label
  @server_label
end

#statusOpenAI::Models::Beta::BetaResponseItem::McpCall::status? (readonly)

The status of the tool call. One of in_progress, completed, incomplete, calling, or failed.

Returns:

  • (OpenAI::Models::Beta::BetaResponseItem::McpCall::status, nil)


1488
1489
1490
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1488

def status
  @status
end

#type:mcp_call

The type of the item. Always mcp_call.

Returns:

  • (:mcp_call)


1470
1471
1472
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1470

def type
  @type
end

Instance Method Details

#status=Object (readonly)

The status of the tool call. One of in_progress, completed, incomplete, calling, or failed.



1492
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1492

def status=: (

#to_hash{

Returns:

  • ({)


1532
# File 'sig/openai/models/beta/beta_response_item.rbs', line 1532

def to_hash: -> {