@mastra/mcp-docs-server 1.1.39-alpha.13 → 1.1.39-alpha.16

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.
@@ -92,6 +92,8 @@ A tool can also pause _during_ its `execute` function by calling `suspend()`. Th
92
92
 
93
93
  The stream emits a `tool-call-suspended` chunk with a custom payload defined by the tool's `suspendSchema`. You resume by calling `resumeStream()` with data matching the tool's `resumeSchema`.
94
94
 
95
+ > **Note:** `suspend()` does not throw — return immediately after calling it (e.g. `return await suspend({ ... })`). Code after `await suspend(...)` still runs before the tool pauses.
96
+
95
97
  ## Tool approval with `generate()`
96
98
 
97
99
  Tool approval also works with `generate()` for non-streaming use cases. When a tool requires approval, `generate()` returns immediately with `finishReason: 'suspended'`, a `suspendPayload` containing the tool call details (`toolCallId`, `toolName`, `args`), and a `runId`:
@@ -86,6 +86,32 @@ agent.sendSignal(
86
86
  )
87
87
  ```
88
88
 
89
+ ## Identify users with attributes
90
+
91
+ Use `attributes` to tag each signal with user identity. The signal type and attributes are rendered as XML so the model can distinguish who said what in a multi-user thread:
92
+
93
+ ```typescript
94
+ agent.sendSignal(
95
+ {
96
+ type: 'user',
97
+ contents: 'Can we simplify the API surface?',
98
+ attributes: { name: 'Devin', from: 'slack' },
99
+ },
100
+ {
101
+ resourceId: 'user_123',
102
+ threadId: 'thread_456',
103
+ },
104
+ )
105
+ ```
106
+
107
+ The model receives:
108
+
109
+ ```xml
110
+ <user name="Devin" from="slack">Can we simplify the API surface?</user>
111
+ ```
112
+
113
+ The UI sees just the message contents but can also read `attributes` and `metadata` off the signal message for custom rendering (e.g. showing user names, avatars, or platform badges).
114
+
89
115
  ## Send external event context
90
116
 
91
117
  Use custom signal types for system-generated context. Non-user signal types are rendered as XML-style user-role context so they can appear inside conversation history without looking like assistant output.
@@ -96,7 +122,7 @@ agent.sendSignal(
96
122
  type: 'system-reminder',
97
123
  contents: 'User X has left a new PR comment asking for a smaller API surface.',
98
124
  attributes: {
99
- type: 'github',
125
+ source: 'github',
100
126
  pr: '123',
101
127
  },
102
128
  },
@@ -110,7 +136,7 @@ agent.sendSignal(
110
136
  The model receives the custom signal as context like this:
111
137
 
112
138
  ```xml
113
- <system-reminder type="github" pr="123">User X has left a new PR comment asking for a smaller API surface.</system-reminder>
139
+ <system-reminder source="github" pr="123">User X has left a new PR comment asking for a smaller API surface.</system-reminder>
114
140
  ```
115
141
 
116
142
  Use XML-safe signal type names and attribute names. Signal type names and attribute names can contain letters, numbers, underscores, periods, and hyphens. They must start with a letter or underscore.
@@ -1,6 +1,6 @@
1
1
  # Model Providers
2
2
 
3
- Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 4209 models from 121 providers through a single API.
3
+ Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 4215 models from 121 providers through a single API.
4
4
 
5
5
  ## Features
6
6
 
@@ -1,6 +1,6 @@
1
1
  # ![The Grid AI logo](https://models.dev/logos/the-grid-ai.svg)The Grid AI
2
2
 
3
- Access 3 The Grid AI models through Mastra's model router. Authentication is handled automatically using the `THEGRIDAI_API_KEY` environment variable.
3
+ Access 9 The Grid AI models through Mastra's model router. Authentication is handled automatically using the `THEGRIDAI_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [The Grid AI documentation](https://thegrid.ai/docs).
6
6
 
@@ -15,7 +15,7 @@ const agent = new Agent({
15
15
  id: "my-agent",
16
16
  name: "My Agent",
17
17
  instructions: "You are a helpful assistant",
18
- model: "the-grid-ai/text-max"
18
+ model: "the-grid-ai/agent-max"
19
19
  });
20
20
 
21
21
  // Generate a response
@@ -32,11 +32,17 @@ for await (const chunk of stream) {
32
32
 
33
33
  ## Models
34
34
 
35
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
- | --------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
- | `the-grid-ai/text-max` | 1.0M | | | | | | — | — |
38
- | `the-grid-ai/text-prime` | 128K | | | | | | — | — |
39
- | `the-grid-ai/text-standard` | 128K | | | | | | — | — |
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | ---------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `the-grid-ai/agent-max` | 1.0M | | | | | | — | — |
38
+ | `the-grid-ai/agent-prime` | 128K | | | | | | — | — |
39
+ | `the-grid-ai/agent-standard` | 128K | | | | | | — | — |
40
+ | `the-grid-ai/code-max` | 1.0M | | | | | | — | — |
41
+ | `the-grid-ai/code-prime` | 128K | | | | | | — | — |
42
+ | `the-grid-ai/code-standard` | 128K | | | | | | — | — |
43
+ | `the-grid-ai/text-max` | 1.0M | | | | | | — | — |
44
+ | `the-grid-ai/text-prime` | 128K | | | | | | — | — |
45
+ | `the-grid-ai/text-standard` | 128K | | | | | | — | — |
40
46
 
41
47
  ## Advanced configuration
42
48
 
@@ -48,7 +54,7 @@ const agent = new Agent({
48
54
  name: "custom-agent",
49
55
  model: {
50
56
  url: "https://api.thegrid.ai/v1",
51
- id: "the-grid-ai/text-max",
57
+ id: "the-grid-ai/agent-max",
52
58
  apiKey: process.env.THEGRIDAI_API_KEY,
53
59
  headers: {
54
60
  "X-Custom-Header": "value"
@@ -67,7 +73,7 @@ const agent = new Agent({
67
73
  const useAdvanced = requestContext.task === "complex";
68
74
  return useAdvanced
69
75
  ? "the-grid-ai/text-standard"
70
- : "the-grid-ai/text-max";
76
+ : "the-grid-ai/agent-max";
71
77
  }
72
78
  });
73
79
  ```
@@ -126,24 +126,32 @@ agent.sendSignal(
126
126
  )
127
127
  ```
128
128
 
129
- Use a custom signal type for contextual messages that should reach the model as XML-wrapped context instead of normal user input:
129
+ Use `attributes` to identify different users in a shared thread. The signal type and attributes are rendered as XML so the model can distinguish who said what:
130
130
 
131
131
  ```typescript
132
132
  agent.sendSignal(
133
133
  {
134
- type: 'system-reminder',
135
- contents: 'Continue from the previous tool result.',
136
- attributes: { reminderType: 'tool-result' },
134
+ type: 'user',
135
+ contents: 'Can we simplify the API surface?',
136
+ attributes: { name: 'Devin', from: 'slack' },
137
137
  },
138
138
  { resourceId: 'user-123', threadId: 'thread-abc' },
139
139
  )
140
140
  ```
141
141
 
142
+ The model receives this as:
143
+
144
+ ```xml
145
+ <user name="Devin" from="slack">Can we simplify the API surface?</user>
146
+ ```
147
+
148
+ The UI sees just the message contents but can also read `attributes` and `metadata` off the signal message for custom rendering (e.g. showing user names, avatars, or platform badges).
149
+
142
150
  ### `sendSignal(signal, options)`
143
151
 
144
152
  Sends a signal to an active run or memory thread.
145
153
 
146
- **signal** (`{ type: 'user-message' | string; contents: string | Array<TextPart | FilePart>; attributes?: Record<string, JSONValue>; metadata?: Record<string, unknown>; providerOptions?: ProviderMetadata }`): \`user-message\` signals are treated as user input. Other signal types are wrapped in XML context (with any \`attributes\`) before the next model call. \`providerOptions\` is attached to the resulting prompt turn and persisted on the stored signal message.
154
+ **signal** (`{ type: 'user-message' | 'system-reminder' | string; contents: string | Array<TextPart | FilePart>; attributes?: Record<string, JSONValue>; metadata?: Record<string, unknown>; providerOptions?: ProviderMetadata }`): \`user-message\` signals without attributes are treated as plain user input. All other signals — including \`user-message\` with \`attributes\`, \`system-reminder\`, and custom types are wrapped in an XML element named after the signal type with \`attributes\` rendered as XML attributes (e.g. \`\<user name="Devin" from="slack">message\</user>\`). The model sees the XML; the UI sees the raw contents and can read \`attributes\` for custom rendering. \`providerOptions\` is attached to the resulting prompt turn and persisted on the stored signal message.
147
155
 
148
156
  **options.runId** (`string`): Run ID to target directly. Use this when you already know the active run ID.
149
157
 
@@ -201,7 +201,7 @@ await agent.sendSignal({
201
201
 
202
202
  Returns `{ accepted: true, runId: string }`.
203
203
 
204
- **signal** (`{ type: 'user-message' | string; contents: string | Array<TextPart | FilePart>; attributes?: Record<string, JSONValue>; metadata?: Record<string, unknown>; providerOptions?: ProviderMetadata }`): \`user-message\` signals are treated as user input. Other signal types are wrapped in XML context (with any \`attributes\`) before the next model call. \`providerOptions\` is attached to the resulting prompt turn and persisted on the stored signal message.
204
+ **signal** (`{ type: 'user-message' | 'system-reminder' | string; contents: string | Array<TextPart | FilePart>; attributes?: Record<string, JSONValue>; metadata?: Record<string, unknown>; providerOptions?: ProviderMetadata }`): \`user-message\` signals without attributes are treated as plain user input. All other signals — including \`user-message\` with \`attributes\`, \`system-reminder\`, and custom types are wrapped in an XML element named after the signal type with \`attributes\` rendered as XML attributes (e.g. \`\<user name="Devin" from="slack">message\</user>\`). The model sees the XML; the UI sees the raw contents and can read \`attributes\` for custom rendering. \`providerOptions\` is attached to the resulting prompt turn and persisted on the stored signal message.
205
205
 
206
206
  **runId** (`string`): Run ID to target directly.
207
207
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.1.39-alpha.16
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`9aee493`](https://github.com/mastra-ai/mastra/commit/9aee493ed6089b5133472623dcce49934bf2d509)]:
8
+ - @mastra/core@1.36.0-alpha.8
9
+
10
+ ## 1.1.39-alpha.14
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0)]:
15
+ - @mastra/core@1.36.0-alpha.7
16
+
3
17
  ## 1.1.39-alpha.13
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.1.39-alpha.13",
3
+ "version": "1.1.39-alpha.16",
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.36.0-alpha.6",
32
+ "@mastra/core": "1.36.0-alpha.8",
33
33
  "@mastra/mcp": "^1.8.0-alpha.1"
34
34
  },
35
35
  "devDependencies": {
@@ -46,9 +46,9 @@
46
46
  "tsx": "^4.21.0",
47
47
  "typescript": "^6.0.3",
48
48
  "vitest": "4.1.5",
49
+ "@internal/lint": "0.0.96",
49
50
  "@internal/types-builder": "0.0.71",
50
- "@mastra/core": "1.36.0-alpha.6",
51
- "@internal/lint": "0.0.96"
51
+ "@mastra/core": "1.36.0-alpha.8"
52
52
  },
53
53
  "homepage": "https://mastra.ai",
54
54
  "repository": {