Search an index
search_queryFull-text search with filters, sorting, facets, pagination and highlights. Use when the user looks something up in the app's own data. Before: search_get_index for the fields. Returns hits (id, score, document, highlights), total, facets, took_ms and the receipt. Scope: search:query. Cost: paid, reserved on the prepaid balance before the call (released if it fails); prices: get_pricing. Short balance or limit: next_action top_up_balance or raise_app_spend_limit.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"q": "leather shoes",
"name": "products",
"limit": 10,
"facets": [
"brand"
],
"filter": {
"lt": 100,
"field": "price"
}
},
"name": "search_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Text to find. Quotes make a phrase, a leading - excludes a word. Empty: all documents. | |
| name | Yes | Index name. | |
| sort | No | Up to 3 sort keys; ties break by relevance then id. | |
| limit | No | Page size, 1 to 100. | |
| facets | No | Fields to count values of (up to 100 values each). | |
| filter | No | Closed filter tree: {"field": f, "eq"|"ne"|"in"|"gt"|"gte"|"lt"|"lte"|"exists": v}, or {"and": [...]}, {"or": [...]}, {"not": {...}}. | |
| offset | No | Results to skip, at most 1000. | |
| highlight | No | Return escaped excerpts with <mark> tags. Default true. | |
| typo_tolerance | No | Match small typos. Default: the index setting. |