@moss-tools/mastra to expose Moss as native Mastra tools. The package wraps MossClient in createTool() primitives that can search or update a Moss index from a Mastra agent.
Why use Moss with Mastra?
Mastra agents can call tools while reasoning. Moss gives those tools sub-10ms knowledge retrieval after an index is loaded locally, without running an external embedder or vector database.Required tools
- Moss project credentials from the Moss Portal
- Node.js 18+
- A Mastra project
Integration guide
Available tools
mossSearchTool
Searches a Moss index and returns ranked documents.
| Option | Default | Description |
|---|---|---|
client | Required | MossClient instance |
indexName | Optional | Pre-bind to an index. When omitted, the LLM supplies it |
topK | 5 | Number of results to return |
alpha | 0.8 | Search blend. 1.0 = semantic only, 0.0 = keyword only |
id | "moss_search" | Mastra tool ID |
description | Auto-generated | Tool description shown to the LLM |