effect-io-ai

Package: @effect/ai-anthropic
Module: AnthropicTool

AnthropicTool.ToolSearchBM25_20251119

Defines BM25/natural language tool search for Claude models.

When to use

Use when you want Claude to find relevant tools from a natural-language query instead of a regex pattern.

Details

Claude uses natural language queries to search for tools using the BM25 algorithm. The search is performed against tool names, descriptions, argument names, and argument descriptions. Requires the “advanced-tool-use-2025-11-20” beta header.

See

Signature

declare const ToolSearchBM25_20251119: <Mode extends Tool.FailureMode | undefined = undefined>(args: void) => Tool.ProviderDefined<"anthropic.tool_search_tool_bm25_20251119", "AnthropicToolSearchBM25", { readonly args: Schema.Void; readonly parameters: Schema.Struct<{ readonly query: Schema.String; }>; readonly success: Schema.$Array<Schema.Struct<{ readonly cache_control: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{ readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>; readonly type: Schema.Literal<"ephemeral">; }>]>, Schema.Null]>>; readonly tool_name: Schema.String; readonly type: Schema.Literal<"tool_reference">; }>>; readonly failure: Schema.Struct<{ readonly error_code: Schema.Literals<readonly ["invalid_tool_input", "unavailable", "too_many_requests", "execution_time_exceeded"]>; readonly error_message: Schema.Union<readonly [Schema.String, Schema.Null]>; readonly type: Schema.Literal<"tool_search_tool_result_error">; }>; readonly failureMode: Mode extends undefined ? "error" : Mode; }, false>

Source

Since v4.0.0