Skip to content

ToolCallStreamPart

Namespace: Vercel.AI.Provider

public sealed class ToolCallStreamPart : LanguageModelStreamPart

A completed tool call.

Inheritance: object → LanguageModelStreamPart

View source

ToolCallStreamPart(string, string, string, JsonElement?)

Section titled “ToolCallStreamPart(string, string, string, JsonElement?)”
public ToolCallStreamPart(string toolCallId, string toolName, string argumentsJson, JsonElement? providerMetadata = null)

Creates a tool-call part.

Parameters

Name Type Description
toolCallId string
toolName string
argumentsJson string
providerMetadata JsonElement?

View source

public string ArgumentsJson { get; }

JSON arguments.

Value: string

View source

public bool Dynamic { get; init; }

True when the tool is not known up front, such as a provider-executed MCP tool. Maps to the call’s dynamic.

Value: bool

View source

public bool ProviderExecuted { get; init; }

True when the provider executed the tool, so the caller has nothing to run.

Value: bool

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata for this call.

Value: JsonElement?

View source

public string ToolCallId { get; }

Tool call id.

Value: string

View source

public string ToolName { get; }

Tool name.

Value: string

View source

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