SelectServerToolsForPromptOptions
Defined in: src/lib/tools/serverTools.ts:1620
Options for selectServerToolsForPrompt.
Properties
activeToolSets?
optionalactiveToolSets:string[]
Defined in: src/lib/tools/serverTools.ts:1657
Tool-set names that are sticky for this conversation — the same list you
pass to useChatStorage’s activeToolSets, e.g. from
deriveActiveToolSets. With a filter function, the server-tool members of
these sets are selected whatever the prompt scored, even on a prompt too
short to embed. Omit for selection from the prompt alone.
baseUrl?
optionalbaseUrl:string
Defined in: src/lib/tools/serverTools.ts:1633
Base URL for the API.
cache?
optionalcache:ToolsCacheBackend
Defined in: src/lib/tools/serverTools.ts:1642
Where to read/write the cached catalog. Defaults to browser localStorage
(a no-op on Node/RN); pass a backend to persist on those platforms.
cacheExpirationMs?
optionalcacheExpirationMs:number
Defined in: src/lib/tools/serverTools.ts:1637
Cache expiration in ms for the server-tools catalog fetch.
deferLoading?
optionaldeferLoading:DeferLoadingConfig
Defined in: src/lib/tools/serverTools.ts:1649
Phase 3 defer-loading. When enabled, this helper skips SEMANTIC filtering to mirror
useChatStorage’s responses send path, which hands the catalog to mergeTools + tool-search. The
caller’s unconditional constraints still apply — an explicit static array, and exclusions (see
resolveDeferredServerTools). Omit/disabled → today’s filtered selection.
embeddingModel?
optionalembeddingModel:string
Defined in: src/lib/tools/serverTools.ts:1635
Embedding model override. Falls back to the SDK default.
extraToolSets?
optionalextraToolSets:ToolSet[]
Defined in: src/lib/tools/serverTools.ts:1663
The caller’s sets beyond BUILT_IN_TOOL_SETS — the same list you pass
to useChatStorage’s extraToolSets — so a custom set named in
activeToolSets stays sticky here too.
getToken()
getToken: () =>
Promise<string|null>
Defined in: src/lib/tools/serverTools.ts:1631
Function that resolves an auth token (Bearer).
Returns
Promise<string | null>
prompt
prompt:
string
Defined in: src/lib/tools/serverTools.ts:1622
User prompt to match tools against.
serverToolsFilter?
optionalserverToolsFilter:string[] |ServerToolsFilterFunction
Defined in: src/lib/tools/serverTools.ts:1629
Filter to apply: either a function (called with the prompt embedding +
full catalog) or a static list of tool names. Same shape useChatStorage
accepts on its serverTools option. Pass defaultServerToolsFilter to
mirror the default chat-flow selection.