index_document
Index documents into Elasticsearch with duplicate prevention, intelligent ID generation, and schema validation. Use AI similarity checks to ensure accurate indexing while maintaining knowledge base integrity.
Instructions
Index a document into Elasticsearch with smart duplicate prevention and intelligent document ID generation. 💡 RECOMMENDED: Use 'create_document_template' tool first to generate a proper document structure and avoid validation errors.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
check_duplicates | No | Check for existing documents with similar title before indexing | |
doc_id | No | Optional document ID - if not provided, smart ID will be generated | |
document | Yes | Document data to index as JSON object. 💡 RECOMMENDED: Use 'create_document_template' tool first to generate proper document format. | |
force_index | No | Force indexing even if potential duplicates are found. 💡 TIP: Set to True if content is genuinely new and not in knowledge base to avoid multiple tool calls | |
index | Yes | Name of the Elasticsearch index to store the document | |
use_ai_similarity | No | Use AI to analyze content similarity and provide intelligent recommendations | |
validate_schema | No | Whether to validate document structure for knowledge base format |
Input Schema (JSON Schema)
{
"properties": {
"check_duplicates": {
"default": true,
"description": "Check for existing documents with similar title before indexing",
"title": "Check Duplicates",
"type": "boolean"
},
"doc_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional document ID - if not provided, smart ID will be generated",
"title": "Doc Id"
},
"document": {
"additionalProperties": true,
"description": "Document data to index as JSON object. 💡 RECOMMENDED: Use 'create_document_template' tool first to generate proper document format.",
"title": "Document",
"type": "object"
},
"force_index": {
"default": false,
"description": "Force indexing even if potential duplicates are found. 💡 TIP: Set to True if content is genuinely new and not in knowledge base to avoid multiple tool calls",
"title": "Force Index",
"type": "boolean"
},
"index": {
"description": "Name of the Elasticsearch index to store the document",
"title": "Index",
"type": "string"
},
"use_ai_similarity": {
"default": true,
"description": "Use AI to analyze content similarity and provide intelligent recommendations",
"title": "Use Ai Similarity",
"type": "boolean"
},
"validate_schema": {
"default": true,
"description": "Whether to validate document structure for knowledge base format",
"title": "Validate Schema",
"type": "boolean"
}
},
"required": [
"index",
"document"
],
"type": "object"
}