@mastra/mcp-docs-server 1.1.17-alpha.1 → 1.1.17-alpha.13

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 (48) hide show
  1. package/.docs/docs/evals/built-in-scorers.md +1 -0
  2. package/.docs/docs/memory/observational-memory.md +56 -9
  3. package/.docs/docs/observability/tracing/bridges/otel.md +3 -3
  4. package/.docs/docs/observability/tracing/exporters/sentry.md +1 -1
  5. package/.docs/docs/server/auth/okta.md +225 -0
  6. package/.docs/docs/server/auth.md +1 -0
  7. package/.docs/docs/server/mastra-client.md +17 -0
  8. package/.docs/docs/workspace/lsp.md +116 -0
  9. package/.docs/docs/workspace/overview.md +15 -1
  10. package/.docs/guides/agent-frameworks/ai-sdk.md +3 -3
  11. package/.docs/models/gateways/openrouter.md +2 -1
  12. package/.docs/models/index.md +1 -1
  13. package/.docs/models/providers/groq.md +24 -16
  14. package/.docs/models/providers/llmgateway.md +269 -0
  15. package/.docs/models/providers/poe.md +3 -1
  16. package/.docs/models/providers/zai-coding-plan.md +3 -2
  17. package/.docs/models/providers/zai.md +14 -13
  18. package/.docs/models/providers/zhipuai-coding-plan.md +5 -2
  19. package/.docs/models/providers/zhipuai.md +13 -12
  20. package/.docs/models/providers.md +1 -0
  21. package/.docs/reference/ai-sdk/handle-chat-stream.md +2 -0
  22. package/.docs/reference/ai-sdk/with-mastra.md +2 -2
  23. package/.docs/reference/auth/okta.md +162 -0
  24. package/.docs/reference/client-js/agents.md +13 -8
  25. package/.docs/reference/client-js/mastra-client.md +1 -1
  26. package/.docs/reference/client-js/memory.md +1 -1
  27. package/.docs/reference/deployer/cloudflare.md +31 -1
  28. package/.docs/reference/evals/noise-sensitivity.md +3 -3
  29. package/.docs/reference/evals/run-evals.md +78 -3
  30. package/.docs/reference/evals/scorer-utils.md +188 -0
  31. package/.docs/reference/evals/trajectory-accuracy.md +627 -0
  32. package/.docs/reference/harness/harness-class.md +2 -0
  33. package/.docs/reference/index.md +3 -2
  34. package/.docs/reference/logging/pino-logger.md +58 -0
  35. package/.docs/reference/memory/observational-memory.md +34 -8
  36. package/.docs/reference/observability/tracing/interfaces.md +1 -1
  37. package/.docs/reference/processors/message-history-processor.md +1 -1
  38. package/.docs/reference/processors/processor-interface.md +3 -3
  39. package/.docs/reference/processors/semantic-recall-processor.md +1 -1
  40. package/.docs/reference/processors/skill-search-processor.md +93 -0
  41. package/.docs/reference/processors/tool-call-filter.md +2 -2
  42. package/.docs/reference/processors/working-memory-processor.md +1 -1
  43. package/.docs/reference/streaming/agents/stream.md +1 -1
  44. package/.docs/reference/tools/mcp-client.md +1 -1
  45. package/CHANGELOG.md +42 -0
  46. package/package.json +4 -4
  47. package/.docs/reference/core/getStoredAgentById.md +0 -87
  48. package/.docs/reference/core/listStoredAgents.md +0 -91
@@ -30,6 +30,64 @@ export const mastra = new Mastra({
30
30
 
31
31
  **formatters** (`pino.LoggerOptions['formatters']`): Custom Pino formatters for log serialization.
32
32
 
33
+ **redact** (`pino.LoggerOptions['redact']`): Paths or options for redacting sensitive fields from log output (Pino \`redact\`).
34
+
35
+ **prettyPrint** (`boolean`): When false, disables \`pino-pretty\` and writes raw JSON lines (useful for log aggregators). (Default: `true`)
36
+
37
+ **mixin** (`pino.MixinFn`): Pino mixin function merged into every log object (for example request-scoped \`traceId\` or other shared metadata).
38
+
39
+ **customLevels** (`Record<string, number>`): Custom log levels and numeric values, forwarded to Pino. Standard severity is still logged via \`debug\`, \`info\`, \`warn\`, and \`error\`; extra levels follow Pino’s custom-level behavior.
40
+
41
+ ## Log enrichment with `mixin`
42
+
43
+ Use `mixin` when you want the same structured fields on every line (for correlation with the rest of your services):
44
+
45
+ ```typescript
46
+ import { Mastra } from '@mastra/core'
47
+ import { PinoLogger } from '@mastra/loggers'
48
+
49
+ function getTraceContext() {
50
+ return { traceId: 'abc-123' }
51
+ }
52
+
53
+ export const mastra = new Mastra({
54
+ logger: new PinoLogger({
55
+ name: 'Mastra',
56
+ level: 'info',
57
+ mixin() {
58
+ return getTraceContext()
59
+ },
60
+ }),
61
+ })
62
+ ```
63
+
64
+ ## Custom levels
65
+
66
+ `customLevels` is passed through to Pino. `PinoLogger` only exposes `debug`, `info`, `warn`, and `error`; for any extra level name (for example `audit`), subclass and forward to the underlying Pino instance:
67
+
68
+ ```typescript
69
+ import { Mastra } from '@mastra/core'
70
+ import { PinoLogger } from '@mastra/loggers'
71
+
72
+ type AuditLevel = 'audit'
73
+
74
+ class MastraPinoWithAudit extends PinoLogger<AuditLevel> {
75
+ audit(message: string, meta: Record<string, unknown> = {}) {
76
+ this.logger.audit(meta, message)
77
+ }
78
+ }
79
+
80
+ const logger = new MastraPinoWithAudit({
81
+ name: 'Mastra',
82
+ level: 'info',
83
+ customLevels: { audit: 35 },
84
+ })
85
+
86
+ export const mastra = new Mastra({ logger })
87
+ ```
88
+
89
+ Numeric values follow Pino’s ordering (built-in levels use 10–60). A level of `35` sits between `info` (30) and `warn` (40), so with `level: 'info'` both `info` and `audit` lines are emitted.
90
+
33
91
  ## File transport (structured logs)
34
92
 
35
93
  Writes structured logs to a file using the `FileTransport`. The logger accepts a plain message as the first argument and structured metadata as the second argument. These are internally converted to a `BaseLogMessage` and persisted to the configured file path.
@@ -38,7 +38,7 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
38
38
 
39
39
  **shareTokenBudget** (`boolean`): Share the token budget between messages and observations. When enabled, the total budget is \`observation.messageTokens + reflection.observationTokens\`. Messages can use more space when observations are small, and vice versa. This maximizes context usage through flexible allocation. \`shareTokenBudget\` is not yet compatible with async buffering. You must set \`observation: { bufferTokens: false }\` when using this option (this is a temporary limitation). (Default: `false`)
40
40
 
41
- **retrieval** (`boolean`): \*\*Experimental.\*\* Enable retrieval-mode observation groups as durable pointers to raw message history. Retrieval mode is only active when \`scope\` is \`'thread'\`. If you set \`retrieval: true\` with \`scope: 'resource'\`, OM keeps resource-scoped memory behavior but skips retrieval-mode context and does not register the \`recall\` tool. (Default: `false`)
41
+ **retrieval** (`boolean | { vector?: boolean; scope?: 'thread' | 'resource' }`): \*\*Experimental.\*\* Enable retrieval-mode observation groups as durable pointers to raw message history. \`true\` enables cross-thread browsing by default. \`{ vector: true }\` also enables semantic search using Memory's vector store and embedder. \`{ scope: 'thread' }\` restricts the recall tool to the current thread only. Default scope is \`'resource'\`. (Default: `false`)
42
42
 
43
43
  **observation** (`ObservationalMemoryObservationConfig`): Configuration for the observation step. Controls when the Observer agent runs and how it behaves.
44
44
 
@@ -578,21 +578,31 @@ The standalone `ObservationalMemory` class accepts all the same options as the `
578
578
 
579
579
  ## Recall tool
580
580
 
581
- When `retrieval: true` is set with `scope: 'thread'`, OM registers a `recall` tool that the agent can call to page through the raw messages behind an observation group's `_range`. The tool is automatically added to the agent's tool list — no manual registration is needed.
581
+ When `retrieval` is set (any truthy value), a `recall` tool is registered so the agent can page through raw messages behind observation group ranges. By default (scope `'resource'`), the tool supports listing threads (`mode: "threads"`), browsing other threads (`threadId`), and cross-thread search. With `retrieval: { vector: true }`, semantic search is available (`mode: "search"`). Set `scope: 'thread'` to restrict the tool to the current thread only. The tool is automatically added to the agent's tool list — no manual registration is needed.
582
582
 
583
583
  ### Parameters
584
584
 
585
- **cursor** (`string`): A message ID to anchor the recall query. Extract the start or end ID from an observation group range (e.g. from \`\_range: \\\`startId:endId\\\`\_\`, use either \`startId\` or \`endId\`). If a range string is passed directly, the tool returns a hint explaining how to extract the correct ID.
585
+ **mode** (`'messages' | 'threads' | 'search'`): What to retrieve. \`"messages"\` (default) pages through message history. \`"threads"\` lists all threads for the current user. \`"search"\` finds messages by semantic similarity across all threads (requires vector store and embedder). (Default: `'messages'`)
586
586
 
587
- **page** (`number`): Pagination offset from the cursor. Positive values page forward (messages after the cursor), negative values page backward (messages before the cursor). \`0\` is treated as \`1\`. (Default: `1`)
587
+ **query** (`string`): Search query for \`mode: "search"\`. Finds messages semantically similar to this text across all threads for the current user.
588
588
 
589
- **limit** (`number`): Maximum number of messages per page. (Default: `20`)
589
+ **cursor** (`string`): A message ID to anchor the recall query. Required for \`mode: "messages"\` when browsing the current thread. Extract the start or end ID from an observation group range (e.g. from \`\_range: \\\`startId:endId\\\`\_\`, use either \`startId\` or \`endId\`). If a range string is passed directly, the tool returns a hint explaining how to extract the correct ID. Can be omitted when \`threadId\` is provided to start reading from the beginning of that thread.
590
+
591
+ **threadId** (`string`): Browse a different thread by its ID. Use \`mode: "threads"\` first to discover thread IDs. When provided without a \`cursor\`, reading starts from the beginning of the thread.
592
+
593
+ **page** (`number`): Pagination offset. For messages: positive values page forward from cursor, negative values page backward. For threads: page number (0-indexed). \`0\` is treated as \`1\` for messages. (Default: `1`)
594
+
595
+ **limit** (`number`): Maximum number of items to return per page. (Default: `20`)
590
596
 
591
597
  **detail** (`'low' | 'high'`): Controls how much content is shown per message part. \`'low'\` shows truncated text and tool names with positional indices (\`\[p0]\`, \`\[p1]\`). \`'high'\` shows full content including tool arguments and results, clamped to one part per call with continuation hints. (Default: `'low'`)
592
598
 
593
599
  **partIndex** (`number`): Fetch a single message part at full detail by its positional index. Use this when a low-detail recall shows an interesting part at \`\[p1]\` — call again with \`partIndex: 1\` to see the full content without loading every part.
594
600
 
595
- ### Returns
601
+ **before** (`string`): For \`mode: "threads"\` only. Filter to threads created before this date. Accepts ISO 8601 format (e.g. \`"2026-03-15"\`, \`"2026-03-10T00:00:00Z"\`).
602
+
603
+ **after** (`string`): For \`mode: "threads"\` only. Filter to threads created after this date. Accepts ISO 8601 format (e.g. \`"2026-03-01"\`, \`"2026-03-10T00:00:00Z"\`).
604
+
605
+ ### Returns (messages mode)
596
606
 
597
607
  **messages** (`string`): Formatted message content. Format depends on the \`detail\` level.
598
608
 
@@ -612,6 +622,22 @@ When `retrieval: true` is set with `scope: 'thread'`, OM registers a `recall` to
612
622
 
613
623
  **tokenOffset** (`number`): Approximate number of tokens that were trimmed when \`truncated\` is true.
614
624
 
625
+ ### Returns (threads mode)
626
+
627
+ **threads** (`string`): Formatted thread listing. Each thread shows its title, ID, and dates. The current thread is marked with \`← current\`.
628
+
629
+ **count** (`number`): Number of threads returned.
630
+
631
+ **page** (`number`): The page number returned.
632
+
633
+ **hasMore** (`boolean`): Whether more threads exist on the next page.
634
+
635
+ ### Returns (search mode)
636
+
637
+ **results** (`string`): Formatted search results grouped by thread. Each result shows the thread title, thread ID, relevance score, message preview, and a cursor ID for browsing into that thread.
638
+
639
+ **count** (`number`): Number of matching messages found.
640
+
615
641
  ### ModelByInputTokens
616
642
 
617
643
  `ModelByInputTokens` selects a model based on the input token count. It chooses the model for the smallest threshold that covers the actual input size.
@@ -632,8 +658,8 @@ import { ModelByInputTokens } from '@mastra/memory'
632
658
  const selector = new ModelByInputTokens({
633
659
  upTo: {
634
660
  10_000: 'google/gemini-2.5-flash', // Fast for small inputs
635
- 40_000: 'openai/gpt-4o', // Stronger for medium inputs
636
- 1_000_000: 'openai/gpt-4.5', // Most capable for large inputs
661
+ 40_000: 'openai/gpt-5.4-mini', // Stronger for medium inputs
662
+ 1_000_000: 'openai/gpt-5.4', // Most capable for large inputs
637
663
  },
638
664
  })
639
665
  ```
@@ -268,7 +268,7 @@ Model Generation attributes.
268
268
 
269
269
  ```typescript
270
270
  interface ModelGenerationAttributes {
271
- /** Model name (e.g., 'gpt-4', 'claude-3') */
271
+ /** Model name (e.g., 'gpt-5.4', 'claude-opus-4-6') */
272
272
  model?: string
273
273
 
274
274
  /** Model provider (e.g., 'openai', 'anthropic') */
@@ -45,7 +45,7 @@ const storage = new PostgresStorage({
45
45
  export const agent = new Agent({
46
46
  name: 'memory-agent',
47
47
  instructions: 'You are a helpful assistant with conversation memory',
48
- model: 'openai:gpt-4o',
48
+ model: 'openai/gpt-5.4',
49
49
  inputProcessors: [
50
50
  new MessageHistory({
51
51
  storage,
@@ -202,9 +202,9 @@ The method can return any combination of these properties:
202
202
  When multiple processors implement `processInputStep`, they run in order and changes chain through:
203
203
 
204
204
  ```text
205
- Processor 1: receives { model: 'gpt-4o' } → returns { model: 'gpt-4o-mini' }
206
- Processor 2: receives { model: 'gpt-4o-mini' } → returns { toolChoice: 'none' }
207
- Final: model = 'gpt-4o-mini', toolChoice = 'none'
205
+ Processor 1: receives { model: 'gpt-5.4' } → returns { model: 'gpt-5.4-mini' }
206
+ Processor 2: receives { model: 'gpt-5.4-mini' } → returns { toolChoice: 'none' }
207
+ Final: model = 'gpt-5.4-mini', toolChoice = 'none'
208
208
  ```
209
209
 
210
210
  #### System message isolation
@@ -82,7 +82,7 @@ const semanticRecall = new SemanticRecall({
82
82
  export const agent = new Agent({
83
83
  name: 'semantic-memory-agent',
84
84
  instructions: 'You are a helpful assistant with semantic memory recall',
85
- model: 'openai:gpt-4o',
85
+ model: 'openai/gpt-5.4',
86
86
  inputProcessors: [semanticRecall, new MessageHistory({ storage, lastMessages: 50 })],
87
87
  outputProcessors: [semanticRecall, new MessageHistory({ storage })],
88
88
  })
@@ -0,0 +1,93 @@
1
+ # SkillSearchProcessor
2
+
3
+ The `SkillSearchProcessor` is an **input processor** that enables on-demand skill discovery and loading. Instead of injecting all skill metadata into the system prompt upfront (like `SkillsProcessor`), it gives the agent two meta-tools (`search_skills` and `load_skill`) that let it find and load skills on demand. This reduces context token usage when workspaces have many skills.
4
+
5
+ ## Usage example
6
+
7
+ ```typescript
8
+ import { SkillSearchProcessor } from '@mastra/core/processors'
9
+
10
+ const skillSearch = new SkillSearchProcessor({
11
+ workspace,
12
+ search: {
13
+ topK: 5,
14
+ minScore: 0.1,
15
+ },
16
+ })
17
+ ```
18
+
19
+ ## Constructor parameters
20
+
21
+ **options** (`SkillSearchProcessorOptions`): Configuration options for the skill search processor
22
+
23
+ **options.workspace** (`Workspace`): Workspace instance containing skills. Skills are accessed via workspace.skills.
24
+
25
+ **options.search** (`{ topK?: number; minScore?: number }`): Configuration for the search behavior.
26
+
27
+ **options.search.topK** (`number`): Maximum number of skills to return in search results.
28
+
29
+ **options.search.minScore** (`number`): Minimum relevance score for including a skill in search results.
30
+
31
+ **options.ttl** (`number`): Time-to-live for thread state in milliseconds. After this duration of inactivity, thread state will be cleaned up. Set to 0 to disable cleanup.
32
+
33
+ ## Returns
34
+
35
+ **id** (`string`): Processor identifier set to 'skill-search'
36
+
37
+ **name** (`string`): Processor display name set to 'Skill Search Processor'
38
+
39
+ **processInputStep** (`(args: ProcessInputStepArgs) => Promise<ProcessInputStepResult>`): Processes each step to inject search/load meta-tools and any previously loaded skill instructions as system messages.
40
+
41
+ ## Extended usage example
42
+
43
+ ```typescript
44
+ import { Agent } from '@mastra/core/agent'
45
+ import { SkillSearchProcessor } from '@mastra/core/processors'
46
+ import { Workspace, LocalFilesystem } from '@mastra/core/workspace'
47
+
48
+ const workspace = new Workspace({
49
+ filesystem: new LocalFilesystem({ basePath: './project' }),
50
+ skills: ['/skills'],
51
+ bm25: true,
52
+ })
53
+
54
+ const skillSearch = new SkillSearchProcessor({
55
+ workspace,
56
+ search: {
57
+ topK: 5,
58
+ minScore: 0.1,
59
+ },
60
+ })
61
+
62
+ const agent = new Agent({
63
+ name: 'skill-agent',
64
+ instructions:
65
+ 'You are a helpful assistant. Use search_skills to find relevant skills, then load_skill to load their instructions.',
66
+ model: 'openai/gpt-4o',
67
+ workspace,
68
+ inputProcessors: [skillSearch],
69
+ })
70
+ ```
71
+
72
+ The agent workflow is:
73
+
74
+ 1. Agent receives a user message
75
+ 2. Agent calls `search_skills` with keywords (e.g., "api design")
76
+ 3. Agent reviews results and calls `load_skill` with the skill name
77
+ 4. The skill's instructions appear as system messages on the next turn
78
+ 5. Agent follows the loaded skill's instructions
79
+
80
+ ## Compared to SkillsProcessor
81
+
82
+ | | SkillsProcessor | SkillSearchProcessor |
83
+ | -------------- | -------------------------- | ---------------------------------- |
84
+ | Scaling | Injects all skills upfront | On-demand discovery |
85
+ | Context usage | Grows with skill count | Constant (only loaded skills) |
86
+ | Agent workflow | Skills always visible | Agent searches and loads as needed |
87
+ | Best for | Few skills (< 10) | Many skills (10+) |
88
+
89
+ ## Related
90
+
91
+ - [ToolSearchProcessor](https://mastra.ai/reference/processors/tool-search-processor)
92
+ - [Processors](https://mastra.ai/docs/agents/processors)
93
+ - [Workspace Skills](https://mastra.ai/docs/workspace/overview)
@@ -39,7 +39,7 @@ import { ToolCallFilter } from '@mastra/core/processors'
39
39
  export const agent = new Agent({
40
40
  name: 'filtered-agent',
41
41
  instructions: 'You are a helpful assistant',
42
- model: 'openai:gpt-4o',
42
+ model: 'openai/gpt-5.4',
43
43
  tools: {
44
44
  searchDatabase,
45
45
  sendEmail,
@@ -64,7 +64,7 @@ import { ToolCallFilter } from '@mastra/core/processors'
64
64
  export const agent = new Agent({
65
65
  name: 'no-tools-context-agent',
66
66
  instructions: 'You are a helpful assistant',
67
- model: 'openai:gpt-4o',
67
+ model: 'openai/gpt-5.4',
68
68
  tools: {
69
69
  searchDatabase,
70
70
  sendEmail,
@@ -67,7 +67,7 @@ const storage = new PostgresStorage({
67
67
  export const agent = new Agent({
68
68
  name: 'personalized-agent',
69
69
  instructions: 'You are a helpful assistant that remembers user preferences',
70
- model: 'openai:gpt-4o',
70
+ model: 'openai/gpt-5.4',
71
71
  inputProcessors: [
72
72
  new WorkingMemory({
73
73
  storage,
@@ -327,7 +327,7 @@ await agent.stream('message for agent', {
327
327
 
328
328
  ## OpenAI WebSocket transport
329
329
 
330
- Opt into OpenAI Responses WebSocket streaming via `providerOptions.openai.transport`. This only applies to streaming calls and is currently supported for direct OpenAI models (for example, `openai/gpt-4o`). If WebSocket streaming is unavailable, Mastra falls back to HTTP streaming. By default, Mastra closes the WebSocket when the stream finishes.
330
+ Opt into OpenAI Responses WebSocket streaming via `providerOptions.openai.transport`. This only applies to streaming calls and is currently supported for direct OpenAI models (for example, `openai/gpt-5.4`). If WebSocket streaming is unavailable, Mastra falls back to HTTP streaming. By default, Mastra closes the WebSocket when the stream finishes.
331
331
 
332
332
  ```ts
333
333
  const stream = await agent.stream('Hello', {
@@ -901,7 +901,7 @@ const mcpClient = new MCPClient({
901
901
  const agent = new Agent({
902
902
  name: 'My Agent',
903
903
  instructions: 'You are a helpful assistant.',
904
- model: openai('gpt-4o'),
904
+ model: openai('gpt-5.4'),
905
905
  tools: await mcpClient.listTools(),
906
906
  })
907
907
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.1.17-alpha.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`e333b77`](https://github.com/mastra-ai/mastra/commit/e333b77e2d76ba57ccec1818e08cebc1993469ff), [`60a224d`](https://github.com/mastra-ai/mastra/commit/60a224dd497240e83698cfa5bfd02e3d1d854844), [`949b7bf`](https://github.com/mastra-ai/mastra/commit/949b7bfd4e40f2b2cba7fef5eb3f108a02cfe938), [`d084b66`](https://github.com/mastra-ai/mastra/commit/d084b6692396057e83c086b954c1857d20b58a14), [`79c699a`](https://github.com/mastra-ai/mastra/commit/79c699acf3cd8a77e11c55530431f48eb48456e9), [`62757b6`](https://github.com/mastra-ai/mastra/commit/62757b6db6e8bb86569d23ad0b514178f57053f8), [`3d70b0b`](https://github.com/mastra-ai/mastra/commit/3d70b0b3524d817173ad870768f259c06d61bd23), [`3b45a13`](https://github.com/mastra-ai/mastra/commit/3b45a138d09d040779c0aba1edbbfc1b57442d23), [`8127d96`](https://github.com/mastra-ai/mastra/commit/8127d96280492e335d49b244501088dfdd59a8f1)]:
8
+ - @mastra/core@1.18.0-alpha.3
9
+
10
+ ## 1.1.17-alpha.10
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`f16d92c`](https://github.com/mastra-ai/mastra/commit/f16d92c677a119a135cebcf7e2b9f51ada7a9df4)]:
15
+ - @mastra/core@1.18.0-alpha.2
16
+
17
+ ## 1.1.17-alpha.8
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [[`dc9fc19`](https://github.com/mastra-ai/mastra/commit/dc9fc19da4437f6b508cc355f346a8856746a76b), [`260fe12`](https://github.com/mastra-ai/mastra/commit/260fe1295fe7354e39d6def2775e0797a7a277f0)]:
22
+ - @mastra/core@1.18.0-alpha.1
23
+
24
+ ## 1.1.17-alpha.6
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [[`dc514a8`](https://github.com/mastra-ai/mastra/commit/dc514a83dba5f719172dddfd2c7b858e4943d067), [`404fea1`](https://github.com/mastra-ai/mastra/commit/404fea13042181f0b0c73a101392ac87c79ceae2), [`ebf5047`](https://github.com/mastra-ai/mastra/commit/ebf5047e825c38a1a356f10b214c1d4260dfcd8d), [`675f15b`](https://github.com/mastra-ai/mastra/commit/675f15b7eaeea649158d228ea635be40480c584d), [`b174c63`](https://github.com/mastra-ai/mastra/commit/b174c63a093108d4e53b9bc89a078d9f66202b3f), [`eef7cb2`](https://github.com/mastra-ai/mastra/commit/eef7cb2abe7ef15951e2fdf792a5095c6c643333), [`e8a5b0b`](https://github.com/mastra-ai/mastra/commit/e8a5b0b9bc94d12dee4150095512ca27a288d778)]:
29
+ - @mastra/core@1.18.0-alpha.0
30
+
31
+ ## 1.1.17-alpha.4
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [[`404fea1`](https://github.com/mastra-ai/mastra/commit/404fea13042181f0b0c73a101392ac87c79ceae2), [`ebf5047`](https://github.com/mastra-ai/mastra/commit/ebf5047e825c38a1a356f10b214c1d4260dfcd8d), [`675f15b`](https://github.com/mastra-ai/mastra/commit/675f15b7eaeea649158d228ea635be40480c584d), [`b174c63`](https://github.com/mastra-ai/mastra/commit/b174c63a093108d4e53b9bc89a078d9f66202b3f), [`eef7cb2`](https://github.com/mastra-ai/mastra/commit/eef7cb2abe7ef15951e2fdf792a5095c6c643333), [`86e3263`](https://github.com/mastra-ai/mastra/commit/86e326363edd12be5a5b25ccce4a39f66f7c9f50), [`e8a5b0b`](https://github.com/mastra-ai/mastra/commit/e8a5b0b9bc94d12dee4150095512ca27a288d778)]:
36
+ - @mastra/core@1.17.0-alpha.2
37
+
38
+ ## 1.1.17-alpha.2
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [[`7302e5c`](https://github.com/mastra-ai/mastra/commit/7302e5ce0f52d769d3d63fb0faa8a7d4089cda6d)]:
43
+ - @mastra/core@1.16.1-alpha.1
44
+
3
45
  ## 1.1.17-alpha.0
4
46
 
5
47
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.1.17-alpha.1",
3
+ "version": "1.1.17-alpha.13",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "jsdom": "^26.1.0",
30
30
  "local-pkg": "^1.1.2",
31
31
  "zod": "^4.3.6",
32
- "@mastra/core": "1.16.1-alpha.0",
32
+ "@mastra/core": "1.18.0-alpha.3",
33
33
  "@mastra/mcp": "^1.3.1"
34
34
  },
35
35
  "devDependencies": {
@@ -46,9 +46,9 @@
46
46
  "tsx": "^4.21.0",
47
47
  "typescript": "^5.9.3",
48
48
  "vitest": "4.0.18",
49
- "@mastra/core": "1.16.1-alpha.0",
49
+ "@internal/types-builder": "0.0.49",
50
50
  "@internal/lint": "0.0.74",
51
- "@internal/types-builder": "0.0.49"
51
+ "@mastra/core": "1.18.0-alpha.3"
52
52
  },
53
53
  "homepage": "https://mastra.ai",
54
54
  "repository": {
@@ -1,87 +0,0 @@
1
- # Mastra.getStoredAgentById()
2
-
3
- The `.getStoredAgentById()` method retrieves an agent configuration from storage by its ID and creates an executable `Agent` instance. Stored agents allow you to persist agent configurations in a database and dynamically load them at runtime.
4
-
5
- ## Usage example
6
-
7
- ```typescript
8
- // Get an Agent instance from storage
9
- const agent = await mastra.getStoredAgentById('my-stored-agent')
10
-
11
- if (agent) {
12
- const response = await agent.generate('Hello')
13
- console.log(response.text)
14
- }
15
- ```
16
-
17
- ```typescript
18
- // Get the raw storage data instead of an Agent instance
19
- const storedConfig = await mastra.getStoredAgentById('my-stored-agent', { raw: true })
20
-
21
- if (storedConfig) {
22
- console.log(storedConfig.instructions)
23
- console.log(storedConfig.createdAt)
24
- }
25
- ```
26
-
27
- ## Parameters
28
-
29
- **id** (`string`): The unique identifier of the stored agent to retrieve.
30
-
31
- **options** (`{ raw?: boolean }`): Optional configuration object.
32
-
33
- **options.raw** (`boolean`): When \`true\`, returns the raw \`StorageAgentType\` object from storage instead of creating an \`Agent\` instance. Useful for inspecting stored configuration or metadata.
34
-
35
- ## Returns
36
-
37
- **result** (`Agent | StorageAgentType | null`): Returns an \`Agent\` instance by default, or \`StorageAgentType\` when \`raw: true\`. Returns \`null\` if no agent with the given ID exists.
38
-
39
- ## Primitive resolution
40
-
41
- When creating an `Agent` instance from stored configuration, the method resolves references to registered primitives:
42
-
43
- - **Tools**: Resolved from `tools` registered in Mastra config
44
- - **Workflows**: Resolved from `workflows` registered in Mastra config
45
- - **Subagents**: Resolved from `agents` registered in Mastra config
46
- - **Memory**: Resolved from `memory` registered in Mastra config
47
- - **Scorers**: Resolved from `scorers` registered in Mastra config, including sampling configuration
48
-
49
- If a referenced primitive isn't found in the registry, a warning is logged but the agent is still created.
50
-
51
- ## `StorageAgentType`
52
-
53
- When using `raw: true`, the returned object has the following structure:
54
-
55
- **id** (`string`): Unique identifier for the agent.
56
-
57
- **name** (`string`): Display name of the agent.
58
-
59
- **description** (`string`): Optional description of the agent.
60
-
61
- **instructions** (`string`): System instructions for the agent.
62
-
63
- **model** (`Record<string, unknown>`): Model configuration with provider and name.
64
-
65
- **tools** (`Record<string, unknown>`): Tool references to resolve from registry.
66
-
67
- **workflows** (`Record<string, unknown>`): Workflow references to resolve from registry.
68
-
69
- **agents** (`Record<string, unknown>`): Subagent references to resolve from registry.
70
-
71
- **memory** (`Record<string, unknown>`): Memory reference to resolve from registry.
72
-
73
- **scorers** (`Record<string, unknown>`): Scorer references with optional sampling config.
74
-
75
- **defaultOptions** (`Record<string, unknown>`): Default options passed to agent execution.
76
-
77
- **metadata** (`Record<string, unknown>`): Custom metadata stored with the agent.
78
-
79
- **createdAt** (`Date`): Timestamp when the agent was created.
80
-
81
- **updatedAt** (`Date`): Timestamp when the agent was last updated.
82
-
83
- ## Related
84
-
85
- - [Mastra.listStoredAgents()](https://mastra.ai/reference/core/listStoredAgents)
86
- - [Storage overview](https://mastra.ai/reference/storage/overview)
87
- - [Agents overview](https://mastra.ai/docs/agents/overview)
@@ -1,91 +0,0 @@
1
- # Mastra.listStoredAgents()
2
-
3
- The `.listStoredAgents()` method retrieves a paginated list of agent configurations from storage. By default, it returns executable `Agent` instances, but can also return raw storage data.
4
-
5
- ## Usage example
6
-
7
- ```typescript
8
- // Get Agent instances from storage
9
- const { agents, total, hasMore } = await mastra.listStoredAgents()
10
-
11
- for (const agent of agents) {
12
- console.log(agent.id, agent.name)
13
- // Each agent is ready to use
14
- // const response = await agent.generate("Hello");
15
- }
16
- ```
17
-
18
- ```typescript
19
- // Get paginated results with raw storage data
20
- const result = await mastra.listStoredAgents({
21
- page: 0,
22
- perPage: 10,
23
- raw: true,
24
- })
25
-
26
- console.log(`Showing ${result.agents.length} of ${result.total} agents`)
27
- console.log(`Has more: ${result.hasMore}`)
28
-
29
- for (const config of result.agents) {
30
- console.log(config.id, config.name, config.createdAt)
31
- }
32
- ```
33
-
34
- ## Parameters
35
-
36
- **args** (`object`): Optional configuration object for pagination and output format.
37
-
38
- **args.page** (`number`): Zero-indexed page number for pagination.
39
-
40
- **args.perPage** (`number | false`): Number of items per page. Set to \`false\` to fetch all records without pagination.
41
-
42
- **args.raw** (`boolean`): When \`true\`, returns raw \`StorageAgentType\` objects instead of \`Agent\` instances.
43
-
44
- ## Returns
45
-
46
- **agents** (`Agent[] | StorageAgentType[]`): Array of \`Agent\` instances by default, or \`StorageAgentType\` objects when \`raw: true\`.
47
-
48
- **total** (`number`): Total number of stored agents across all pages.
49
-
50
- **page** (`number`): Current page number (zero-indexed).
51
-
52
- **perPage** (`number | false`): Number of items per page, or \`false\` if fetching all.
53
-
54
- **hasMore** (`boolean`): Whether there are more pages available.
55
-
56
- ## Primitive resolution
57
-
58
- When creating `Agent` instances (default behavior), each stored agent's configuration is resolved against registered primitives:
59
-
60
- - **Tools**: Resolved from `tools` registered in Mastra config
61
- - **Workflows**: Resolved from `workflows` registered in Mastra config
62
- - **Subagents**: Resolved from `agents` registered in Mastra config
63
- - **Memory**: Resolved from `memory` registered in Mastra config
64
- - **Scorers**: Resolved from `scorers` registered in Mastra config
65
-
66
- If a referenced primitive isn't found, a warning is logged but the agent is still created.
67
-
68
- ## Example: Iterating through all stored agents
69
-
70
- ```typescript
71
- async function getAllStoredAgents(mastra: Mastra) {
72
- const allAgents: Agent[] = []
73
- let page = 0
74
- let hasMore = true
75
-
76
- while (hasMore) {
77
- const result = await mastra.listStoredAgents({ page, perPage: 50 })
78
- allAgents.push(...result.agents)
79
- hasMore = result.hasMore
80
- page++
81
- }
82
-
83
- return allAgents
84
- }
85
- ```
86
-
87
- ## Related
88
-
89
- - [Mastra.getStoredAgentById()](https://mastra.ai/reference/core/getStoredAgentById)
90
- - [Storage overview](https://mastra.ai/reference/storage/overview)
91
- - [Agents overview](https://mastra.ai/docs/agents/overview)