Function: createSearxngSearchToolSync()
ts
function createSearxngSearchToolSync(
config: SearxngToolConfig<SyncArtifactResolver>,
): Tool;Defined in: batteries/tools/searxng/index.ts:426
Synchronous createSearxngSearchTool — the ergonomic common path.
Parameters
| Parameter | Type | Description |
|---|---|---|
config | SearxngToolConfig<SyncArtifactResolver> | Same as SearxngToolConfig, with artifact restricted to the sync subset. |
Returns
A Tool ready to register in a ToolRegistry.
Remarks
artifact is narrowed to the sync subset (a constructor or a sync resolver). Passing an async resolver is a compile-time type error and a runtime E_INVALID_SEARXNG_CONFIG; for dynamic-import resolvers use the async createSearxngSearchTool. See its docs for the number_of_results caveat and 403/JSON-disabled behaviour.
Throws
E_INVALID_SEARXNG_CONFIG when instanceUrl or artifact is invalid (incl. an async resolver).