@mastra/mcp-docs-server 1.0.0-beta.4 → 1.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +326 -126
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flance.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Frag.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Freact.md +80 -1
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +9 -0
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +36 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +92 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +67 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +201 -1
- package/.docs/organized/changelogs/create-mastra.md +201 -1
- package/.docs/organized/changelogs/mastra.md +201 -1
- package/.docs/organized/code-examples/memory-with-processors.md +1 -1
- package/.docs/organized/code-examples/quick-start.md +1 -1
- package/.docs/raw/agents/adding-voice.mdx +7 -10
- package/.docs/raw/agents/guardrails.mdx +19 -20
- package/.docs/raw/agents/human-in-the-loop-with-tools.mdx +6 -5
- package/.docs/raw/agents/networks.mdx +1 -2
- package/.docs/raw/agents/overview.mdx +5 -5
- package/.docs/raw/agents/using-tools.mdx +4 -5
- package/.docs/raw/course/01-first-agent/05-running-playground.md +5 -5
- package/.docs/raw/course/01-first-agent/09-testing-your-agent.md +3 -3
- package/.docs/raw/course/01-first-agent/13-testing-your-tool.md +3 -3
- package/.docs/raw/course/01-first-agent/17-testing-memory.md +2 -2
- package/.docs/raw/course/04-workflows/07-using-playground.md +1 -1
- package/.docs/raw/deployment/building-mastra.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/index.mdx +1 -1
- package/.docs/raw/deployment/mastra-cloud/observability.mdx +19 -17
- package/.docs/raw/deployment/mastra-cloud/setting-up.mdx +1 -1
- package/.docs/raw/deployment/overview.mdx +2 -2
- package/.docs/raw/deployment/web-framework.mdx +5 -5
- package/.docs/raw/evals/custom-scorers.mdx +3 -5
- package/.docs/raw/evals/overview.mdx +2 -3
- package/.docs/raw/getting-started/project-structure.mdx +1 -1
- package/.docs/raw/getting-started/start.mdx +72 -0
- package/.docs/raw/getting-started/studio.mdx +1 -1
- package/.docs/raw/{frameworks/agentic-uis/ai-sdk.mdx → guides/build-your-ui/ai-sdk-ui.mdx} +105 -11
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/astro.mdx +23 -25
- package/.docs/raw/{frameworks/servers → guides/getting-started}/express.mdx +3 -4
- package/.docs/raw/guides/{guide → getting-started}/manual-install.mdx +1 -1
- package/.docs/raw/guides/{quickstarts/nextjs.mdx → getting-started/next-js.mdx} +11 -11
- package/.docs/raw/guides/{quickstarts/standalone-server.mdx → getting-started/quickstart.mdx} +7 -7
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/sveltekit.mdx +23 -25
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/vite-react.mdx +7 -7
- package/.docs/raw/guides/guide/ai-recruiter.mdx +2 -3
- package/.docs/raw/guides/guide/chef-michel.mdx +2 -3
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +2 -2
- package/.docs/raw/guides/guide/research-assistant.mdx +7 -8
- package/.docs/raw/guides/guide/stock-agent.mdx +4 -6
- package/.docs/raw/guides/guide/web-search.mdx +12 -10
- package/.docs/raw/guides/migrations/agentnetwork.mdx +4 -4
- package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +1 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +29 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +5 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +22 -0
- package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +2 -2
- package/.docs/raw/index.mdx +2 -2
- package/.docs/raw/mcp/overview.mdx +3 -5
- package/.docs/raw/memory/memory-processors.mdx +1 -2
- package/.docs/raw/memory/semantic-recall.mdx +7 -7
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +2 -4
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +2 -4
- package/.docs/raw/memory/storage/memory-with-pg.mdx +2 -4
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +2 -4
- package/.docs/raw/memory/threads-and-resources.mdx +3 -3
- package/.docs/raw/memory/working-memory.mdx +4 -5
- package/.docs/raw/{logging.mdx → observability/logging.mdx} +1 -1
- package/.docs/raw/observability/overview.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/otel.mdx +21 -2
- package/.docs/raw/observability/tracing/exporters/posthog.mdx +107 -0
- package/.docs/raw/observability/tracing/overview.mdx +3 -2
- package/.docs/raw/rag/chunking-and-embedding.mdx +16 -17
- package/.docs/raw/rag/overview.mdx +3 -2
- package/.docs/raw/rag/retrieval.mdx +20 -32
- package/.docs/raw/reference/agents/agent.mdx +7 -10
- package/.docs/raw/reference/agents/generateLegacy.mdx +2 -2
- package/.docs/raw/reference/agents/getLLM.mdx +1 -1
- package/.docs/raw/reference/agents/network.mdx +2 -3
- package/.docs/raw/reference/cli/mastra.mdx +2 -1
- package/.docs/raw/reference/client-js/agents.mdx +3 -3
- package/.docs/raw/reference/core/getLogger.mdx +1 -1
- package/.docs/raw/reference/core/listLogs.mdx +1 -1
- package/.docs/raw/reference/core/listLogsByRunId.mdx +1 -1
- package/.docs/raw/reference/core/mastra-model-gateway.mdx +5 -19
- package/.docs/raw/reference/core/setLogger.mdx +1 -1
- package/.docs/raw/reference/core/setTelemetry.mdx +1 -1
- package/.docs/raw/reference/evals/answer-relevancy.mdx +28 -98
- package/.docs/raw/reference/evals/answer-similarity.mdx +12 -258
- package/.docs/raw/reference/evals/bias.mdx +29 -87
- package/.docs/raw/reference/evals/completeness.mdx +31 -90
- package/.docs/raw/reference/evals/content-similarity.mdx +28 -88
- package/.docs/raw/reference/evals/context-precision.mdx +28 -130
- package/.docs/raw/reference/evals/context-relevance.mdx +11 -11
- package/.docs/raw/reference/evals/faithfulness.mdx +28 -101
- package/.docs/raw/reference/evals/hallucination.mdx +28 -103
- package/.docs/raw/reference/evals/keyword-coverage.mdx +28 -107
- package/.docs/raw/reference/evals/noise-sensitivity.mdx +11 -11
- package/.docs/raw/reference/evals/prompt-alignment.mdx +15 -15
- package/.docs/raw/reference/evals/textual-difference.mdx +27 -100
- package/.docs/raw/reference/evals/tone-consistency.mdx +25 -98
- package/.docs/raw/reference/evals/tool-call-accuracy.mdx +7 -7
- package/.docs/raw/reference/evals/toxicity.mdx +29 -92
- package/.docs/raw/reference/memory/memory-class.mdx +5 -7
- package/.docs/raw/reference/observability/tracing/exporters/posthog.mdx +132 -0
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +1 -1
- package/.docs/raw/reference/processors/language-detector.mdx +1 -1
- package/.docs/raw/reference/processors/moderation-processor.mdx +2 -2
- package/.docs/raw/reference/processors/pii-detector.mdx +2 -2
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +1 -1
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +2 -3
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +2 -2
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +1 -1
- package/.docs/raw/reference/rag/embeddings.mdx +5 -5
- package/.docs/raw/reference/rag/rerank.mdx +1 -2
- package/.docs/raw/reference/rag/rerankWithScorer.mdx +0 -1
- package/.docs/raw/reference/streaming/agents/stream.mdx +8 -1
- package/.docs/raw/reference/templates/overview.mdx +1 -4
- package/.docs/raw/reference/tools/client.mdx +1 -2
- package/.docs/raw/reference/tools/create-tool.mdx +132 -0
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +5 -5
- package/.docs/raw/reference/tools/mcp-client.mdx +2 -4
- package/.docs/raw/reference/tools/mcp-server.mdx +1 -2
- package/.docs/raw/reference/tools/vector-query-tool.mdx +14 -15
- package/.docs/raw/reference/vectors/chroma.mdx +81 -1
- package/.docs/raw/reference/vectors/couchbase.mdx +24 -17
- package/.docs/raw/reference/vectors/lance.mdx +38 -22
- package/.docs/raw/reference/vectors/libsql.mdx +35 -2
- package/.docs/raw/reference/vectors/mongodb.mdx +35 -2
- package/.docs/raw/reference/vectors/opensearch.mdx +37 -16
- package/.docs/raw/reference/vectors/pg.mdx +43 -36
- package/.docs/raw/reference/vectors/pinecone.mdx +48 -1
- package/.docs/raw/reference/vectors/qdrant.mdx +36 -1
- package/.docs/raw/reference/vectors/turbopuffer.mdx +74 -0
- package/.docs/raw/reference/voice/openai-realtime.mdx +2 -2
- package/.docs/raw/reference/voice/voice.addInstructions.mdx +2 -3
- package/.docs/raw/reference/voice/voice.addTools.mdx +1 -1
- package/.docs/raw/reference/voice/voice.answer.mdx +1 -1
- package/.docs/raw/reference/voice/voice.close.mdx +1 -1
- package/.docs/raw/reference/voice/voice.connect.mdx +1 -1
- package/.docs/raw/reference/voice/voice.off.mdx +1 -1
- package/.docs/raw/reference/voice/voice.on.mdx +1 -1
- package/.docs/raw/reference/voice/voice.send.mdx +1 -1
- package/.docs/raw/reference/voice/voice.updateConfig.mdx +1 -1
- package/.docs/raw/server-db/mastra-client.mdx +1 -2
- package/.docs/raw/streaming/overview.mdx +20 -9
- package/.docs/raw/streaming/tool-streaming.mdx +47 -4
- package/.docs/raw/tools-mcp/advanced-usage.mdx +1 -2
- package/.docs/raw/tools-mcp/mcp-overview.mdx +3 -5
- package/.docs/raw/voice/overview.mdx +21 -41
- package/.docs/raw/voice/speech-to-speech.mdx +4 -4
- package/.docs/raw/voice/speech-to-text.mdx +1 -2
- package/.docs/raw/voice/text-to-speech.mdx +1 -2
- package/.docs/raw/workflows/control-flow.mdx +180 -0
- package/CHANGELOG.md +10 -0
- package/dist/{chunk-5NJC7NRO.js → chunk-4CM2BQNP.js} +24 -4
- package/dist/prepare-docs/package-changes.d.ts.map +1 -1
- package/dist/prepare-docs/prepare.js +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +7 -7
- package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +0 -102
- package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +0 -179
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +0 -379
- package/.docs/raw/getting-started/quickstart.mdx +0 -27
- package/.docs/raw/getting-started/templates.mdx +0 -73
- /package/.docs/raw/{frameworks/agentic-uis → guides/build-your-ui}/assistant-ui.mdx +0 -0
- /package/.docs/raw/{frameworks/agentic-uis → guides/build-your-ui}/copilotkit.mdx +0 -0
|
@@ -19,10 +19,9 @@ function rerank(
|
|
|
19
19
|
## Usage Example
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
|
-
import { openai } from "@ai-sdk/openai";
|
|
23
22
|
import { rerank } from "@mastra/rag";
|
|
24
23
|
|
|
25
|
-
const model = openai
|
|
24
|
+
const model = "openai/gpt-5.1";
|
|
26
25
|
|
|
27
26
|
const rerankedResults = await rerank(
|
|
28
27
|
vectorSearchResults,
|
|
@@ -254,6 +254,13 @@ const aiSdkStream = await agent.stream("message for agent", {
|
|
|
254
254
|
description:
|
|
255
255
|
"Overrides the output processors set on the agent. Output processors that can modify or validate messages from the agent before they are returned to the user. Must implement either (or both) of the `processOutputResult` and `processOutputStream` functions.",
|
|
256
256
|
},
|
|
257
|
+
{
|
|
258
|
+
name: "includeRawChunks",
|
|
259
|
+
type: "boolean",
|
|
260
|
+
isOptional: true,
|
|
261
|
+
description:
|
|
262
|
+
"Whether to include raw chunks in the stream output (not available on all model providers).",
|
|
263
|
+
},
|
|
257
264
|
{
|
|
258
265
|
name: "inputProcessors",
|
|
259
266
|
type: "Processor[]",
|
|
@@ -701,7 +708,7 @@ await agent.stream("message for agent", {
|
|
|
701
708
|
sentiment: z.enum(["positive", "negative", "neutral"]),
|
|
702
709
|
confidence: z.number(),
|
|
703
710
|
}),
|
|
704
|
-
model: "openai/gpt-
|
|
711
|
+
model: "openai/gpt-5.1",
|
|
705
712
|
errorStrategy: "warn",
|
|
706
713
|
},
|
|
707
714
|
// Output processors for streaming response validation
|
|
@@ -118,13 +118,10 @@ We recommend using OpenAI, Anthropic, or Google model providers for templates. C
|
|
|
118
118
|
|
|
119
119
|
```typescript title="src/mastra/agents/example-agent.ts"
|
|
120
120
|
import { Agent } from "@mastra/core/agent";
|
|
121
|
-
import { openai } from "@ai-sdk/openai";
|
|
122
|
-
// Or use: import { anthropic } from '@ai-sdk/anthropic';
|
|
123
|
-
// Or use: import { google } from '@ai-sdk/google';
|
|
124
121
|
|
|
125
122
|
const agent = new Agent({
|
|
126
123
|
name: "example-agent",
|
|
127
|
-
model: openai
|
|
124
|
+
model: "openai/gpt-5.1", // or other provider strings
|
|
128
125
|
instructions: "Your agent instructions here",
|
|
129
126
|
// ... other configuration
|
|
130
127
|
});
|
|
@@ -230,7 +230,6 @@ Returns an object mapping tool names to their corresponding Mastra tool implemen
|
|
|
230
230
|
```typescript
|
|
231
231
|
import { Agent } from "@mastra/core/agent";
|
|
232
232
|
import { MastraMCPClient } from "@mastra/mcp";
|
|
233
|
-
import { openai } from "@ai-sdk/openai";
|
|
234
233
|
|
|
235
234
|
// Initialize the MCP client using mcp/fetch as an example https://hub.docker.com/r/mcp/fetch
|
|
236
235
|
// Visit https://github.com/docker/mcp-servers for other reference docker mcp servers
|
|
@@ -250,7 +249,7 @@ const agent = new Agent({
|
|
|
250
249
|
name: "Fetch agent",
|
|
251
250
|
instructions:
|
|
252
251
|
"You are able to fetch data from URLs on demand and discuss the response data with the user.",
|
|
253
|
-
model: openai
|
|
252
|
+
model: "openai/gpt-5.1",
|
|
254
253
|
});
|
|
255
254
|
|
|
256
255
|
try {
|
|
@@ -131,6 +131,34 @@ export const tool = createTool({
|
|
|
131
131
|
},
|
|
132
132
|
],
|
|
133
133
|
},
|
|
134
|
+
{
|
|
135
|
+
name: "onInputStart",
|
|
136
|
+
type: "function",
|
|
137
|
+
description:
|
|
138
|
+
"Optional callback invoked when the tool call input streaming begins. Receives `toolCallId`, `messages`, and `abortSignal`.",
|
|
139
|
+
isOptional: true,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "onInputDelta",
|
|
143
|
+
type: "function",
|
|
144
|
+
description:
|
|
145
|
+
"Optional callback invoked for each incremental chunk of input text as it streams in. Receives `inputTextDelta`, `toolCallId`, `messages`, and `abortSignal`.",
|
|
146
|
+
isOptional: true,
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: "onInputAvailable",
|
|
150
|
+
type: "function",
|
|
151
|
+
description:
|
|
152
|
+
"Optional callback invoked when the complete tool input is available and parsed. Receives the validated `input` object, `toolCallId`, `messages`, and `abortSignal`.",
|
|
153
|
+
isOptional: true,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "onOutput",
|
|
157
|
+
type: "function",
|
|
158
|
+
description:
|
|
159
|
+
"Optional callback invoked after the tool has successfully executed and returned output. Receives the tool's `output`, `toolCallId`, `messages`, and `abortSignal`.",
|
|
160
|
+
isOptional: true,
|
|
161
|
+
},
|
|
134
162
|
]}
|
|
135
163
|
/>
|
|
136
164
|
|
|
@@ -149,8 +177,112 @@ The `createTool()` function returns a `Tool` object.
|
|
|
149
177
|
]}
|
|
150
178
|
/>
|
|
151
179
|
|
|
180
|
+
## Tool Lifecycle Hooks
|
|
181
|
+
|
|
182
|
+
Tools support lifecycle hooks that allow you to monitor and react to different stages of tool execution. These hooks are particularly useful for logging, analytics, validation, and real-time updates during streaming.
|
|
183
|
+
|
|
184
|
+
### Available Hooks
|
|
185
|
+
|
|
186
|
+
#### onInputStart
|
|
187
|
+
|
|
188
|
+
Called when tool call input streaming begins, before any input data is received.
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
export const tool = createTool({
|
|
192
|
+
id: "example-tool",
|
|
193
|
+
description: "Example tool with hooks",
|
|
194
|
+
onInputStart: ({ toolCallId, messages, abortSignal }) => {
|
|
195
|
+
console.log(`Tool ${toolCallId} input streaming started`);
|
|
196
|
+
},
|
|
197
|
+
// ... other properties
|
|
198
|
+
});
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
#### onInputDelta
|
|
202
|
+
|
|
203
|
+
Called for each incremental chunk of input text as it streams in. Useful for showing real-time progress or parsing partial JSON.
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
export const tool = createTool({
|
|
207
|
+
id: "example-tool",
|
|
208
|
+
description: "Example tool with hooks",
|
|
209
|
+
onInputDelta: ({ inputTextDelta, toolCallId, messages, abortSignal }) => {
|
|
210
|
+
console.log(`Received input chunk: ${inputTextDelta}`);
|
|
211
|
+
},
|
|
212
|
+
// ... other properties
|
|
213
|
+
});
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
#### onInputAvailable
|
|
217
|
+
|
|
218
|
+
Called when the complete tool input is available and has been parsed and validated against the `inputSchema`.
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
export const tool = createTool({
|
|
222
|
+
id: "example-tool",
|
|
223
|
+
description: "Example tool with hooks",
|
|
224
|
+
inputSchema: z.object({
|
|
225
|
+
city: z.string(),
|
|
226
|
+
}),
|
|
227
|
+
onInputAvailable: ({ input, toolCallId, messages, abortSignal }) => {
|
|
228
|
+
console.log(`Tool received complete input:`, input);
|
|
229
|
+
// input is fully typed based on inputSchema
|
|
230
|
+
},
|
|
231
|
+
// ... other properties
|
|
232
|
+
});
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
#### onOutput
|
|
236
|
+
|
|
237
|
+
Called after the tool has successfully executed and returned output. Useful for logging results, triggering follow-up actions, or analytics.
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
export const tool = createTool({
|
|
241
|
+
id: "example-tool",
|
|
242
|
+
description: "Example tool with hooks",
|
|
243
|
+
outputSchema: z.object({
|
|
244
|
+
result: z.string(),
|
|
245
|
+
}),
|
|
246
|
+
execute: async (input) => {
|
|
247
|
+
return { result: "Success" };
|
|
248
|
+
},
|
|
249
|
+
onOutput: ({ output, toolCallId, toolName, abortSignal }) => {
|
|
250
|
+
console.log(`${toolName} execution completed:`, output);
|
|
251
|
+
// output is fully typed based on outputSchema
|
|
252
|
+
},
|
|
253
|
+
});
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Hook Execution Order
|
|
257
|
+
|
|
258
|
+
For a typical streaming tool call, the hooks are invoked in this order:
|
|
259
|
+
|
|
260
|
+
1. **onInputStart** - Input streaming begins
|
|
261
|
+
2. **onInputDelta** - Called multiple times as chunks arrive
|
|
262
|
+
3. **onInputAvailable** - Complete input is parsed and validated
|
|
263
|
+
4. Tool's **execute** function runs
|
|
264
|
+
5. **onOutput** - Tool has completed successfully
|
|
265
|
+
|
|
266
|
+
### Hook Parameters
|
|
267
|
+
|
|
268
|
+
All hooks receive a parameter object with these common properties:
|
|
269
|
+
|
|
270
|
+
- `toolCallId` (string): Unique identifier for this specific tool call
|
|
271
|
+
- `abortSignal` (AbortSignal): Signal for detecting if the operation should be cancelled
|
|
272
|
+
|
|
273
|
+
Additionally:
|
|
274
|
+
- `onInputStart`, `onInputDelta`, and `onInputAvailable` receive `messages` (array): The conversation messages at the time of the tool call
|
|
275
|
+
- `onInputDelta` receives `inputTextDelta` (string): The incremental text chunk
|
|
276
|
+
- `onInputAvailable` receives `input`: The validated input data (typed according to `inputSchema`)
|
|
277
|
+
- `onOutput` receives `output`: The tool's return value (typed according to `outputSchema`) and `toolName` (string): The name of the tool
|
|
278
|
+
|
|
279
|
+
### Error Handling
|
|
280
|
+
|
|
281
|
+
Hook errors are caught and logged automatically, but do not prevent tool execution from continuing. If a hook throws an error, it will be logged to the console but will not fail the tool call.
|
|
282
|
+
|
|
152
283
|
## Related
|
|
153
284
|
|
|
154
285
|
- [MCP Overview](/docs/v1/mcp/overview)
|
|
155
286
|
- [Using Tools with Agents](/docs/v1/agents/using-tools)
|
|
287
|
+
- [Tool Streaming](/docs/v1/streaming/tool-streaming)
|
|
156
288
|
- [Request Context](/docs/v1/server-db/request-context#accessing-values-with-tools)
|
|
@@ -10,13 +10,13 @@ The `createGraphRAGTool()` creates a tool that enhances RAG by building a graph
|
|
|
10
10
|
## Usage Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { openai } from "@ai-sdk/openai";
|
|
14
13
|
import { createGraphRAGTool } from "@mastra/rag";
|
|
14
|
+
import { ModelRouterEmbeddingModel } from "@mastra/core/llm";
|
|
15
15
|
|
|
16
16
|
const graphTool = createGraphRAGTool({
|
|
17
17
|
vectorStoreName: "pinecone",
|
|
18
18
|
indexName: "docs",
|
|
19
|
-
model:
|
|
19
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
20
20
|
graphOptions: {
|
|
21
21
|
dimension: 1536,
|
|
22
22
|
threshold: 0.7,
|
|
@@ -193,7 +193,7 @@ The default description focuses on:
|
|
|
193
193
|
const graphTool = createGraphRAGTool({
|
|
194
194
|
vectorStoreName: "pinecone",
|
|
195
195
|
indexName: "docs",
|
|
196
|
-
model:
|
|
196
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
197
197
|
graphOptions: {
|
|
198
198
|
dimension: 1536,
|
|
199
199
|
threshold: 0.8, // Higher similarity threshold
|
|
@@ -209,7 +209,7 @@ const graphTool = createGraphRAGTool({
|
|
|
209
209
|
const graphTool = createGraphRAGTool({
|
|
210
210
|
vectorStoreName: "pinecone",
|
|
211
211
|
indexName: "docs",
|
|
212
|
-
model: openai
|
|
212
|
+
model: "openai/text-embedding-3-small ",
|
|
213
213
|
description:
|
|
214
214
|
"Analyze document relationships to find complex patterns and connections in our company's historical data",
|
|
215
215
|
});
|
|
@@ -223,7 +223,7 @@ This example shows how to customize the tool description for a specific use case
|
|
|
223
223
|
const graphTool = createGraphRAGTool({
|
|
224
224
|
vectorStoreName: "pinecone",
|
|
225
225
|
indexName: "docs",
|
|
226
|
-
model: openai
|
|
226
|
+
model: "openai/text-embedding-3-small ",
|
|
227
227
|
});
|
|
228
228
|
```
|
|
229
229
|
|
|
@@ -632,7 +632,6 @@ For tools where you have a single connection to the MCP server for you entire ap
|
|
|
632
632
|
```typescript
|
|
633
633
|
import { MCPClient } from "@mastra/mcp";
|
|
634
634
|
import { Agent } from "@mastra/core/agent";
|
|
635
|
-
import { openai } from "@ai-sdk/openai";
|
|
636
635
|
|
|
637
636
|
const mcp = new MCPClient({
|
|
638
637
|
servers: {
|
|
@@ -657,7 +656,7 @@ const mcp = new MCPClient({
|
|
|
657
656
|
const agent = new Agent({
|
|
658
657
|
name: "Multi-tool Agent",
|
|
659
658
|
instructions: "You have access to multiple tool servers.",
|
|
660
|
-
model: openai
|
|
659
|
+
model: "openai/gpt-5.1",
|
|
661
660
|
tools: await mcp.listTools(),
|
|
662
661
|
});
|
|
663
662
|
|
|
@@ -707,13 +706,12 @@ When you need a new MCP connection for each user, use `listToolsets()` and add t
|
|
|
707
706
|
```typescript
|
|
708
707
|
import { Agent } from "@mastra/core/agent";
|
|
709
708
|
import { MCPClient } from "@mastra/mcp";
|
|
710
|
-
import { openai } from "@ai-sdk/openai";
|
|
711
709
|
|
|
712
710
|
// Create the agent first, without any tools
|
|
713
711
|
const agent = new Agent({
|
|
714
712
|
name: "Multi-tool Agent",
|
|
715
713
|
instructions: "You help users check stocks and weather.",
|
|
716
|
-
model: openai
|
|
714
|
+
model: "openai/gpt-5.1",
|
|
717
715
|
});
|
|
718
716
|
|
|
719
717
|
// Later, configure MCP with user-specific settings
|
|
@@ -16,7 +16,6 @@ It supports both [stdio (subprocess) and SSE (HTTP) MCP transports](https://mode
|
|
|
16
16
|
To create a new `MCPServer`, you need to provide some basic information about your server, the tools it will offer, and optionally, any agents you want to expose as tools.
|
|
17
17
|
|
|
18
18
|
```typescript
|
|
19
|
-
import { openai } from "@ai-sdk/openai";
|
|
20
19
|
import { Agent } from "@mastra/core/agent";
|
|
21
20
|
import { createTool } from "@mastra/core/tools";
|
|
22
21
|
import { MCPServer } from "@mastra/mcp";
|
|
@@ -28,7 +27,7 @@ const myAgent = new Agent({
|
|
|
28
27
|
name: "MyExampleAgent",
|
|
29
28
|
description: "A generalist to help with basic questions."
|
|
30
29
|
instructions: "You are a helpful assistant.",
|
|
31
|
-
model: openai
|
|
30
|
+
model: "openai/gpt-5.1",
|
|
32
31
|
});
|
|
33
32
|
|
|
34
33
|
const weatherTool = createTool({
|
|
@@ -13,13 +13,13 @@ The `createVectorQueryTool()` function creates a tool for semantic search over v
|
|
|
13
13
|
## Basic Usage
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { openai } from "@ai-sdk/openai";
|
|
17
16
|
import { createVectorQueryTool } from "@mastra/rag";
|
|
17
|
+
import { ModelRouterEmbeddingModel } from "@mastra/core/llm";
|
|
18
18
|
|
|
19
19
|
const queryTool = createVectorQueryTool({
|
|
20
20
|
vectorStoreName: "pinecone",
|
|
21
21
|
indexName: "docs",
|
|
22
|
-
model:
|
|
22
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
23
23
|
});
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -303,7 +303,7 @@ The tool determines the number of results to return based on the user's query, w
|
|
|
303
303
|
const queryTool = createVectorQueryTool({
|
|
304
304
|
vectorStoreName: "pinecone",
|
|
305
305
|
indexName: "docs",
|
|
306
|
-
model:
|
|
306
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
307
307
|
enableFilter: true,
|
|
308
308
|
});
|
|
309
309
|
```
|
|
@@ -334,9 +334,9 @@ For an example of how agent-driven filtering works, see the [Agent-Driven Metada
|
|
|
334
334
|
const queryTool = createVectorQueryTool({
|
|
335
335
|
vectorStoreName: "milvus",
|
|
336
336
|
indexName: "documentation",
|
|
337
|
-
model:
|
|
337
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
338
338
|
reranker: {
|
|
339
|
-
model: openai
|
|
339
|
+
model: "openai/gpt-5.1",
|
|
340
340
|
options: {
|
|
341
341
|
weights: {
|
|
342
342
|
semantic: 0.5, // Semantic relevance weight
|
|
@@ -364,7 +364,7 @@ The reranker processes the initial vector search results and returns a reordered
|
|
|
364
364
|
const queryTool = createVectorQueryTool({
|
|
365
365
|
vectorStoreName: "pinecone",
|
|
366
366
|
indexName: "docs",
|
|
367
|
-
model:
|
|
367
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
368
368
|
description:
|
|
369
369
|
"Search through document archives to find relevant information for answering questions about company policies and procedures",
|
|
370
370
|
});
|
|
@@ -384,7 +384,7 @@ The `databaseConfig` parameter allows you to leverage unique features and optimi
|
|
|
384
384
|
const pineconeQueryTool = createVectorQueryTool({
|
|
385
385
|
vectorStoreName: "pinecone",
|
|
386
386
|
indexName: "docs",
|
|
387
|
-
model:
|
|
387
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
388
388
|
databaseConfig: {
|
|
389
389
|
pinecone: {
|
|
390
390
|
namespace: "production", // Organize vectors by environment
|
|
@@ -411,7 +411,7 @@ The `databaseConfig` parameter allows you to leverage unique features and optimi
|
|
|
411
411
|
const pgVectorQueryTool = createVectorQueryTool({
|
|
412
412
|
vectorStoreName: "postgres",
|
|
413
413
|
indexName: "embeddings",
|
|
414
|
-
model:
|
|
414
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
415
415
|
databaseConfig: {
|
|
416
416
|
pgvector: {
|
|
417
417
|
minScore: 0.7, // Only return results above 70% similarity
|
|
@@ -437,7 +437,7 @@ The `databaseConfig` parameter allows you to leverage unique features and optimi
|
|
|
437
437
|
const chromaQueryTool = createVectorQueryTool({
|
|
438
438
|
vectorStoreName: "chroma",
|
|
439
439
|
indexName: "documents",
|
|
440
|
-
model:
|
|
440
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
441
441
|
databaseConfig: {
|
|
442
442
|
chroma: {
|
|
443
443
|
where: { // Metadata filtering
|
|
@@ -467,7 +467,7 @@ The `databaseConfig` parameter allows you to leverage unique features and optimi
|
|
|
467
467
|
const multiDbQueryTool = createVectorQueryTool({
|
|
468
468
|
vectorStoreName: "dynamic-store", // Will be set at runtime
|
|
469
469
|
indexName: "docs",
|
|
470
|
-
model:
|
|
470
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
471
471
|
databaseConfig: {
|
|
472
472
|
pinecone: {
|
|
473
473
|
namespace: "default"
|
|
@@ -501,7 +501,7 @@ import { RequestContext } from "@mastra/core/request-context";
|
|
|
501
501
|
const queryTool = createVectorQueryTool({
|
|
502
502
|
vectorStoreName: "pinecone",
|
|
503
503
|
indexName: "docs",
|
|
504
|
-
|
|
504
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
505
505
|
databaseConfig: {
|
|
506
506
|
pinecone: {
|
|
507
507
|
namespace: "development",
|
|
@@ -534,7 +534,7 @@ This approach allows you to:
|
|
|
534
534
|
const queryTool = createVectorQueryTool({
|
|
535
535
|
vectorStoreName: "pinecone",
|
|
536
536
|
indexName: "docs",
|
|
537
|
-
|
|
537
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
538
538
|
});
|
|
539
539
|
```
|
|
540
540
|
|
|
@@ -555,7 +555,7 @@ requestContext.set("filter", { category: "docs" });
|
|
|
555
555
|
requestContext.set("databaseConfig", {
|
|
556
556
|
pinecone: { namespace: "runtime-namespace" },
|
|
557
557
|
});
|
|
558
|
-
requestContext.set("model", openai
|
|
558
|
+
requestContext.set("model", "openai/text-embedding-3-small");
|
|
559
559
|
|
|
560
560
|
const response = await agent.generate(
|
|
561
561
|
"Find documentation from the knowledge base.",
|
|
@@ -575,7 +575,6 @@ For more information on request context, please see:
|
|
|
575
575
|
The tool can be used by itself to retrieve documents matching a query:
|
|
576
576
|
|
|
577
577
|
```typescript copy showLineNumbers title="src/index.ts"
|
|
578
|
-
import { openai } from "@ai-sdk/openai";
|
|
579
578
|
import { RequestContext } from "@mastra/core/request-context";
|
|
580
579
|
import { createVectorQueryTool } from "@mastra/rag";
|
|
581
580
|
import { PgVector } from "@mastra/pg";
|
|
@@ -589,7 +588,7 @@ const vectorQueryTool = createVectorQueryTool({
|
|
|
589
588
|
vectorStoreName: "pgVector", // optional since we're passing in a store
|
|
590
589
|
vectorStore: pgVector,
|
|
591
590
|
indexName: "embeddings",
|
|
592
|
-
model:
|
|
591
|
+
model: new ModelRouterEmbeddingModel("openai/text-embedding-3-small"),
|
|
593
592
|
});
|
|
594
593
|
|
|
595
594
|
const requestContext = new RequestContext();
|
|
@@ -335,6 +335,8 @@ interface IndexStats {
|
|
|
335
335
|
|
|
336
336
|
### updateVector()
|
|
337
337
|
|
|
338
|
+
Update a single vector by ID or by metadata filter. Either `id` or `filter` must be provided, but not both.
|
|
339
|
+
|
|
338
340
|
<PropertiesTable
|
|
339
341
|
content={[
|
|
340
342
|
{
|
|
@@ -345,7 +347,14 @@ interface IndexStats {
|
|
|
345
347
|
{
|
|
346
348
|
name: "id",
|
|
347
349
|
type: "string",
|
|
348
|
-
|
|
350
|
+
isOptional: true,
|
|
351
|
+
description: "ID of the vector to update (mutually exclusive with filter)",
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
name: "filter",
|
|
355
|
+
type: "Record<string, any>",
|
|
356
|
+
isOptional: true,
|
|
357
|
+
description: "Metadata filter to identify vector(s) to update (mutually exclusive with id)",
|
|
349
358
|
},
|
|
350
359
|
{
|
|
351
360
|
name: "update",
|
|
@@ -374,6 +383,24 @@ The `update` object can contain:
|
|
|
374
383
|
]}
|
|
375
384
|
/>
|
|
376
385
|
|
|
386
|
+
Example:
|
|
387
|
+
|
|
388
|
+
```typescript
|
|
389
|
+
// Update by ID
|
|
390
|
+
await vectorStore.updateVector({
|
|
391
|
+
indexName: 'docs',
|
|
392
|
+
id: 'vec_123',
|
|
393
|
+
update: { metadata: { status: 'reviewed' } }
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
// Update by filter
|
|
397
|
+
await vectorStore.updateVector({
|
|
398
|
+
indexName: 'docs',
|
|
399
|
+
filter: { source_id: 'manual.pdf' },
|
|
400
|
+
update: { metadata: { version: 2 } }
|
|
401
|
+
});
|
|
402
|
+
```
|
|
403
|
+
|
|
377
404
|
### deleteVector()
|
|
378
405
|
|
|
379
406
|
<PropertiesTable
|
|
@@ -391,6 +418,59 @@ The `update` object can contain:
|
|
|
391
418
|
]}
|
|
392
419
|
/>
|
|
393
420
|
|
|
421
|
+
### deleteVectors()
|
|
422
|
+
|
|
423
|
+
Delete multiple vectors by IDs or by metadata filter. This method enables bulk deletion and source-based vector management. Either `ids` or `filter` must be provided, but not both.
|
|
424
|
+
|
|
425
|
+
<PropertiesTable
|
|
426
|
+
content={[
|
|
427
|
+
{
|
|
428
|
+
name: "indexName",
|
|
429
|
+
type: "string",
|
|
430
|
+
description: "Name of the index containing the vectors to delete",
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
name: "ids",
|
|
434
|
+
type: "string[]",
|
|
435
|
+
isOptional: true,
|
|
436
|
+
description: "Array of vector IDs to delete (mutually exclusive with filter)",
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
name: "filter",
|
|
440
|
+
type: "Record<string, any>",
|
|
441
|
+
isOptional: true,
|
|
442
|
+
description: "Metadata filter to identify vectors to delete (mutually exclusive with ids)",
|
|
443
|
+
},
|
|
444
|
+
]}
|
|
445
|
+
/>
|
|
446
|
+
|
|
447
|
+
Example:
|
|
448
|
+
|
|
449
|
+
```typescript
|
|
450
|
+
// Delete all chunks from a document
|
|
451
|
+
await vectorStore.deleteVectors({
|
|
452
|
+
indexName: 'docs',
|
|
453
|
+
filter: { source_id: 'manual.pdf' }
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
// Delete multiple vectors by ID
|
|
457
|
+
await vectorStore.deleteVectors({
|
|
458
|
+
indexName: 'docs',
|
|
459
|
+
ids: ['vec_1', 'vec_2', 'vec_3']
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
// Delete old temporary documents
|
|
463
|
+
await vectorStore.deleteVectors({
|
|
464
|
+
indexName: 'docs',
|
|
465
|
+
filter: {
|
|
466
|
+
$and: [
|
|
467
|
+
{ bucket: 'temp' },
|
|
468
|
+
{ indexed_at: { $lt: '2025-01-01' } }
|
|
469
|
+
]
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
```
|
|
473
|
+
|
|
394
474
|
## Response Types
|
|
395
475
|
|
|
396
476
|
Query results are returned in this format:
|
|
@@ -239,7 +239,7 @@ Returns: `Promise<string[]>`
|
|
|
239
239
|
|
|
240
240
|
### updateVector()
|
|
241
241
|
|
|
242
|
-
Updates a specific vector entry by its ID with new vector data and/or metadata.
|
|
242
|
+
Updates a specific vector entry by its ID with new vector data and/or metadata. **Note:** Filter-based updates are not yet implemented for Couchbase.
|
|
243
243
|
|
|
244
244
|
<PropertiesTable
|
|
245
245
|
content={[
|
|
@@ -255,27 +255,15 @@ Updates a specific vector entry by its ID with new vector data and/or metadata.
|
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
257
|
name: "update",
|
|
258
|
-
type: "
|
|
259
|
-
description: "
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
name: "update.vector",
|
|
263
|
-
type: "number[]",
|
|
264
|
-
isOptional: true,
|
|
265
|
-
description: "New vector data to update",
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
name: "update.metadata",
|
|
269
|
-
type: "Record<string, any>",
|
|
270
|
-
isOptional: true,
|
|
271
|
-
description: "New metadata to update",
|
|
258
|
+
type: "{ vector?: number[]; metadata?: Record<string, any>; }",
|
|
259
|
+
description: "Object containing the vector and/or metadata to update",
|
|
272
260
|
},
|
|
273
261
|
]}
|
|
274
262
|
/>
|
|
275
263
|
|
|
276
264
|
### deleteVector()
|
|
277
265
|
|
|
278
|
-
Deletes a
|
|
266
|
+
Deletes a single vector by its ID from the index.
|
|
279
267
|
|
|
280
268
|
<PropertiesTable
|
|
281
269
|
content={[
|
|
@@ -287,7 +275,26 @@ Deletes a specific vector entry from an index by its ID.
|
|
|
287
275
|
{
|
|
288
276
|
name: "id",
|
|
289
277
|
type: "string",
|
|
290
|
-
description: "ID of the vector
|
|
278
|
+
description: "ID of the vector to delete",
|
|
279
|
+
},
|
|
280
|
+
]}
|
|
281
|
+
/>
|
|
282
|
+
|
|
283
|
+
### deleteVectors()
|
|
284
|
+
|
|
285
|
+
Deletes multiple vectors by their IDs. **Note:** Filter-based deletion is not yet implemented for Couchbase.
|
|
286
|
+
|
|
287
|
+
<PropertiesTable
|
|
288
|
+
content={[
|
|
289
|
+
{
|
|
290
|
+
name: "indexName",
|
|
291
|
+
type: "string",
|
|
292
|
+
description: "Name of the index containing the vectors to delete",
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: "ids",
|
|
296
|
+
type: "string[]",
|
|
297
|
+
description: "Array of vector IDs to delete",
|
|
291
298
|
},
|
|
292
299
|
]}
|
|
293
300
|
/>
|