AsterMind MCP
v0.1.0On-device reranking that cuts RAG context tokens ~67% while keeping a relevant passage.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
rerank_documents Rerank documents by relevance
Rank candidate documents/chunks by relevance to a query using an on-device ELM reranker. Best when the query shares vocabulary with the documents (typical RAG). Lexical (TF-IDF) based: strong on keyword overlap, weaker on pure-synonym matches.
| Parameter | Type | Description |
|---|---|---|
documents * | array | Candidate documents/chunks to rank. |
query * | string | The user query or question. |
topK | integer | Return only the top K (default: all). |
filter_context Filter context to relevant docs (token saver)
Drop documents not relevant to the query so you feed the LLM a small, relevant context instead of everything. Reports exact tokens saved using an OpenAI-compatible tokenizer. This is the core token-reduction tool.
| Parameter | Type | Description |
|---|---|---|
documents * | array | |
query * | string | |
maxDocs | integer | Max docs to keep (default 5). |
minRelevance | number | Min relevance 0..1 to keep a doc (default 0.5). |
compress_context Compress context into a ready-to-paste block
One-shot token saver: filter candidate documents to what is relevant and return a compact, numbered context block ready to paste into a prompt, plus token-before/after accounting.
| Parameter | Type | Description |
|---|---|---|
documents * | array | |
query * | string | |
maxDocs | integer | |
minRelevance | number |
classify_text Classify text (train-from-examples)
Classify text into your categories using an on-device ELM trained on the labeled examples you provide. Requires at least one example per category. Returns a confidence and honestly flags low-confidence results. Use this to route/label locally instead of paying an LLM to classify.
| Parameter | Type | Description |
|---|---|---|
categories * | array | The category labels. |
examples * | array | Labeled training examples (>= 1 per category). |
text * | string | Text to classify. |
detect_language Detect language
Coarse language detection over 6 European languages (English, Spanish, French, German, Italian, Portuguese) using an on-device classifier. Runs locally with no API call.
| Parameter | Type | Description |
|---|---|---|
text * | string |
semantic_search Search a document set
Return the top documents matching a query from a provided set, scored by an on-device lexical (TF-IDF) reranker. Strong on keyword overlap; not a transformer embedding search.
| Parameter | Type | Description |
|---|---|---|
documents * | array | |
query * | string | |
topK | integer |
generate_embeddings Generate on-device embeddings
Produce deterministic local char-level embeddings for a list of texts. Good for clustering, dedupe, and near-duplicate detection. Not a substitute for large transformer embeddings on nuanced semantics.
| Parameter | Type | Description |
|---|---|---|
texts * | array |
compare_texts Compare two texts (near-duplicate similarity)
Cosine similarity (0..1) between two texts using local embeddings. Best for detecting near-duplicates / paraphrase overlap, not fine-grained semantic ranking.
| Parameter | Type | Description |
|---|---|---|
text1 * | string | |
text2 * | string |
count_tokens Count tokens
Count tokens in a string or array of strings using an OpenAI-compatible BPE tokenizer (o200k/cl100k family). Useful for measuring context size and budgeting.
| Parameter | Type | Description |
|---|---|---|
text * |
estimate_savings Estimate token & cost savings
Given the full context vs the filtered context you plan to send an LLM, compute tokens removed, percent saved, and (optionally) dollars saved per call for a given model input price.
| Parameter | Type | Description |
|---|---|---|
filteredContext * | ||
fullContext * | ||
usdPerMillionInputTokens | number |