Skip to main content
Glama
fastmcp-me

Agent Knowledge MCP

by fastmcp-me

batch_index_directory

Batch index documents from a directory into Elasticsearch, using AI to generate tags and metadata for enhanced searchability.

Instructions

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

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must cover behavioral traits. It mentions 'AI-enhanced metadata generation' and 'comprehensive file processing' but lacks details on whether indexing is additive or overwrites, error handling, performance impact, or side effects. The description is too vague for a complex batch operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, no redundancy, and front-loaded with the core purpose. However, it could be slightly more structured (e.g., separating batch indexing from AI enhancement). Still, it is concise without being under-specified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 parameters, 100% schema coverage, and an output schema, the description adds only a high-level overview. It does not explain the return values, expected performance, or failure modes. For a batch operation, the description lacks completeness about what 'comprehensive file processing' entails.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions cover 100% of parameters, so baseline is 3. The description adds minimal extra meaning beyond the parameter descriptions (e.g., 'AI-enhanced' for use_ai_enhancement). It does not clarify parameter relationships or constraints not already in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: batch index all documents from a directory into Elasticsearch, with additional AI-enhanced metadata generation and comprehensive file processing. It distinguishes itself from single-document indexing tools like index_document.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs alternatives (e.g., index_document for single files). No mention of prerequisites, limitations, or when not to use it. The agent must infer from the word 'batch' and sibling tool names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/fastmcp-me/agentknowledgemcp'

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