text_embed
Generate sentence embeddings for semantic search, clustering, and deduplication, or rerank documents by cosine similarity to a query. Runs locally; texts are not stored.
Instructions
Text Embeddings and Rerank — Sentence embeddings (all-MiniLM-L6-v2, 384 dimensions, L2-normalized, multilingual input works best in English) for semantic search, clustering and deduplication, or rerank mode: pass query + documents to get documents sorted by cosine similarity. Runs locally, texts are not stored. Params: texts (1 to 32 strings, max 2000 chars each) for embed mode, or query + documents (up to 64) and top_k for rerank mode. Cost: $0.002 USDC per call. Latency p99: 2000ms.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "text_embed"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| texts | No | ||
| top_k | No | ||
| documents | No | ||
| include_embeddings | No |