Documentation Index
Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
Use this file to discover all available pages before exploring further.
New to tool search? Start with Tool Search 101 for an overview of why, how, and when to use it.
Agent-Driven Search (Recommended)
The simplest way to use tool search: give your agenttool_search and tool_execute, and let it discover tools on demand.
Framework Examples
Manual Search
When you need to find tools yourself before passing them to an agent:Search modes (auto, semantic, local)
Search modes (auto, semantic, local)
| Mode | Behaviour |
|---|---|
auto | Tries semantic API first, falls back to local search on failure. Recommended for production. |
semantic | Strict mode. Uses semantic API only, throws SemanticSearchError on failure. |
local | Hybrid BM25 + TF-IDF search entirely in-process (powered by Orama). No network call. Useful for offline or low-latency scenarios. |
Constructor configuration
Constructor configuration
Set default search options at the constructor level. These apply to all search calls unless overridden per-call.
Per-call overrides take precedence over constructor defaults:
SearchConfig Options
| Option | Type | Description |
|---|---|---|
method | 'auto' | 'semantic' | 'local' | Search mode (default: 'auto') |
topK | number | Maximum number of tools to return |
minSimilarity | number | Minimum relevance score threshold (0-1) |
Parameters reference
Parameters reference
| Parameter | Type | Description |
|---|---|---|
topK | number | Maximum number of tools to return |
search | 'auto' | 'semantic' | 'local' | Search mode (default: 'auto') |
connector | string | Filter to a specific provider (e.g., 'workday') |
minSimilarity | number | Minimum relevance score threshold (0-1) |
accountIds | string[] | Override account IDs for this search |
Advanced Patterns
searchActionNames(), lightweight preview
searchActionNames(), lightweight preview
Returns action names and similarity scores without fetching full tool definitions. Use it to inspect results before committing to a full fetch.
getSearchTool(), callable for custom agent loops
getSearchTool(), callable for custom agent loops
Returns a reusable
SearchTool for agent loops where the LLM decides what to search for.