Skip to main content
Glama
chacharin

mcp-lightrag

by chacharin

upload_file

Upload a file from disk to the LightRAG knowledge graph for indexing. Verifies existence and supported extension, then returns a track ID for status polling.

Instructions

Upload and index a single file already present on disk. Checks the file exists and its extension is supported before uploading -- call get_supported_file_types first if unsure. Returns a track_id; poll with get_track_status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the file, as seen INSIDE the Hermes container -- NOT the Windows host path. E.g. a file at D:\Harness\workspace\a.pdf on the host is /opt/data/workspace/a.pdf here.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/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 behavioral disclosure burden and does so well by revealing pre-upload validation (existence and extension checks) and the asynchronous return pattern via track_id. It does not mention permissions, idempotency, or overwrite behavior, but it discloses the most important non-obvious behaviors for a simple upload tool.

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

Conciseness5/5

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

Three sentences with no filler: purpose, validation behavior, and follow-up action are each covered in one crisp sentence. The structure front-loads the core purpose and then layers in necessary operational details.

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

Completeness5/5

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

This is a single-parameter tool with a detailed input schema and an output schema present, so the description only needs to bridge the gaps. It covers prerequisites, return value, and next step, which is sufficient for an agent to invoke the tool correctly.

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?

The schema already fully documents the path parameter with a container-path example, so the baseline is 3. The description adds meaningful context by stating the file must already exist on disk and have a supported extension, which clarifies constraints on the path parameter beyond the schema's format guidance.

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 states a specific action ('Upload and index'), a specific resource ('a single file already present on disk'), and clearly scopes the tool to one file at a time, which distinguishes it from the sibling upload_directory. The purpose is immediately understandable and unambiguous.

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

Usage Guidelines5/5

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

The description explicitly tells the agent to call get_supported_file_types first if unsure, and to poll with get_track_status after receiving a track_id. It also implicitly differentiates from upload_directory by emphasizing 'single file', giving clear context for when this tool is the right choice.

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