Skip to Content
Anuma SDKReactInternalFunctionswithActiveToolSetServerTools

withActiveToolSetServerTools

withActiveToolSetServerTools(selected: ServerTool[], allServerTools: ServerTool[], serverToolsFilter: ServerToolsFilterFunction, activeToolSets: readonly string[], extraToolSets: readonly ToolSet[]): ServerTool[]

Defined in: src/lib/tools/serverTools.ts:1323 

Add the server-tool members of every set named in activeToolSets to a semantic server-tool selection.

A semantic filter ranks only the latest prompt, so a terse follow-up inside a flow (“okay”, “retry”) drops the flow’s server tools. This is the server-side half of what autoFilterClientTools does for client tools: an active set’s members that are in the catalog are kept whatever the prompt scored, even below the short-prompt gate, where selected is empty. Exclusions tagged on the filter still win.

Parameters

ParameterTypeDefault valueDescription

selected

ServerTool[]

undefined

What the semantic filter picked ([] when it did not run).

allServerTools

ServerTool[]

undefined

The full server-tool catalog.

serverToolsFilter

ServerToolsFilterFunction

undefined

The filter function, read only for its excludeTools tag.

activeToolSets

readonly string[]

[]

Set names that are sticky for this conversation.

extraToolSets

readonly ToolSet[]

[]

The caller’s sets beyond BUILT_IN_TOOL_SETS.

Returns

ServerTool[]

selected, followed by any active-set members it was missing.

Last updated on