class

OpenAI::MCPToolCall

Inherits JSON::Serializable < Reference < Object

An invocation of a tool on an MCP server.

Constructors

new(type_value : MCPToolCallType = MCPToolCallType::McpCall, id : String = "", server_label : String = "", name : String = "", arguments : String = "", output : MCPToolCallOutput | Nil = nil, error : MCPToolCallError | Nil = nil, status : MCPToolCallStatus | Nil = nil, approval_request_id : MCPToolCallApprovalRequestId | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

approval_request_id
Source
approval_request_id=(approval_request_id : MCPToolCallApprovalRequestId | Nil)
Source
arguments

A JSON string of the arguments passed to the tool.

Source
arguments=(arguments : String)

A JSON string of the arguments passed to the tool.

Source
error
Source
error=(error : MCPToolCallError | Nil)
Source
id

The unique ID of the tool call.

Source
id=(id : String)

The unique ID of the tool call.

Source
name

The name of the tool that was run.

Source
name=(name : String)

The name of the tool that was run.

Source
output
Source
output=(output : MCPToolCallOutput | Nil)
Source
server_label

The label of the MCP server running the tool.

Source
server_label=(server_label : String)

The label of the MCP server running the tool.

Source
status

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

Source
status=(status : MCPToolCallStatus | Nil)

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

Source
type_value

The type of the item. Always mcp_call.

Source
type_value=(type_value : MCPToolCallType)

The type of the item. Always mcp_call.

Source