Python 88.3%
TypeScript 7.6%
Shell 4.1%
1// Tool search regex + deferred tools. STATUS: UNVERIFIED as a script (raw request LIVE_VERIFIED 2026-09-18, f1).2// Run: node --env-file=.env --experimental-strip-types examples/anthropic/tools/tool-search/basic.ts3import Anthropic from "@anthropic-ai/sdk";4import { logRequest } from "../../../shared/tool-loop/log.ts";5const client = new Anthropic();6const resp: any = await client.messages.create({ model: "claude-haiku-4-5-20251001", max_tokens: 300, tools: [{ type: "tool_search_tool_regex_20251119", name: "tool_search_tool_regex" }, ...[["get_weather", "Get the current weather for a city"], ["get_stock_price", "Get the latest stock price"], ["send_email", "Send an email"], ["translate_text", "Translate text"]].map(([name, description]) => ({ name, description, defer_loading: true, input_schema: { type: "object", properties: { q: { type: "string" } }, required: ["q"] } }))], messages: [{ role: "user", content: "What is the weather in Paris? Find and call the right tool." }] } as any);7logRequest("anthropic", "POST", "/v1/messages", 200, 0.002, "basic.ts");8console.log(resp.stop_reason, JSON.stringify(resp.content.map((b: any) => ({ type: b.type, name: b.name, toolset_name: b.toolset_name, input: b.input, caller: b.caller, text: b.text, content: typeof b.content === "object" ? "[…]" : b.content })), null, 1).slice(0, 1500));9console.log("usage", resp.usage, "container", resp.container);10