Class: OpenAI::Models::Responses::ResponseOutputItem::McpCall

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_output_item.rb,
sig/openai/models/responses/response_output_item.rbs

Defined Under Namespace

Modules: Status

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

#initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call) ⇒ Object

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.

  • approval_request_id (defaults to: nil) —

    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 (defaults to: nil) —

    The error from the tool call, if any.

  • output (defaults to: nil) —

    The output from the tool call.

  • status (defaults to: nil) —

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

  • type (defaults to: :mcp_call) —

    The type of the item. Always mcp_call.



# File 'lib/openai/models/responses/response_output_item.rb', line 736

Instance Attribute Details

#approval_request_id ⇒ String?

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)


715
# File 'lib/openai/models/responses/response_output_item.rb', line 715

optional :approval_request_id, String, nil?: true

#arguments ⇒ String

A JSON string of the arguments passed to the tool.

Returns:

  • (String)


689
# File 'lib/openai/models/responses/response_output_item.rb', line 689

required :arguments, String

#error ⇒ OpenAI::Models::Responses::mcp_tool_call_error?

The error from the tool call, if any.

Returns:

  • (OpenAI::Models::Responses::mcp_tool_call_error, nil)


721
# File 'lib/openai/models/responses/response_output_item.rb', line 721

optional :error, union: -> { OpenAI::Responses::McpToolCallError }, nil?: true

#id ⇒ String

The unique ID of the tool call.

Returns:

  • (String)


683
# File 'lib/openai/models/responses/response_output_item.rb', line 683

required :id, String

#name ⇒ String

The name of the tool that was run.

Returns:

  • (String)


695
# File 'lib/openai/models/responses/response_output_item.rb', line 695

required :name, String

#output ⇒ String?

The output from the tool call.

Returns:

  • (String, nil)


727
# File 'lib/openai/models/responses/response_output_item.rb', line 727

optional :output, String, nil?: true

#server_label ⇒ String

The label of the MCP server running the tool.

Returns:

  • (String)


701
# File 'lib/openai/models/responses/response_output_item.rb', line 701

required :server_label, String

#status ⇒ OpenAI::Models::Responses::ResponseOutputItem::McpCall::status?

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

Returns:

  • (OpenAI::Models::Responses::ResponseOutputItem::McpCall::status, nil)


734
# File 'lib/openai/models/responses/response_output_item.rb', line 734

optional :status, enum: -> { OpenAI::Responses::ResponseOutputItem::McpCall::Status }

#type ⇒ :mcp_call

The type of the item. Always mcp_call.

Returns:

  • (:mcp_call)


707
# File 'lib/openai/models/responses/response_output_item.rb', line 707

required :type, const: :mcp_call

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


654
# File 'sig/openai/models/responses/response_output_item.rbs', line 654

def to_hash: -> {