createServerToolsFilter
createServerToolsFilter(
options:CreateServerToolsFilterOptions):ServerToolsFilterFunction
Defined in: src/lib/tools/serverTools.ts:1425
Build a server-tools filter function for use with useChatStorage’s
serverTools option. Composes findMatchingTools, expandToolSetsAdditive,
and an exclude-list into a single (embeddings, tools) → string[] callback.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
Example
import { createServerToolsFilter } from "@anuma/sdk/tools";
const serverTools = createServerToolsFilter({
toolSets: [
{
name: "research",
members: ["AnumaJinaMCP-search_web", "AnumaSearchMCP-anuma_scrape_url", ...],
anchors: ["AnumaJinaMCP-search_web"],
anchorMinSimilarity: 0.7,
},
],
excludeTools: ["OpenMeteoMCP-weather_forecast"],
matchOptions: { limit: 5, minSimilarity: 0.5 },
});Last updated on