binary_search
Performs binary search on a sorted list to find the index of a target value, returning -1 if not found. (cost: 1 credit)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "binary_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| arr | No | array of numbers, required, the sorted list to search | |
| target | No | number, required, the value to find |