GitHub

MCP Tools Reference

Core Tools (Phase 1)

1. ingest_memory

Ingest data into knowledge graphs from various sources.

# Arguments
{
"source_path": str, # Path, URL, or text content
"source_type": str, # "file", "url", "text"
"target_kg": str, # Target KG name
"source_name": str, # Optional human-readable name
"mode": str = "simple", # "simple" or "smart"
"auto_detect_domains": bool = True,
"auto_create_kgs": bool = True
}
# Usage
result = await client.ingest(
source_path="https://arxiv.org/abs/2301.07041",
source_type="url",
target_kg="KG_Research",
mode="smart"
)

2. retrieve_memory

Retrieve information from knowledge graphs.

# Arguments
{
"query": str, # Search query
"kg_names": list[str] = None, # Specific KGs to search
"top_k": int = 20, # Number of results
"mode": str = "hybrid" # "vector", "structural", "hybrid"
}

3. predict_from_memory

Generate grounded answers with citations.

# Arguments
{
"query": str, # Question to answer
"validate": bool = True, # Enable answer validation
"max_context": int = 4000 # Max context tokens
}

Enhanced Tools (Backend Integration)

4. execute_smart_query

Execute enhanced smart query with intelligent routing.

# Arguments
{
"query": str, # Search query
"mode": str = "auto", # "auto", "kg_rag", "vector_bypass", "sql"
"use_vector_bypass": bool = False,
"enable_reranking": bool = True,
"max_results": int = 10,
"kg_filter": list[str] = None,
"reranker_method": str = "listwise",
"quality_threshold": float = 0.7,
"enable_analytics": bool = True,
"include_explanations": bool = True
}

5. execute_enhanced_sql

Execute enhanced SQL with schema intelligence.

# Arguments
{
"query": str, # Natural language query
"max_results": int = 10,
"include_explanation": bool = True,
"query_type": str = "auto", # "auto", "select", "aggregate", "join"
"output_format": str = "summary", # "rows", "summary", "statistics"
"include_schema_info": bool = True
}

6. execute_enhanced_reranking

Perform quality-aware document re-ranking.

# Arguments
{
"query": str, # Query for context
"documents": list[dict], # Documents to re-rank
"method": str = "listwise", # "listwise", "pointwise", "pairwise", "hybrid"
"quality_filter": str = "auto", # "auto", "strict", "moderate", "lenient"
"max_results": int = 10,
"return_analytics": bool = True,
"deduplication_threshold": float = 0.85,
"min_quality_score": float = 0.6
}