index_document
Create or overwrite a single document in Elasticsearch by passing JSON. Optionally specify doc_id to overwrite a document, otherwise auto-ID is assigned; set refresh=true for immediate search.
Instructions
Index (create or overwrite) a single document into an index. Pass doc as a JSON object. Optional doc_id: given, it overwrites that id; omitted, ES assigns one. Set refresh=true to make it searchable immediately (slower). Requires writes enabled 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": {
"index": "<index>",
"document": "<document>"
},
"name": "index_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| doc_id | No | ||
| confirm | No | ||
| refresh | No | ||
| document | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |