Skip to content

AnthropicToolResultContent

Namespace: Vercel.AI.Anthropic

public sealed class AnthropicToolResultContent : GeneratedContent

A provider-executed tool result returned inside a Messages response.

Inheritance: object → GeneratedContent

View source

AnthropicToolResultContent(string, string, string, bool, JsonElement?)

Section titled “AnthropicToolResultContent(string, string, string, bool, JsonElement?)”
public AnthropicToolResultContent(string toolCallId, string toolName, string resultJson, bool isError, JsonElement? providerMetadata)

Creates a tool result.

Parameters

Name Type Description
toolCallId string
toolName string
resultJson string
isError bool
providerMetadata JsonElement?

View source

public bool IsError { get; }

Whether the tool failed.

Value: bool

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata, including caller information.

Value: JsonElement?

View source

public string ResultJson { get; }

JSON result.

Value: string

View source

public string ToolCallId { get; }

Matching 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