OutputItemMcpCallBuilder Class

Definition

Scoped builder for an MCP tool call output item. Provides methods for lifecycle events and streaming arguments.

public class OutputItemMcpCallBuilder : Azure.AI.AgentServer.Responses.OutputItemBuilder<Azure.AI.AgentServer.Responses.Models.OutputItemMcpToolCall>
type OutputItemMcpCallBuilder = class
    inherit OutputItemBuilder<OutputItemMcpToolCall>
Public Class OutputItemMcpCallBuilder
Inherits OutputItemBuilder(Of OutputItemMcpToolCall)
Inheritance
OutputItemMcpCallBuilder

Constructors

Name Description
OutputItemMcpCallBuilder()

Initializes a new instance of OutputItemMcpCallBuilder for mocking.

Properties

Name Description
ItemId

The auto-generated item ID for this output item.

(Inherited from OutputItemBuilder<T>)
Name

The MCP tool name.

OutputIndex

The output index assigned to this output item.

(Inherited from OutputItemBuilder<T>)
ServerLabel

The MCP server label.

Methods

Name Description
Arguments(IAsyncEnumerable<String>, CancellationToken)

Convenience generator that yields the complete arguments sub-item event sequence from streaming chunks (S-053, streaming mode per S-054). Each chunk is emitted as a delta immediately (S-055).

Arguments(String)

Convenience generator that yields the complete arguments sub-item event sequence from a single string (S-053, complete-text mode per S-054).

EmitAdded()

Produces a response.output_item.added event with an in-progress MCP tool call item.

EmitAdded(T)

Produces a response.output_item.added event wrapping the given item.

(Inherited from OutputItemBuilder<T>)
EmitArgumentsDelta(String)

Produces a response.mcp_call_arguments.delta event with the given argument chunk.

EmitArgumentsDone(String)

Produces a response.mcp_call_arguments.done event with the complete arguments.

EmitCompleted()

Produces a response.mcp_call.completed event and records the terminal status so that EmitDone() uses Completed (S-060).

EmitDone()

Produces a response.output_item.done event with the completed MCP tool call item. Uses the terminal status recorded by EmitCompleted() or EmitFailed(), defaulting to Completed if neither was called (S-060).

EmitDone(T)

Produces a response.output_item.done event wrapping the given item and tracks it in the response's output list.

(Inherited from OutputItemBuilder<T>)
EmitFailed()

Produces a response.mcp_call.failed event and records the terminal status so that EmitDone() uses Failed (S-060).

EmitInProgress()

Produces a response.mcp_call.in_progress event.

Applies to