Skip to main content
Glama
arunkumars-mf

mem0-agent-memory

ingest_documents

Ingest documents into a searchable knowledge base by parsing, chunking, and storing content in memory. Supports PDF, DOCX, TXT, MD, HTML, and directories for AI agent retrieval.

Instructions

Ingest documents into memory as a knowledge base using LlamaIndex.

Supports: PDF, DOCX, TXT, MD, HTML, and more. Automatically chunks and stores content.

REQUIRED: 'path' - file path or directory path to ingest OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'run_id' - session/run identifier for partitioning OPTIONAL: 'recursive' - recursively process subdirectories (default: False) OPTIONAL: 'chunk_size' - max characters per chunk (default: 1024, min: 100, max: 8192) OPTIONAL: 'chunk_overlap' - overlap between chunks (default: 200, min: 0, max: chunk_size-1) OPTIONAL: 'file_metadata' - additional metadata to attach to all chunks OPTIONAL: 'infer' - use LLM for fact extraction (default: False for speed)

Examples:

  • Ingest single file: {"path": "/path/to/document.pdf"}

  • Ingest directory: {"path": "/path/to/docs", "recursive": true}

  • With metadata: {"path": "manual.pdf", "file_metadata": {"type": "documentation", "version": "2.0"}}

  • Custom chunking: {"path": "large.pdf", "chunk_size": 2048, "chunk_overlap": 400}

Returns: Summary of ingested documents with chunk counts and memory IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
inferNo
run_idNo
user_idNo
verboseNo
agent_idNo
recursiveNo
chunk_sizeNo
chunk_overlapNo
file_metadataNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.3.2

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden and does substantial work: it states automatic chunking and storage, auto-detection of the current user when user_id/agent_id are absent, default values, the min/max constraints on chunking, and the performance rationale for infer=False. It omits idempotency/overwrite behavior and failure modes, but for a no-annotation tool this is strong coverage.

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?

The description is long but every section earns its place: purpose, supported formats, parameter spec, examples, and return value. It is front-loaded with the core purpose and uses a clear label-per-line structure. Some redundancy exists between the parameter list and the examples, but given 10 parameters at 0% schema coverage, the length is justified.

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

Completeness4/5

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

For a 10-parameter tool at 0% schema coverage, the description covers formats, all key parameter semantics, defaults, examples, and a brief return summary. An output schema exists, so deep return-value documentation isn't required. Remaining gaps — the undocumented verbose flag, no error conditions, no note on whether re-ingesting the same path overwrites or duplicates — are minor rather than blocking.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must fully compensate, and it does: it documents 9 of 10 parameters with defaults, ranges, and conditionals — including min/max constraints on chunk_size and chunk_overlap that the schema itself lacks, and the user_id OR agent_id fallback logic. Only 'verbose' is left undocumented, a minor miss against otherwise exceptional compensation.

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 opens with a specific verb and resource: 'Ingest documents into memory as a knowledge base using LlamaIndex.' This clearly distinguishes it from sibling tools like search_memories, get_memory, and delete_memory, and its document-chunking role is distinct from store_memory. The supported format list reinforces the scope.

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

Usage Guidelines4/5

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

Four concrete examples (single file, directory, metadata, custom chunking) plus REQUIRED/OPTIONAL parameter guidance give an agent clear invocation context. However, it never explicitly contrasts with alternatives like store_memory or import_memories, so an agent must infer when document ingestion is the right sibling choice.

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

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/arunkumars-mf/mem0-agent-memory'

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