Skip to main content
Glama

memory_ingest

Import PDF, text, Markdown, or JSON files and directories into a memory database, chunking content for searchable retrieval and knowledge base building.

Instructions

Ingest documents or directories into memory database.

USE THIS WHEN:

  • User wants to import a document (PDF, TXT, MD, JSON)

  • Need to batch import a directory of documents

  • Building knowledge base from existing files

SUPPORTED FORMATS:

  • PDF files (.pdf)

  • Text files (.txt, .md, .markdown, .rst)

  • JSON files (.json)

MODE:

  • file: Ingest single document (requires file_path)

  • directory: Batch ingest all documents in directory (requires directory_path)

CHUNKING:

  • Documents are split into chunks for better retrieval

  • chunk_size: Target characters per chunk (default: 1000)

  • chunk_overlap: Overlap between chunks (default: 200)

Examples: {"file_path": "/path/to/document.pdf"} {"file_path": "/path/to/notes.md", "tags": ["documentation"]} {"directory_path": "/path/to/docs", "recursive": true} {"directory_path": "/path/to/project", "file_extensions": ["md", "txt"], "tags": ["project-docs"]}

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "memory_ingest"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoTags to apply to all ingested memories
storeNoTarget store partition (default: 'default'). Use 'docs' for documents, 'all' for cross-store search.
file_pathNoPath to single document (for file mode)
max_filesNoFor directory mode: maximum files to process
recursiveNoFor directory mode: process subdirectories
chunk_sizeNoTarget chunk size in characters
memory_typeNoType label for created memoriesdocument
chunk_overlapNoOverlap between chunks
directory_pathNoPath to directory (for directory mode)
file_extensionsNoFor directory mode: file types to process

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A3.7/5.0
Behavior3/5

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

With only destructiveHint=false in annotations, the description carries most of the burden, and it does disclose genuinely useful behavior: chunking with defaults, supported file formats, and per-mode requirements. However, it omits critical ingest semantics such as whether re-ingesting the same file creates duplicates or overwrites, how unsupported or failed files are handled, and whether large directories are rate-limited or bounded beyond max_files.

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 header-based layout (USE THIS WHEN / SUPPORTED FORMATS / MODE / CHUNKING / Examples) is front-loaded and scannable, with no filler sentences. The four examples are slightly redundant with the mode section but each demonstrates a distinct parameter combination, so they earn their space.

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?

For a 10-parameter tool with zero required parameters, the definition never states what happens when neither file_path nor directory_path is supplied, nor what the tool returns (memory IDs, counts, per-file status). With no output schema, the description should have covered result shape and the default-mode behavior; it covers chunking and formats well but leaves invocation edge cases and outcomes unaddressed.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3; the description earns a bump by tying file_path/directory_path to explicit modes and explaining the chunk_size/chunk_overlap relationship in retrieval terms. The worked examples map parameter combinations to real scenarios, adding meaning beyond the per-field descriptions.

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

Purpose4/5

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

The opening sentence gives a specific verb ('ingest') and resource ('documents or directories') and clearly scopes the operation to the memory database. The two-mode breakdown (file vs directory) further sharpens what the tool does, though it never distinguishes itself from siblings like memory_store, which an agent might otherwise confuse with document ingestion.

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?

The 'USE THIS WHEN' block gives three concrete triggering conditions (import a document, batch import a directory, build a knowledge base from files), which is clear positive guidance. It stops short of exclusions or naming an alternative tool for adjacent operations, so the agent must infer that non-document memories should use memory_store instead.

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