Class: OpenAI::Models::Responses::ResponseInputItem::McpCall

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

Defined Under Namespace

Modules: Status

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, status: nil, type: :mcp_call) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Responses::ResponseInputItem::McpCall for more details.

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)

    Unique identifier for the MCP tool call approval request.

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

    The error from the tool call, if any.

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

    The output from the tool call.

  • status (Symbol, OpenAI::Models::Responses::ResponseInputItem::McpCall::Status) (defaults to: nil)

    The status of the tool call. One of in_progress, completed, incomplete, `c

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

    The type of the item. Always mcp_call.



# File 'lib/openai/models/responses/response_input_item.rb', line 1709

Instance Attribute Details

#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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


1688
# File 'lib/openai/models/responses/response_input_item.rb', line 1688

optional :approval_request_id, String, nil?: true

#argumentsString

A JSON string of the arguments passed to the tool.

Parameters:

  • value (String)

Returns:

  • (String)


1662
# File 'lib/openai/models/responses/response_input_item.rb', line 1662

required :arguments, String

#errorString?

The error from the tool call, if any.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


1694
# File 'lib/openai/models/responses/response_input_item.rb', line 1694

optional :error, String, nil?: true

#idString

The unique ID of the tool call.

Parameters:

  • value (String)

Returns:

  • (String)


1656
# File 'lib/openai/models/responses/response_input_item.rb', line 1656

required :id, String

#nameString

The name of the tool that was run.

Parameters:

  • value (String)

Returns:

  • (String)


1668
# File 'lib/openai/models/responses/response_input_item.rb', line 1668

required :name, String

#outputString?

The output from the tool call.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


1700
# File 'lib/openai/models/responses/response_input_item.rb', line 1700

optional :output, String, nil?: true

#server_labelString

The label of the MCP server running the tool.

Parameters:

  • value (String)

Returns:

  • (String)


1674
# File 'lib/openai/models/responses/response_input_item.rb', line 1674

required :server_label, String

#statusSymbol, ...

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



1707
# File 'lib/openai/models/responses/response_input_item.rb', line 1707

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

#typeSymbol, :mcp_call

The type of the item. Always mcp_call.

Parameters:

  • value (:mcp_call)

Returns:

  • (Symbol, :mcp_call)


1680
# File 'lib/openai/models/responses/response_input_item.rb', line 1680

required :type, const: :mcp_call

Instance Method Details

#to_hash{

Returns:

  • ({)


1206
# File 'sig/openai/models/responses/response_input_item.rbs', line 1206

def to_hash: -> {