@mastra/mcp-docs-server 1.3.5-alpha.9 → 1.3.6-alpha.1

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.
Files changed (133) hide show
  1. package/.docs/docs/agents/code-mode.md +0 -2
  2. package/.docs/docs/agents/overview.md +1 -1
  3. package/.docs/docs/agents/processors.md +10 -0
  4. package/.docs/docs/agents/tools.md +17 -0
  5. package/.docs/docs/auth/composite-auth.md +1 -1
  6. package/.docs/docs/auth/custom-auth-provider.md +28 -22
  7. package/.docs/docs/auth/jwt.md +1 -1
  8. package/.docs/docs/auth/overview.md +2 -2
  9. package/.docs/docs/auth/simple-auth.md +6 -1
  10. package/.docs/docs/browser.md +1 -2
  11. package/.docs/docs/channels.md +4 -0
  12. package/.docs/docs/deployment/overview.md +1 -1
  13. package/.docs/docs/deployment/web-framework.md +1 -1
  14. package/.docs/docs/develop.md +1 -3
  15. package/.docs/docs/evals/built-in-scorers.md +2 -2
  16. package/.docs/docs/evals/experiments.md +3 -0
  17. package/.docs/docs/guides/context-engineering.md +0 -2
  18. package/.docs/docs/guides/overview.md +15 -0
  19. package/.docs/docs/harness/agent-controller.md +7 -12
  20. package/.docs/docs/harness/goals.md +1 -3
  21. package/.docs/docs/harness/schedules.md +0 -2
  22. package/.docs/docs/harness/signal-providers.md +1 -3
  23. package/.docs/docs/harness/signals.md +0 -2
  24. package/.docs/docs/mastra-platform/configuration.md +1 -1
  25. package/.docs/docs/mastra-platform/connect/channels.md +153 -0
  26. package/.docs/docs/mastra-platform/connect/overview.md +102 -0
  27. package/.docs/docs/mastra-platform/connect/providers.md +149 -0
  28. package/.docs/docs/mastra-platform/connect/tools.md +129 -0
  29. package/.docs/docs/mastra-platform/environments.md +1 -1
  30. package/.docs/docs/mastra-platform/observability.md +1 -1
  31. package/.docs/docs/mastra-platform/overview.md +2 -0
  32. package/.docs/docs/memory/observational-memory.md +2 -0
  33. package/.docs/docs/observability/feedback.md +20 -0
  34. package/.docs/docs/observability/overview.md +0 -5
  35. package/.docs/docs/observability/tracing/overview.md +30 -0
  36. package/.docs/docs/sandbox/filesystem.md +12 -12
  37. package/.docs/docs/studio/observability.md +1 -1
  38. package/.docs/docs/workflows/error-handling.md +2 -0
  39. package/.docs/integrations/observability/langfuse.md +2 -0
  40. package/.docs/integrations/voice/livekit.md +449 -2
  41. package/.docs/models/gateways/netlify.md +1 -1
  42. package/.docs/models/gateways/openrouter.md +3 -4
  43. package/.docs/models/gateways/vercel.md +9 -3
  44. package/.docs/models/index.md +1 -1
  45. package/.docs/models/providers/aki-io.md +12 -12
  46. package/.docs/models/providers/edenai.md +15 -12
  47. package/.docs/models/providers/kilo.md +13 -15
  48. package/.docs/models/providers/llmgateway-providers.md +7 -2
  49. package/.docs/models/providers/llmgateway.md +5 -3
  50. package/.docs/models/providers/mistral.md +7 -6
  51. package/.docs/models/providers/nano-gpt.md +12 -3
  52. package/.docs/models/providers/opencode-go.md +2 -2
  53. package/.docs/models/providers/opencode.md +3 -1
  54. package/.docs/models/providers/requesty.md +3 -1
  55. package/.docs/models/providers/the-grid-ai.md +19 -12
  56. package/.docs/models/providers/wandb.md +4 -13
  57. package/.docs/reference/agent-controller/agent-controller-class.md +2 -4
  58. package/.docs/reference/agent-controller/session.md +18 -13
  59. package/.docs/reference/agents/createSkill.md +1 -2
  60. package/.docs/reference/agents/durable-agent.md +2 -0
  61. package/.docs/reference/agents/generate.md +4 -0
  62. package/.docs/reference/agents/getModel.md +1 -1
  63. package/.docs/reference/agents/getSkill.md +6 -1
  64. package/.docs/reference/agents/listSkills.md +0 -1
  65. package/.docs/reference/agents/network.md +2 -0
  66. package/.docs/reference/ai-sdk/chat-route.md +4 -0
  67. package/.docs/reference/ai-sdk/handle-chat-stream.md +3 -1
  68. package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +3 -1
  69. package/.docs/reference/auth/jwt.md +1 -1
  70. package/.docs/reference/auth/supabase.md +1 -1
  71. package/.docs/reference/browser/mastra-browser.md +13 -11
  72. package/.docs/reference/channels/slack-provider.md +1 -1
  73. package/.docs/reference/cli/create-mastra.md +1 -1
  74. package/.docs/reference/cli/mastra.md +60 -5
  75. package/.docs/reference/client-js/agent-controller.md +19 -3
  76. package/.docs/reference/client-js/agents.md +1 -1
  77. package/.docs/reference/client-js/conversations.md +1 -1
  78. package/.docs/reference/client-js/mastra-client.md +2 -2
  79. package/.docs/reference/client-js/observability.md +28 -0
  80. package/.docs/reference/client-js/workflows.md +18 -2
  81. package/.docs/reference/code-sdk/mount-agent-controller.md +1 -3
  82. package/.docs/reference/connect/channels.md +91 -0
  83. package/.docs/reference/connect/credential.md +63 -0
  84. package/.docs/reference/connect/providers.md +1059 -0
  85. package/.docs/reference/connect/tools.md +157 -0
  86. package/.docs/reference/core/mastra-model-gateway.md +10 -2
  87. package/.docs/reference/datasets/addItem.md +2 -2
  88. package/.docs/reference/datasets/datasets-manager.md +1 -0
  89. package/.docs/reference/datasets/delete.md +1 -1
  90. package/.docs/reference/datasets/getExperiment.md +5 -1
  91. package/.docs/reference/datasets/startExperimentAsync.md +1 -0
  92. package/.docs/reference/editor/prompt-blocks.md +41 -0
  93. package/.docs/reference/editor/tool-provider.md +19 -0
  94. package/.docs/reference/file-based-agents/config.md +0 -2
  95. package/.docs/reference/file-based-agents/instructions.md +0 -2
  96. package/.docs/reference/file-based-agents/logger.md +0 -2
  97. package/.docs/reference/file-based-agents/memory.md +0 -2
  98. package/.docs/reference/file-based-agents/observability.md +0 -2
  99. package/.docs/reference/file-based-agents/processors.md +0 -2
  100. package/.docs/reference/file-based-agents/schedules.md +0 -2
  101. package/.docs/reference/file-based-agents/scorers.md +0 -2
  102. package/.docs/reference/file-based-agents/server.md +0 -2
  103. package/.docs/reference/file-based-agents/skills.md +0 -2
  104. package/.docs/reference/file-based-agents/storage.md +0 -2
  105. package/.docs/reference/file-based-agents/studio.md +0 -2
  106. package/.docs/reference/file-based-agents/subagents.md +0 -2
  107. package/.docs/reference/file-based-agents/tools.md +0 -2
  108. package/.docs/reference/file-based-agents/workflows.md +0 -2
  109. package/.docs/reference/file-based-agents/workspace.md +0 -2
  110. package/.docs/reference/index.md +4 -0
  111. package/.docs/reference/memory/observational-memory.md +2 -0
  112. package/.docs/reference/observability/tracing/exporters/posthog.md +9 -2
  113. package/.docs/reference/observability/tracing/interfaces.md +69 -2
  114. package/.docs/reference/observability/tracing/trace-query.md +111 -24
  115. package/.docs/reference/schedules/overview.md +0 -2
  116. package/.docs/reference/signals/create-notification-inbox-tool.md +0 -2
  117. package/.docs/reference/signals/signal-provider.md +1 -3
  118. package/.docs/reference/signals/task-signal-provider.md +1 -1
  119. package/.docs/reference/signals/webhook-signal-provider.md +1 -3
  120. package/.docs/reference/streaming/ChunkType.md +2 -0
  121. package/.docs/reference/streaming/agents/stream.md +2 -0
  122. package/.docs/reference/streaming/workflows/resumeStream.md +2 -0
  123. package/.docs/reference/streaming/workflows/stream.md +2 -0
  124. package/.docs/reference/tools/ask-user-tool.md +5 -1
  125. package/.docs/reference/tools/create-code-mode.md +0 -2
  126. package/.docs/reference/tools/create-tool.md +2 -0
  127. package/.docs/reference/tools/mcp-server.md +8 -2
  128. package/.docs/reference/vectors/lance.md +56 -10
  129. package/.docs/reference/workflows/run-methods/restart.md +2 -0
  130. package/.docs/reference/workflows/run-methods/resume.md +2 -0
  131. package/.docs/reference/workflows/run-methods/start.md +2 -0
  132. package/.docs/reference/workflows/run-methods/timeTravel.md +2 -0
  133. package/package.json +6 -6
@@ -557,8 +557,8 @@ interface ModelGenerationAttributes {
557
557
  /**
558
558
  * Definitions of the tools made available to the model for this generation
559
559
  * (name, description, and JSON-schema parameters), captured once per
560
- * generation. Per-step tool names live on MODEL_INFERENCE spans as
561
- * `availableTools`.
560
+ * generation. The definitions sent on each provider call live on
561
+ * MODEL_INFERENCE spans as `tools`.
562
562
  */
563
563
  tools?: ModelToolDefinition[]
564
564
 
@@ -639,6 +639,66 @@ interface ModelStepAttributes {
639
639
  }
640
640
  ```
641
641
 
642
+ ### `ModelInferenceAttributes`
643
+
644
+ Model Inference attributes - for a single call to the model provider within a step. The span covers only the provider call, so it doesn't include processors or tool executions.
645
+
646
+ ```typescript
647
+ interface ModelInferenceAttributes {
648
+ /** Model name (e.g., 'gpt-5.4', 'claude-opus-4-6') */
649
+ model?: string
650
+
651
+ /** Model provider (e.g., 'openai', 'anthropic') */
652
+ provider?: string
653
+
654
+ /** Index of the parent step in the generation (0, 1, 2, ...) */
655
+ stepIndex?: number
656
+
657
+ /** Token usage statistics */
658
+ usage?: UsageStats
659
+
660
+ /** Reason this inference finished (stop, tool-calls, length, etc.) */
661
+ finishReason?: string
662
+
663
+ /** Whether this was a streaming response */
664
+ streaming?: boolean
665
+
666
+ /** When the first token/chunk of the completion was received */
667
+ completionStartTime?: Date
668
+
669
+ /** Result warnings */
670
+ warnings?: Record<string, any>
671
+
672
+ /** Actual model used in the response (may differ from request model) */
673
+ responseModel?: string
674
+
675
+ /** Unique identifier for the response */
676
+ responseId?: string
677
+
678
+ /** Model parameters sent on the request (temperature, maxOutputTokens, topP, etc.) */
679
+ parameters?: Record<string, unknown>
680
+
681
+ /** Provider-specific options forwarded on the request */
682
+ providerOptions?: Record<string, unknown>
683
+
684
+ /** Names of tools made available to the model on this inference call */
685
+ availableTools?: string[]
686
+
687
+ /**
688
+ * Definitions of the tools sent to the provider on this inference call
689
+ * (name, description, and JSON-schema parameters), after per-step changes
690
+ * from processors, `prepareStep`, `activeTools`, and `toolChoice`.
691
+ */
692
+ tools?: ModelToolDefinition[]
693
+
694
+ /** How the model was instructed to choose tools */
695
+ toolChoice?: 'auto' | 'none' | 'required' | { type: 'tool'; toolName: string }
696
+
697
+ /** Requested response format */
698
+ responseFormat?: 'text' | 'json' | 'json_schema' | { type: string; name?: string }
699
+ }
700
+ ```
701
+
642
702
  ### `ModelChunkAttributes`
643
703
 
644
704
  Model Chunk attributes - for individual streaming chunks/events.
@@ -1057,6 +1117,13 @@ interface TracingOptions {
1057
1117
  */
1058
1118
  parentSpanId?: string
1059
1119
 
1120
+ /**
1121
+ * Set to true together with parentSpanId to attach this run as a child of
1122
+ * that span inside the existing trace. Exporters then keep the trace's own
1123
+ * name, input, output, and tags. Ignored without a valid traceId and parentSpanId.
1124
+ */
1125
+ nestUnderParent?: boolean
1126
+
1060
1127
  /**
1061
1128
  * Tags to apply to this trace.
1062
1129
  * Tags are string labels that can be used to categorize and filter traces
@@ -6,13 +6,74 @@
6
6
 
7
7
  Use `queryTraces()` or `POST /api/observability/traces/query` to find completed logical traces that match trace fields and related span, score, or feedback records. Use `queryTraceThreads()` or `POST /api/observability/threads/query` to find thread identities that qualify across multiple eligible traces.
8
8
 
9
- Both endpoints use the same authentication as other observability routes and require the `observability:read` permission. The configured observability store must support the requested trace-query or thread-query operation.
9
+ Use `querySpans()` or `POST /api/observability/spans/query` to list the individual completed spans that match a span predicate.
10
+
11
+ All three endpoints use the same authentication as other observability routes and require the `observability:read` permission. The configured observability store must support the requested trace-query, thread-query, or span-query operation.
10
12
 
11
13
  > **Thread grouping is deprecated:** The `group` option remains supported until the next major release. Use [`queryTraceThreads()`](https://mastra.ai/reference/client-js/observability) to retrieve matching thread identities in new code.
12
14
 
13
- ## Query individual spans through storage
15
+ ## Query individual spans
16
+
17
+ `querySpans()` returns one row per matching completed span across traces, including matching child spans. Use it to list the spans themselves, for example every failed tool call in the last day.
18
+
19
+ `queryTraces()` with a `spans.some` predicate answers a different question. It returns the traces that contain at least one matching span, and it doesn't identify which spans matched. Both use the same span fields and operators.
20
+
21
+ ```typescript
22
+ const timeRange = {
23
+ from: '2026-10-01T00:00:00.000Z',
24
+ to: '2026-10-02T00:00:00.000Z',
25
+ }
26
+ const where = {
27
+ op: 'and',
28
+ args: [
29
+ { op: 'eq', left: { path: 'spanType' }, right: { literal: 'tool_call' } },
30
+ { op: 'eq', left: { path: 'status' }, right: { literal: 'error' } },
31
+ ],
32
+ } as const
33
+
34
+ const firstPage = await mastraClient.querySpans({
35
+ timeRange,
36
+ where,
37
+ orderBy: [{ field: 'startedAt', direction: 'desc' }],
38
+ page: { limit: 50 },
39
+ })
40
+
41
+ if (firstPage.page.next) {
42
+ const secondPage = await mastraClient.querySpans({
43
+ timeRange,
44
+ where,
45
+ orderBy: [{ field: 'startedAt', direction: 'desc' }],
46
+ page: { limit: 50, after: firstPage.page.next },
47
+ })
48
+ }
49
+ ```
14
50
 
15
- The observability domain in DuckDB and the PostgreSQL and ClickHouse v-next stores supports `querySpans(plan)`. It returns individual completed spans across traces, including matching child spans. Check `storage.getFeatures()?.includes('span-query')` before using this optional storage method. Server routes and client SDK support are separate from this storage API.
51
+ The HTTP route accepts the same body:
52
+
53
+ ```bash
54
+ curl --request POST \
55
+ --url http://localhost:4111/api/observability/spans/query \
56
+ --header 'Authorization: Bearer <token>' \
57
+ --header 'Content-Type: application/json' \
58
+ --data '{
59
+ "timeRange": {
60
+ "from": "2026-10-01T00:00:00.000Z",
61
+ "to": "2026-10-02T00:00:00.000Z"
62
+ },
63
+ "where": { "op": "eq", "left": { "path": "spanType" }, "right": { "literal": "tool_call" } },
64
+ "page": { "limit": 50 }
65
+ }'
66
+ ```
67
+
68
+ Span queries are optional for observability stores. Call `mastraClient.getObservabilityCapabilities()` and check `capabilities.spanQuery` before showing a span list. Treat a missing `spanQuery` value as unsupported, because older servers don't report it. A server whose store or `@mastra/core` version doesn't support span queries returns `501` with code `SPAN_QUERY_UNSUPPORTED`.
69
+
70
+ The other statuses match trace queries: `400` for malformed JSON or a malformed cursor, `409` for a cursor that doesn't match the query, `413` for a body over 256 KiB, `422` with code `TRACE_QUERY_INVALID` and structured `issues` for an invalid query, `503` with code `TRACE_QUERY_RESOURCE_LIMIT` when a page exceeds a resource limit, and `504` with code `TRACE_QUERY_EXECUTION_TIMEOUT` when the database deadline is exceeded.
71
+
72
+ The server applies [trusted tenant scope](#trusted-tenant-scope) to span queries the same way it does for trace queries. A cursor created under one scope and reused under another returns `409`.
73
+
74
+ ### Query individual spans through storage
75
+
76
+ The observability domain in DuckDB and the PostgreSQL and ClickHouse v-next stores supports `querySpans(plan)`. Check `storage.getFeatures()?.includes('span-query')` before using this optional storage method.
16
77
 
17
78
  Build the plan in trusted backend code:
18
79
 
@@ -333,25 +394,26 @@ Hono and Fastify enforce the request-body limit before JSON parsing. Express and
333
394
 
334
395
  ## Fields and operators
335
396
 
336
- | Predicate context | Fields | Operators |
337
- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
338
- | Trace | `traceId`, `threadId`, `resourceId`, `runId`, `sessionId`, `userId`, `organizationId`, `entityName`, `entityType`, `environment`, `status` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
339
- | Trace metadata | `metadata.<key>` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
340
- | Trace | `startedAt`, `endedAt`, `durationMs` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
341
- | Trace | `tags` | `includes`, `notIncludes`, `exists`, `notExists` |
342
- | Span | `name`, `spanType`, `model`, `provider`, `status`, `entityType`, `entityId`, `entityName`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId`, `runId`, `sessionId`, `userId`, `organizationId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
343
- | Span | `startedAt`, `endedAt`, `durationMs` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
344
- | Span | `error` | `exists`, `notExists` |
345
- | Score | `scorerId`, `scorerVersion`, `scoreSource`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
346
- | Score | `score`, `timestamp` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
347
- | Score | `spanId` | `exists`, `notExists` |
348
- | Feedback | `feedbackType`, `feedbackSource`, `feedbackUserId`, `sourceId`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
349
- | Feedback | `value`, `timestamp` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
350
- | Feedback | `comment` | `exists`, `notExists` |
351
-
352
- Compose predicates with `{ op: 'and', args: [...] }`, `{ op: 'or', args: [...] }`, and `{ op: 'not', arg: ... }`. Comparison predicates place a field reference on the left and a literal on the right. Membership predicates use a field reference in `value` and a homogeneous literal array in `set`. Tag predicates name the stored tag collection in `path`. `includes` and `notIncludes` also take one tag in `value`, while `exists` and `notExists` take only `op` and `path`. See [Filter by tags](#filter-by-tags).
353
-
354
- String comparisons are case-sensitive, and literals are never coerced. Canonical string fields compare exact stored values. Metadata string values are trimmed before comparison, as described below. Numeric predicates, including `score` and `durationMs`, require numbers, while timestamp predicates require ISO timestamp strings. A missing value satisfies neither positive nor ordered predicates, although it does satisfy the negative operators `ne` and `notIn`. Combine a negative predicate with `exists` when the field must also be present.
397
+ | Predicate context | Fields | Operators |
398
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
399
+ | Trace | `traceId`, `threadId`, `resourceId`, `runId`, `sessionId`, `userId`, `organizationId`, `entityName`, `entityType`, `environment`, `status` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
400
+ | Trace metadata | `metadata.<key>` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
401
+ | Trace | `startedAt`, `endedAt`, `durationMs` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
402
+ | Trace | `tags` | `includes`, `notIncludes`, `exists`, `notExists` |
403
+ | Span | `name` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists`, `matches`, `notMatches` |
404
+ | Span | `spanType`, `model`, `provider`, `status`, `entityType`, `entityId`, `entityName`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId`, `runId`, `sessionId`, `userId`, `organizationId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
405
+ | Span | `startedAt`, `endedAt`, `durationMs` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
406
+ | Span | `error` | `exists`, `notExists` |
407
+ | Score | `scorerId`, `scorerVersion`, `scoreSource`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
408
+ | Score | `score`, `timestamp` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
409
+ | Score | `spanId` | `exists`, `notExists` |
410
+ | Feedback | `feedbackType`, `feedbackSource`, `feedbackUserId`, `sourceId`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
411
+ | Feedback | `value`, `timestamp` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
412
+ | Feedback | `comment` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists`, `matches`, `notMatches` |
413
+
414
+ Compose predicates with `{ op: 'and', args: [...] }`, `{ op: 'or', args: [...] }`, and `{ op: 'not', arg: ... }`. Comparison predicates place a field reference on the left and a literal on the right. Membership predicates use a field reference in `value` and a homogeneous literal array in `set`. Tag predicates name the stored tag collection in `path`. `includes` and `notIncludes` also take one tag in `value`, while `exists` and `notExists` take only `op` and `path`. See [Filter by tags](#filter-by-tags). Text predicates use the comparison shape with a string literal. See [Filter by text](#filter-by-text).
415
+
416
+ String comparisons are case-sensitive, and literals are never coerced. `matches` and `notMatches` are the exception: they compare words case-insensitively. Canonical string fields compare exact stored values. Metadata string values are trimmed before comparison, as described below. Numeric predicates, including `score` and `durationMs`, require numbers, while timestamp predicates require ISO timestamp strings. A missing value satisfies neither positive nor ordered predicates, although it does satisfy the negative operators `ne` and `notIn`. Combine a negative predicate with `exists` when the field must also be present.
355
417
 
356
418
  ### Filter by root duration
357
419
 
@@ -570,6 +632,31 @@ Tags compare exactly and case-sensitively as whole strings. `value` must be one
570
632
 
571
633
  `tags` is available in trace predicates only, including those inside `traces.some` or `traces.none`. `in`, `notIn`, and the comparison operators are rejected for `tags`. Value discovery for `tags` returns each observed tag with the number of qualifying traces that carry it.
572
634
 
635
+ ### Filter by text
636
+
637
+ Human-written text fields support word matching in addition to exact comparison. `matches` succeeds when the literal's words appear in the field, in order, as whole words. `notMatches` succeeds when the field exists but doesn't contain those words. This query finds traces whose current feedback mentions an incorrect dosage:
638
+
639
+ ```typescript
640
+ const incorrectDosage = {
641
+ feedback: {
642
+ some: {
643
+ op: 'matches',
644
+ left: { path: 'comment' },
645
+ right: { literal: 'incorrect dosage' },
646
+ },
647
+ },
648
+ }
649
+ ```
650
+
651
+ Both the literal and the stored value are lowercased and split into words. A word is a run of letters, digits, and combining marks, so any other character, such as punctuation, spaces, or `_`, separates words. `incorrect` matches `This answer is incorrect.` but not `This was incorrectly formatted.`, and `gpt 5` matches `llm: 'gpt-5'`. A literal with several words must appear as a contiguous phrase in that order. Letters keep their accents: `café` doesn't match `cafe`. Text is composed to Unicode NFC first, so `café` matches whether the accent is stored as part of the letter or as a separate mark, and marks stay inside their word, so `नमस` doesn't match `नमस्ते`. The Turkish `İ` folds to `i`, and a Greek final `ς` equals `σ`. PostgreSQL lowercases letters according to the database locale, so a database created with the `C` locale doesn't fold the case of letters outside ASCII. Use a UTF-8 locale such as `en_US.UTF-8` for consistent results.
652
+
653
+ | Operator | Matches when |
654
+ | ------------ | ------------------------------------------------------------------------ |
655
+ | `matches` | The field contains the literal's words as a contiguous whole-word phrase |
656
+ | `notMatches` | The field is present and doesn't contain that phrase |
657
+
658
+ The literal must contain at least one letter or digit; otherwise the request fails with `422 TRACE_QUERY_INVALID`. A missing field satisfies neither operator. Use `{ op: 'not', arg: { op: 'matches', ... } }` when records without the field should also match. Text operators are available on span `name` and feedback `comment`. Other string fields, numbers, timestamps, tags, and metadata reject them. Substring, wildcard, regular-expression, and fuzzy matching aren't supported, and there is no search across several fields.
659
+
573
660
  ### Filter by feedback
574
661
 
575
662
  Every condition inside one `feedback.some` or `feedback.none` clause applies to the same current feedback record. `feedbackType` and `feedbackSource` are exact application-defined strings rather than built-in enums. This query finds traces with a numeric patient rating below zero:
@@ -607,7 +694,7 @@ const missingClinicianReview = {
607
694
  }
608
695
  ```
609
696
 
610
- Feedback `timestamp` predicates are independent of the root `timeRange`. Use `comment` only with `exists` or `notExists`. Comment contents aren't searchable. The deprecated feedback fields `source` and `userId` aren't available. Use `feedbackSource` and `feedbackUserId`.
697
+ Feedback `timestamp` predicates are independent of the root `timeRange`. `comment` supports exact string operators and word matching with `matches` and `notMatches`. See [Filter by text](#filter-by-text). The deprecated feedback fields `source` and `userId` aren't available. Use `feedbackSource` and `feedbackUserId`.
611
698
 
612
699
  ## Responses
613
700
 
@@ -768,7 +855,7 @@ PostgreSQL and ClickHouse stop advanced trace and thread queries after 15 second
768
855
 
769
856
  ## Limitations
770
857
 
771
- Both operations consider completed traces only. They don't support running traces, custom projections, embedded evidence, summaries, aggregations, measures, or custom grouping. Numbered trace pages include a total count.
858
+ Trace and thread queries consider completed traces only, and span queries consider completed spans only. They don't support running traces, custom projections, embedded evidence, summaries, aggregations, measures, or custom grouping. Numbered trace pages include a total count.
772
859
 
773
860
  ## Related
774
861
 
@@ -6,8 +6,6 @@
6
6
 
7
7
  **Added in:** `@mastra/core@1.50.0`
8
8
 
9
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
10
-
11
9
  `mastra.schedules` is the CRUD service for persisted cron schedules. Use it to create, list, update, pause, resume, manually run, and delete schedules for agents or workflows.
12
10
 
13
11
  For usage patterns and concepts, see [Schedules](https://mastra.ai/docs/harness/schedules).
@@ -6,8 +6,6 @@
6
6
 
7
7
  **Added in:** `@mastra/core@1.39.0`
8
8
 
9
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
10
-
11
9
  `createNotificationInboxTool()` creates a Mastra tool that lets an agent inspect and manage notification inbox records for the current thread.
12
10
 
13
11
  Use this tool with durable notification signals. For sending notification records, see [`Agent.sendNotificationSignal()`](https://mastra.ai/reference/agents/agent).
@@ -4,9 +4,7 @@
4
4
 
5
5
  # SignalProvider
6
6
 
7
- **Added in:** `@mastra/core@1.39.0`
8
-
9
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
7
+ **Added in:** `@mastra/core@1.42.0`
10
8
 
11
9
  Abstract base class for building signal providers. A signal provider monitors external sources (APIs, webhooks, event streams) and pushes notification signals into agent threads through a built-in subscription registry.
12
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # TaskSignalProvider
6
6
 
7
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
7
+ **Added in:** `@mastra/core@1.42.0`
8
8
 
9
9
  Bundles the built-in task tools (`task_write`, `task_update`, `task_complete`, `task_check`) and the `TaskStateProcessor` behind a single agent registration. Use it to add a structured, durable task list to an agent without wiring the tools and processor separately.
10
10
 
@@ -4,9 +4,7 @@
4
4
 
5
5
  # WebhookSignalProvider
6
6
 
7
- **Added in:** `@mastra/core@1.39.0`
8
-
9
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
7
+ **Added in:** `@mastra/core@1.42.0`
10
8
 
11
9
  Concrete signal provider for push-based event delivery. Routes incoming webhook payloads to subscribed agent threads by matching the payload against a configurable resource ID extractor.
12
10
 
@@ -14,6 +14,8 @@ All chunks include these base properties:
14
14
 
15
15
  **runId** (`string`): Unique identifier for this execution run
16
16
 
17
+ **traceId** (`string`): Trace ID of the run that produced this chunk, when tracing is enabled. Not set on custom data-\* chunks.
18
+
17
19
  **from** (`ChunkFrom`): Source of the chunk
18
20
 
19
21
  **from.AGENT** (`'AGENT'`): Chunk from agent execution
@@ -222,6 +222,8 @@ const stream = await agent.stream('message for agent')
222
222
 
223
223
  **options.tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
224
224
 
225
+ **options.tracingOptions.nestUnderParent** (`boolean`): Set to true together with parentSpanId to attach this run as a child of that span inside the existing trace, for example an LLM judge under the run it scores. Exporters then keep the trace's own name, input, output, and tags. Leave unset when parentSpanId comes from your own tracing system. Ignored without a valid traceId and parentSpanId.
226
+
225
227
  **options.tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
226
228
 
227
229
  **options.versions** (`VersionOverrides`): Per-invocation version overrides for sub-agent delegation. Merged on top of Mastra instance-level versions and propagated automatically through sub-agent calls via requestContext. Requires the editor package. See Editor versioning.
@@ -50,6 +50,8 @@ if (result!.status === 'suspended') {
50
50
 
51
51
  **tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
52
52
 
53
+ **tracingOptions.nestUnderParent** (`boolean`): Set to true together with parentSpanId to attach this run as a child of that span inside the existing trace, for example an LLM judge under the run it scores. Exporters then keep the trace's own name, input, output, and tags. Leave unset when parentSpanId comes from your own tracing system. Ignored without a valid traceId and parentSpanId.
54
+
53
55
  **tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
54
56
 
55
57
  ## Returns
@@ -44,6 +44,8 @@ for await (const chunk of stream) {
44
44
 
45
45
  **tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
46
46
 
47
+ **tracingOptions.nestUnderParent** (`boolean`): Set to true together with parentSpanId to attach this run as a child of that span inside the existing trace, for example an LLM judge under the run it scores. Exporters then keep the trace's own name, input, output, and tags. Leave unset when parentSpanId comes from your own tracing system. Ignored without a valid traceId and parentSpanId.
48
+
47
49
  **tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
48
50
 
49
51
  **closeOnSuspend** (`boolean`): Whether to close the stream when the workflow is suspended, or to keep the stream open until the workflow is finished (by success or error). Default value is true.
@@ -77,4 +77,8 @@ The `tool-call-suspended` event carries a `suspendPayload` with the same shape a
77
77
  Pass the user's answer to `agent.resumeStream()`:
78
78
 
79
79
  - **Free-text and single-select:** A `string`.
80
- - **Multi-select:** A `string[]` of selected option labels.
80
+ - **Multi-select:** A `string[]` of selected option labels and any custom answer.
81
+
82
+ Factory and Studio offer **Other…** alongside the suggested options. Select it to turn that option into a text field and enter a custom answer, then select **Submit answer** or press Enter. Single-select prompts resume with the trimmed text as a string. Multi-select prompts resume with the selected labels followed by the trimmed custom text. You can submit custom text without selecting a suggested option.
83
+
84
+ If **Other…** is selected, the text field must contain a non-empty answer. Leaving an empty or whitespace-only field unselects **Other…**. Unselecting **Other…** excludes the custom text from the response. The **Other…** label itself is never included in the resume data.
@@ -6,8 +6,6 @@
6
6
 
7
7
  **Added in:** `@mastra/core@1.38.0`
8
8
 
9
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
10
-
11
9
  The `createCodeMode()` function returns a tool and generated instructions that let an agent run multi-tool computations as one TypeScript function. The generated code runs in a workspace sandbox, and each `external_*` call runs the real tool on the host with validation, request context, and tracing.
12
10
 
13
11
  For a conceptual overview, see [Code mode](https://mastra.ai/docs/agents/code-mode).
@@ -49,6 +49,8 @@ The first `execute` parameter is the validated value from `inputSchema`. Destruc
49
49
 
50
50
  **strict** (`boolean`): When true, Mastra enables strict tool input generation on model adapters that support it. This helps supported providers return arguments that match the tool schema more closely.
51
51
 
52
+ **outputValidation** (`'strict' | 'warn'`): How a result that fails outputSchema validation is handled. Both modes log a warning. 'strict' replaces the result with a validation error object. 'warn' returns the tool's actual result unchanged, for tools whose side effects have already happened. (Default: `'strict'`)
53
+
52
54
  **toModelOutput** (`(output: TSchemaOut) => unknown`): Optional function that transforms the tool's execute output before it is sent back to the model. Use this to return text, json, or content-shaped outputs (including multimodal parts like images/files) to the model while still keeping the full raw output in your application code.
53
55
 
54
56
  **transform** (`ToolPayloadTransform`): Optional target-aware transform for tool payloads before they leave runtime for display streams or user-visible transcript messages. Configure display and transcript transforms for phases such as input, inputDelta, output, error, approval, suspend, and resume.
@@ -75,7 +75,13 @@ The constructor accepts an `MCPServerConfig` object with the following propertie
75
75
 
76
76
  **workflows** (`Record<string, Workflow>`): An object where keys are workflow identifiers and values are Mastra Workflow instances. Each workflow is converted into a tool named run\_\<workflowKey>. The workflow's inputSchema becomes the tool's input schema. The workflow \*\*must\*\* have a non-empty description string property, which is used for the tool's description. If a workflow's description is missing or empty, an error will be thrown. The tool executes the workflow by calling workflow\.createRun() followed by run.start({ inputData: \<tool\_input> }). If a tool name derived from an agent or workflow (e.g., ask\_myAgent or run\_myWorkflow) collides with an explicitly defined tool name or another derived name, the explicitly defined tool takes precedence, and a warning is logged. Agents/workflows leading to subsequent collisions are skipped.
77
77
 
78
- **description** (`string`): Optional description of what the MCP server does.
78
+ **description** (`string`): Optional description of what the MCP server does. Announced to MCP clients as part of the server's identity and returned in the registry server info.
79
+
80
+ **title** (`string`): Optional human-readable display title announced to MCP clients (e.g., 'Weather Server'). Clients fall back to name when it isn't set.
81
+
82
+ **websiteUrl** (`string`): Optional URL of the server's website, announced to MCP clients.
83
+
84
+ **icons** (`{ src: string; mimeType?: string; sizes?: string[]; theme?: 'light' | 'dark' }[]`): Optional icons clients can display for the server. src is an https: URL or a data: URI; sizes takes values like '48x48' or 'any'.
79
85
 
80
86
  **instructions** (`string`): Optional instructions describing how to use the server and its features.
81
87
 
@@ -1389,7 +1395,7 @@ const server = new MCPServer({
1389
1395
  })
1390
1396
  ```
1391
1397
 
1392
- Link a tool to its app resource by setting `mcp._meta.ui.resourceUri` in `createTool()` to the matching `ui://` URI. The server normalizes this metadata for older hosts when listing tools. Visit [MCP Apps](https://mastra.ai/docs/connections/mcp) for the full app bridge API and usage patterns.
1398
+ Link a tool to its app resource by setting `mcp._meta.ui.resourceUri` in `createTool()` to the matching `ui://` URI. The server normalizes this metadata for older hosts when listing tools, and returns the same link on successful tool call results. Visit [MCP Apps](https://mastra.ai/docs/connections/mcp) for the full app bridge API and usage patterns.
1393
1399
 
1394
1400
  ## Related information
1395
1401
 
@@ -49,15 +49,17 @@ const s3Store = await LanceVectorStore.create('s3://bucket/db', {
49
49
 
50
50
  #### `LanceIndexConfig`
51
51
 
52
- **type** (`'ivfflat' | 'hnsw'`): Index type (Default: `hnsw`)
52
+ **type** (`'ivfflat' | 'ivfpq' | 'hnsw'`): Index type (Default: `hnsw`)
53
53
 
54
- **type.ivfflat** (`ivfflat`): Clusters vectors into lists for approximate search.
54
+ **type.ivfflat** (`ivfflat`): Clusters vectors into partitions and stores full vectors. Searches compute exact distances only within the probed partitions, so closer vectors in other partitions can be missed.
55
+
56
+ **type.ivfpq** (`ivfpq`): IVF index with product quantization. Uses less memory than ivfflat with lower recall.
55
57
 
56
58
  **type.hnsw** (`hnsw`): Graph-based index offering fast search times and high recall.
57
59
 
58
60
  **numPartitions** (`number`): Number of partitions for IVF indexes (Default: `128`)
59
61
 
60
- **numSubVectors** (`number`): Number of sub-vectors for product quantization (Default: `16`)
62
+ **numSubVectors** (`number`): Number of sub-vectors for product quantization. Only applies to ivfpq (Default: `16`)
61
63
 
62
64
  **hnsw** (`HNSWConfig`): HNSW configuration
63
65
 
@@ -137,16 +139,60 @@ interface IndexStats {
137
139
  dimension: number
138
140
  count: number
139
141
  metric: 'cosine' | 'euclidean' | 'dotproduct'
140
- type: 'ivfflat' | 'hnsw'
141
- config: {
142
- m?: number
143
- efConstruction?: number
144
- numPartitions?: number
145
- numSubVectors?: number
146
- }
147
142
  }
148
143
  ```
149
144
 
145
+ ### `getIndexCoverage()`
146
+
147
+ **tableName** (`string`): Table to inspect. Defaults to indexName when omitted.
148
+
149
+ **indexName** (`string`): Used as the table name when tableName is omitted, matching upsert() and query().
150
+
151
+ Returns one entry per index on the table:
152
+
153
+ ```typescript
154
+ interface LanceIndexCoverage {
155
+ indexName: string
156
+ indexType: string
157
+ columns: string[]
158
+ numIndexedRows: number
159
+ numUnindexedRows: number
160
+ }
161
+ ```
162
+
163
+ ### `optimize()`
164
+
165
+ Runs LanceDB table maintenance. It compacts data files, adds rows written since the index was built to the existing index, and removes old table versions. Mastra never calls it automatically. Concurrent calls for the same table in one process share a single run.
166
+
167
+ **tableName** (`string`): Table to optimize. Defaults to indexName when omitted.
168
+
169
+ **indexName** (`string`): Used as the table name when tableName is omitted.
170
+
171
+ **cleanupOlderThan** (`Date`): Remove table versions older than this date. When omitted, LanceDB keeps versions from the last 7 days.
172
+
173
+ **deleteUnverified** (`boolean`): Also delete unverified files newer than 7 days. Only set this when no other process writes to the table, or the table can be corrupted. (Default: `false`)
174
+
175
+ Returns LanceDB `OptimizeStats` (compaction and pruning counts).
176
+
177
+ #### When to optimize
178
+
179
+ `upsert()` writes rows outside the existing vector index. `query()` still returns those rows by scanning them without the index, so results stay complete, but queries get slower as unindexed rows grow. LanceDB's `fastSearch()` skips unindexed rows entirely.
180
+
181
+ `optimize()` adds new rows to the existing index without retraining it. If your data distribution has changed a lot, rebuild the index with `deleteIndex()` and `createIndex()` instead.
182
+
183
+ LanceDB suggests optimizing after roughly 100,000 modified rows or 20 write operations. Use `getIndexCoverage()` to build your own policy:
184
+
185
+ ```typescript
186
+ const [coverage] = await store.getIndexCoverage({ indexName: 'docs' })
187
+ const total = coverage.numIndexedRows + coverage.numUnindexedRows
188
+
189
+ if (coverage.numUnindexedRows >= 1_000 && coverage.numUnindexedRows / total >= 0.1) {
190
+ await store.optimize({ indexName: 'docs' })
191
+ }
192
+ ```
193
+
194
+ Managed LanceDB Cloud and Enterprise maintain tables automatically, so you don't need to call `optimize()` there.
195
+
150
196
  ### `deleteIndex()`
151
197
 
152
198
  **indexName** (`string`): Name of the index to delete
@@ -36,6 +36,8 @@ const restartedResult = await run.restart()
36
36
 
37
37
  **tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
38
38
 
39
+ **tracingOptions.nestUnderParent** (`boolean`): Set to true together with parentSpanId to attach this run as a child of that span inside the existing trace, for example an LLM judge under the run it scores. Exporters then keep the trace's own name, input, output, and tags. Leave unset when parentSpanId comes from your own tracing system. Ignored without a valid traceId and parentSpanId.
40
+
39
41
  **tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
40
42
 
41
43
  ## Returns
@@ -48,6 +48,8 @@ if (result.status === 'suspended') {
48
48
 
49
49
  **tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
50
50
 
51
+ **tracingOptions.nestUnderParent** (`boolean`): Set to true together with parentSpanId to attach this run as a child of that span inside the existing trace, for example an LLM judge under the run it scores. Exporters then keep the trace's own name, input, output, and tags. Leave unset when parentSpanId comes from your own tracing system. Ignored without a valid traceId and parentSpanId.
52
+
51
53
  **tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
52
54
 
53
55
  **outputOptions** (`OutputOptions`): Options for output configuration.
@@ -42,6 +42,8 @@ const result = await run.start({
42
42
 
43
43
  **tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
44
44
 
45
+ **tracingOptions.nestUnderParent** (`boolean`): Set to true together with parentSpanId to attach this run as a child of that span inside the existing trace, for example an LLM judge under the run it scores. Exporters then keep the trace's own name, input, output, and tags. Leave unset when parentSpanId comes from your own tracing system. Ignored without a valid traceId and parentSpanId.
46
+
45
47
  **tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
46
48
 
47
49
  **outputOptions** (`OutputOptions`): Options for output configuration.
@@ -51,6 +51,8 @@ const result = await run.timeTravel({
51
51
 
52
52
  **tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
53
53
 
54
+ **tracingOptions.nestUnderParent** (`boolean`): Set to true together with parentSpanId to attach this run as a child of that span inside the existing trace, for example an LLM judge under the run it scores. Exporters then keep the trace's own name, input, output, and tags. Leave unset when parentSpanId comes from your own tracing system. Ignored without a valid traceId and parentSpanId.
55
+
54
56
  **tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
55
57
 
56
58
  **outputOptions** (`OutputOptions`): Options for output configuration.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.3.5-alpha.9",
3
+ "version": "1.3.6-alpha.1",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,8 +26,8 @@
26
26
  "@mastra/mcp-legacy": "npm:@mastra/mcp@^1.18.0",
27
27
  "local-pkg": "^1.1.2",
28
28
  "zod": "^4.6.4",
29
- "@mastra/mcp": "^2.2.0-alpha.0",
30
- "@mastra/core": "1.75.0-alpha.3"
29
+ "@mastra/mcp": "^2.2.0",
30
+ "@mastra/core": "1.76.0-alpha.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hono/node-server": "^2.0.0",
@@ -43,9 +43,9 @@
43
43
  "tsx": "^4.23.1",
44
44
  "typescript": "^7.0.2",
45
45
  "vitest": "4.1.11",
46
- "@mastra/core": "1.75.0-alpha.3",
47
- "@internal/lint": "0.0.140",
48
- "@internal/types-builder": "0.0.115"
46
+ "@internal/types-builder": "0.0.116",
47
+ "@internal/lint": "0.0.141",
48
+ "@mastra/core": "1.76.0-alpha.0"
49
49
  },
50
50
  "homepage": "https://mastra.ai",
51
51
  "repository": {