Description Unity Documentation MCP – Rust Implementation Plan
External Dependencies
scraper – parse Unity HTML
ort – run all-MiniLM-L6-V2.onnx for embedding (weights file shipped alongside binary)
qdrant-client – local vector storage & retrieval
serde + serde_json – payload serialization
tokio – async runtime for qdrant-client & file I/O
walkdir – recursive scan of Unity documentation folders
regex – light clean-up of raw text
Implementation Steps (Rust-only)
Discovery
locate active Unity installation → find installed docs, for packages, fond installed docs in package.
Parsing
For each .html, use scraper CSS selectors to extract:
signature
summary
return & key parameters
Drop script/style tags via quick regex.
Chunking
One chunk = one method / property / enum entry (≈ 50–250 tokens).
No further split unless >512 tokens (rare).
Embedding
Load MiniLM-L6-V2.onnx via ort.
Encode each chunk → 384-d float vector.
Indexing
Start local Qdrant (single binary next to executable).
Upsert (vector, JSON payload) into collection “unity_api”.
MCP Server
tools/list – list resolve_unity_type & get_unity_docs.
tools/call – perform vector search & return top-k chunks.
All data & binary stay beside the Rust binary; no network required.
Reactions are currently unavailable
You can’t perform that action at this time.
Unity Documentation MCP – Rust Implementation Plan
External Dependencies
all-MiniLM-L6-V2.onnxfor embedding (weights file shipped alongside binary)Implementation Steps (Rust-only)
Discovery
Parsing
.html, usescraperCSS selectors to extract:regex.Chunking
Embedding
MiniLM-L6-V2.onnxviaort.Indexing
MCP Server
tools/list– listresolve_unity_type&get_unity_docs.tools/call– perform vector search & return top-k chunks.