SearchableTool
Namespace: Vercel.AI.Operations
public sealed class SearchableToolA tool the search step can hide until it is discovered.
Inheritance: object
Constructors
Section titled “Constructors”SearchableTool(string?)
Section titled “SearchableTool(string?)”public SearchableTool(string? description = null)Creates a tool.
Parameters
| Name | Type | Description |
|---|---|---|
description |
string |
Properties
Section titled “Properties”Caller
Section titled “Caller”public ToolCallerBinding? Caller { get; set; }Local or provider caller bound to this tool.
Value: ToolCallerBinding
DeferLoading
Section titled “DeferLoading”public bool DeferLoading { get; set; }True when the tool stays hidden until search discovers it.
Value: bool
Describe
Section titled “Describe”public Func<IReadOnlyDictionary<string, object?>, string?>? Describe { get; set; }Description resolved from the current tool context.
Value: Func<IReadOnlyDictionary<string, object>, string>
Description
Section titled “Description”public string? Description { get; set; }Static description.
Value: string
Execute
Section titled “Execute”public Func<string, IReadOnlyDictionary<string, object?>?, Task<ToolSearchMatchList>>? Execute { get; set; }Bound search implementation. The unbound search tool throws.
Value: Func<string, IReadOnlyDictionary<string, object>, Task<ToolSearchMatchList>>
InputSchemaJson
Section titled “InputSchemaJson”public string? InputSchemaJson { get; set; }Input schema JSON, kept stable across steps.
Value: string
Invoke
Section titled “Invoke”public Func<string, CancellationToken, Task<string>>? Invoke { get; set; }Executes a discovered tool.
Value: Func<string, CancellationToken, Task<string>>
IsSearch
Section titled “IsSearch”public bool IsSearch { get; set; }True when this tool is the search tool. Copying the tool keeps the flag.
Value: bool
Methods
Section titled “Methods”Copy()
Section titled “Copy()”public SearchableTool Copy()Copies the search marker and the other fields.
Returns: SearchableTool
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product