ingest_data_tool
Loads video data from a specified directory into the Ragie index for natural language search, ensuring full ingestion before proceeding.
Instructions
Loads data from a directory into the Ragie index. Wait until the data is fully ingested before continuing.
Args:
directory (str): The directory to load data from.
Returns:
str: A message indicating that the data was loaded successfully.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directory | Yes |
Implementation Reference
- server.py:6-22 (handler)The handler function for the 'ingest_data_tool' tool, decorated with @mcp.tool() for registration. It clears the index, ingests data from the directory, and returns success or error message.@mcp.tool() def ingest_data_tool(directory: str) -> None: """ Loads data from a directory into the Ragie index. Wait until the data is fully ingested before continuing. Args: directory (str): The directory to load data from. Returns: str: A message indicating that the data was loaded successfully. """ try: clear_index() ingest_data(directory) return "Data loaded successfully" except Exception as e: return f"Failed to load data: {str(e)}"