Skip to main content
Glama

Agent Knowledge MCP

batch_index_directory

Index all documents from a specified directory into Elasticsearch, enabling AI-enhanced metadata generation, file processing, and schema validation for efficient knowledge management.

Instructions

Batch index all documents from a directory into Elasticsearch with AI-enhanced metadata generation and comprehensive file processing

Input Schema

NameRequiredDescriptionDefault
directory_pathYesPath to directory containing documents to index
file_patternNoFile pattern to match (e.g., '*.md', '*.txt', '*')*.md
indexYesName of the Elasticsearch index to store the documents
max_file_sizeNoMaximum file size in bytes to process
recursiveNoWhether to search subdirectories recursively
skip_existingNoSkip files that already exist in index (check by filename)
use_ai_enhancementNoUse AI to generate intelligent tags and key points for each document
validate_schemaNoWhether to validate document structure for knowledge base format

Input Schema (JSON Schema)

{ "properties": { "directory_path": { "description": "Path to directory containing documents to index", "title": "Directory Path", "type": "string" }, "file_pattern": { "default": "*.md", "description": "File pattern to match (e.g., '*.md', '*.txt', '*')", "title": "File Pattern", "type": "string" }, "index": { "description": "Name of the Elasticsearch index to store the documents", "title": "Index", "type": "string" }, "max_file_size": { "default": 1048576, "description": "Maximum file size in bytes to process", "maximum": 10485760, "minimum": 1, "title": "Max File Size", "type": "integer" }, "recursive": { "default": true, "description": "Whether to search subdirectories recursively", "title": "Recursive", "type": "boolean" }, "skip_existing": { "default": false, "description": "Skip files that already exist in index (check by filename)", "title": "Skip Existing", "type": "boolean" }, "use_ai_enhancement": { "default": true, "description": "Use AI to generate intelligent tags and key points for each document", "title": "Use Ai Enhancement", "type": "boolean" }, "validate_schema": { "default": true, "description": "Whether to validate document structure for knowledge base format", "title": "Validate Schema", "type": "boolean" } }, "required": [ "index", "directory_path" ], "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