Skip to main content

Function: searchResultBlock()

searchResultBlock(input): SearchResultBlock

Defined in: packages/core/src/utils/tool-content.ts:40

A search_result content block (Anthropic's shape): one hit or passage, where it came from, and its words — one string, or several passages, each a text block Claude can cite on its own. Citations are on unless turned off.

Anthropic accepts a tool result holding search results only when every block in it is a search result, and citations on for all of them or none: a tool that also has JSON to return carries it as a search result too.

Parameters​

input​

citations?​

boolean

passages?​

readonly string[]

source​

string

text?​

string

title​

string

Returns​

SearchResultBlock