Skip to content
1 min read · 114 words

Function: createSearxngSearchToolSync()

ts
function createSearxngSearchToolSync(
  config: SearxngToolConfig<SyncArtifactResolver>,
): Tool;

Defined in: batteries/tools/searxng/index.ts:426

Synchronous createSearxngSearchTool — the ergonomic common path.

Parameters

ParameterTypeDescription
configSearxngToolConfig<SyncArtifactResolver>Same as SearxngToolConfig, with artifact restricted to the sync subset.

Returns

Tool

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).