Skip to main content
Glama

Agent Knowledge MCP

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

NameRequiredDescriptionDefault
check_duplicatesNoCheck for existing documents with similar title before indexing
doc_idNoOptional document ID - if not provided, smart ID will be generated
documentYesDocument data to index as JSON object. 💡 RECOMMENDED: Use 'create_document_template' tool first to generate proper document format.
force_indexNoForce 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
indexYesName of the Elasticsearch index to store the document
use_ai_similarityNoUse AI to analyze content similarity and provide intelligent recommendations
validate_schemaNoWhether 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" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/itshare4u/AgentKnowledgeMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server