embedding_write
Converts plain text documents into dense vector embeddings and upserts them into a Zvec collection for storage.
Instructions
Embed text documents and upsert them into a Zvec collection.
Converts each document's text field to a dense vector using OpenAIDenseEmbedding, then upserts all documents into the specified collection. This is the high-level write interface: supply plain text, get vectors stored automatically.
OpenAI connection is read from environment variables: OPENAI_API_KEY, OPENAI_BASE_URL (optional), OPENAI_EMBEDDING_MODEL (optional). The embedding dimension is inferred from the collection schema automatically.
Args: params (EmbeddingWriteInput): - collection_name: Target collection - field_name: Vector field to populate - documents: List of {id, text, fields} — text is auto-embedded
Returns: str: Success message with upsert count, or error
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"params": "<params>"
},
"name": "embedding_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |