Python 88.3%
TypeScript 7.6%
Shell 4.1%
1#!/usr/bin/env bash2set -euo pipefail3cd "$(dirname "$0")/../../../.."4source scripts/lib.sh5MODEL="${MODEL:-claude-haiku-4-5-20251001}"6# Tool search (regex variant) with 6 deferred tools. The API returns server_tool_use + tool_search_tool_result(tool_reference) then a tool_use.7# STATUS: LIVE_VERIFIED 2026-09-18 (f1_tool_search_regex on claude-haiku-4-5-20251001, ~$0.0025). Swap type/name for tool_search_tool_bm25_20251119.8D='{"type":"object","properties":{"q":{"type":"string","description":"Main argument"}},"required":["q"]}'9TOOLS=$(jq -n --argjson d "$D" '[{type:"tool_search_tool_regex_20251119",name:"tool_search_tool_regex"},10 {name:"get_weather",description:"Get the current weather for a city",input_schema:$d,defer_loading:true},11 {name:"get_stock_price",description:"Get the latest stock price for a ticker symbol",input_schema:$d,defer_loading:true},12 {name:"send_email",description:"Send an email to a recipient",input_schema:$d,defer_loading:true},13 {name:"create_calendar_event",description:"Create a calendar event",input_schema:$d,defer_loading:true},14 {name:"translate_text",description:"Translate text into a target language",input_schema:$d,defer_loading:true},15 {name:"lookup_zip_code",description:"Look up the city for a US zip code",input_schema:$d,defer_loading:true}]')16R=$(ant POST /v1/messages -d "$(jq -n --argjson t "$TOOLS" --arg m "$MODEL" '{model:$m,max_tokens:300,tools:$t,messages:[{role:"user",content:"What is the weather in Paris? Find and call the right tool."}]}')")17log_request anthropic POST /v1/messages "$ANT_STATUS" 0.0025 "tool-search/basic.sh"18echo "$R" | jq -c '.content[]|{type,name,input,content}'19