reindex
Copy documents between Elasticsearch indexes, applying optional query filters, pipelines, or scripts to change field types, reshard, or migrate data. Runs asynchronously and returns a task ID for polling.
Instructions
Copy documents from a source index to a destination, optionally filtered by a query and transformed by a pipeline or script. Runs asynchronously (wait_for_completion=false) and returns a task_id to poll with get_task. Use this to change a field type, reshard, or migrate data. Requires writes enabled, ES_MCP_ALLOW_DESTRUCTIVE=true, and confirm=true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source_index": "<source_index>",
"dest_index": "<dest_index>"
},
"name": "reindex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| slices | No | auto | |
| confirm | No | ||
| op_type | No | index | |
| pipeline | No | ||
| dest_index | Yes | ||
| source_index | Yes | ||
| script_source | No | ||
| requests_per_second | No | ||
| wait_for_completion | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |