Skip to content

ToolSearch

Namespace: Vercel.AI.Operations

public static class ToolSearch

Creates the search tool. Maps to toolSearch.

Inheritance: object

View source

public const string Description = "Search for tools by keywords in their names and descriptions. Returns up to five matching tools. Matches become available on the next model step, after this execution finishes. Wait for their tool definitions before calling the discovered tools. If no tools match, try different keywords."

Description copied onto the search tool.

Value: string

View source

public static SearchableTool Create()

Creates an unbound search tool. Its execute method throws until a generation binds it.

Returns: SearchableTool

View source

public static bool IsSearch(SearchableTool? tool)

True when the tool carries the search marker.

Parameters

Name Type Description
tool SearchableTool

Returns: bool

View source

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