Create a search index
search_create_indexCreate a search index from typed fields, or from a first batch of documents (schema inferred). Use when the app needs search over its own records (products, articles, tickets). Before: search_list_indexes (needs search query access), to reuse an existing index. Returns the index with its idx_ id (replayed with the same idempotency_key and fields). Scope: search:write. Reuse the same idempotency_key on retry. Cost: priced at get_pricing; any price is reserved on the prepaid balance before the call. Refused for balance or a limit: follow next_action.
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": {
"name": "products",
"fields": [
{
"name": "title",
"type": "text",
"weight": 4
},
{
"name": "description",
"type": "text"
},
{
"name": "brand",
"type": "keyword",
"facetable": true,
"filterable": true
},
{
"name": "price",
"type": "number",
"sortable": true,
"filterable": true
}
],
"language": "en",
"idempotency_key": "create-index-products"
},
"name": "search_create_index"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Index name: 1-63 chars, a-z 0-9 _ -, unique in the project. | |
| fields | No | The fields: at least one searchable. Every document field must be declared here. Required unless `documents` is given. | |
| language | No | Text language: en, fr, or simple (no stemming). Default en. | |
| documents | No | A first batch of documents, without `fields`: the schema is inferred from them and the batch is written in the same call, all or nothing. | |
| typo_tolerance | No | Match small typos by default. Default true. | |
| idempotency_key | Yes | Unique per request. Reuse it on retry. |