Skip to content

GeneratedToolApprovalRequest

Namespace: Vercel.AI.Provider

public sealed class GeneratedToolApprovalRequest : GeneratedContent

A request to approve a tool call, such as one a provider-executed MCP tool needs. A model returns it with ToolCallId only; the generation loop fills in ToolCall.

Inheritance: object → GeneratedContent

View source

GeneratedToolApprovalRequest(string, string)

Section titled “GeneratedToolApprovalRequest(string, string)”
public GeneratedToolApprovalRequest(string approvalId, string toolCallId)

Creates an approval request.

Parameters

Name Type Description
approvalId string
toolCallId string

View source

public string ApprovalId { get; }

Approval id the response must carry.

Value: string

View source

public GeneratedToolCall? ToolCall { get; init; }

The tool call that needs approval, once the generation loop resolved it.

Value: GeneratedToolCall

View source

public string ToolCallId { get; }

Id of the tool call that needs approval.

Value: string

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product