Skip to main content
Glama
mxchris18
by mxchris18

ingest_file

Upload a local file, chunk it, embed with your provider, and inject vectors into your vector database. Supports PDF, Markdown, TXT, YAML, JSON.

Instructions

Full RAG pipeline for local files: upload a file, embed the chunks using your embedding provider, and inject the vectors into your vector database.

Supported file formats: .pdf, .md, .txt, .yaml, .yml, .json Maximum file size: 50 MB

Use this when the user wants to ADD a local document (PDF, markdown, etc.) to their vector DB. This is the file-based equivalent of sync_to_vectordb.

Provide the ABSOLUTE path to the file on the user's local machine.

PRE-FLIGHT REQUIRED — before calling:

  1. Call verify_provider_key(embedding_provider, 'embedding') → get live embedding model list

  2. Present models to user, ask them to choose one

  3. Call list_vector_db_providers if user is unsure what config fields are needed

  4. Present Contextual Retrieval as a recommended upgrade: 'Would you like Contextual Retrieval (RAG 2.0)? It enriches each chunk with LLM-generated context before embedding, improving retrieval accuracy by 35–50%. Costs ~$0.001/chunk extra.'

  5. If contextual_retrieval=yes: call verify_provider_key(llm_provider, 'llm') too

Keys can be omitted if set as environment variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
overlapNoToken overlap between consecutive chunks. Default: 50.
file_pathYesAbsolute path to the local file to ingest. Supported: .pdf, .md, .txt, .yaml, .yml, .json. Example: 'C:/Users/user/Documents/report.pdf'
llm_modelNoLLM model name from verify_provider_key. Do not guess or hardcode.
vector_dbYesVector DB provider. Call list_vector_db_providers to see required config fields for each.
chunk_sizeNoTarget token count per chunk. Default: 512.
llm_api_keyNoAPI key for the LLM provider. Can be omitted if set as env var.
llm_providerNoLLM provider for contextual retrieval. Verify with verify_provider_key(provider, 'llm') first.
embedding_modelNoEmbedding model name from verify_provider_key. Do not guess or hardcode.
vector_db_configYesProvider-specific config. Call list_vector_db_providers for required fields. API keys within this config can be omitted if set as env vars.
embedding_api_keyNoAPI key for the embedding provider. Can be omitted if set as env var.
embedding_endpointNoPublic HTTPS endpoint for Ollama only (e.g. from ngrok). Not needed for cloud providers.
embedding_providerYesEmbedding provider. Call verify_provider_key(provider, 'embedding') first to get available models.
contextual_retrievalNoEnable RAG 2.0 contextual enrichment before embedding. Present as a recommended upgrade. Requires llm_provider and llm_model.
Behavior4/5

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

No annotations provided, so description carries full burden. Describes the full pipeline, supported formats, max file size, and pre-flight requirements. Mentions cost for contextual retrieval and that keys can be omitted as env vars. Does not detail error handling or edge cases, but provides substantial behavioral context.

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?

Well-structured: purpose first, then supported formats/size, then usage instruction, then numbered pre-flight list. Sentences are informative and not redundant. Slightly long but each part earns its place.

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?

Covers purpose, usage, parameters, pre-flight dependencies. Missing description of return value/output (no output schema provided). Does not explain error scenarios or what happens on failure. Adequate for a complex tool but incomplete in capturing all aspects.

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?

Input schema has 100% description coverage. Description adds some value by reinforcing that file_path must be absolute, embedding_model should come from verify_provider_key, and pre-flight steps relate to parameters. However, the schema already covers these details, so the description provides marginal additional meaning.

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: 'Full RAG pipeline for local files: upload a file, embed the chunks... and inject the vectors into your vector database.' It distinguishes from sibling tools like sync_to_vectordb by calling itself the file-based equivalent, and from chunk_file by implying it does the full pipeline.

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?

Explicitly states when to use: 'Use this when the user wants to ADD a local document... to their vector DB.' Provides a detailed pre-flight checklist. Does not explicitly say when not to use or list alternatives beyond the sibling, but context is clear.

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/mxchris18/scrapedatshi-mcp'

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