@mastra/mcp-docs-server 0.13.8-alpha.0 → 0.13.8

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.
@@ -1,5 +1,12 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.10.18-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d0d9500]
8
+ - @mastra/core@0.12.1-alpha.1
9
+
3
10
  ## 0.10.18-alpha.0
4
11
 
5
12
  ### Patch Changes
@@ -292,11 +299,4 @@
292
299
 
293
300
  ### Patch Changes
294
301
 
295
- - 9468be4: Fix error on agent generate while using antropic
296
- - 44731a4: Client SDK - Expose processTextStream util for agent textstream with structured output
297
- - Updated dependencies [b4a9811]
298
- - Updated dependencies [4d5583d]
299
- - @mastra/core@0.10.12
300
-
301
-
302
- ... 1832 more lines hidden. See full changelog in package directory.
302
+ ... 1839 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,11 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 0.12.1-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - d0d9500: Fixed an issue where AWS Bedrock is expecting a user message at the beginning of the message list
8
+
3
9
  ## 0.12.1-alpha.0
4
10
 
5
11
  ### Patch Changes
@@ -292,11 +298,5 @@
292
298
 
293
299
  ## 0.10.11
294
300
 
295
- ### Patch Changes
296
-
297
- - 2873c7f: dependencies updates:
298
- - Updated dependency [`dotenv@^16.6.1` ↗︎](https://www.npmjs.com/package/dotenv/v/16.6.1) (from `^16.5.0`, in `dependencies`)
299
- - 1c1c6a1: dependencies updates:
300
- - Updated dependency [`hono@^4.8.4` ↗︎](https://www.npmjs.com/package/hono/v/4.8.4) (from `^4.8.3`, in `dependencies`)
301
301
 
302
- ... 2397 more lines hidden. See full changelog in package directory.
302
+ ... 2403 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,13 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.12.1-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d0d9500]
8
+ - @mastra/core@0.12.1-alpha.1
9
+ - @mastra/server@0.12.1-alpha.1
10
+
3
11
  ## 0.12.1-alpha.0
4
12
 
5
13
  ### Patch Changes
@@ -291,12 +299,4 @@
291
299
 
292
300
  ## 0.11.0-alpha.0
293
301
 
294
- ### Minor Changes
295
-
296
- - 0938991: Refactored the hono server structure by extracting route logic into route groups based on namespace.
297
-
298
- ### Patch Changes
299
-
300
- - 6f50efd: Only enforce authorization on protected routes
301
-
302
- ... 3178 more lines hidden. See full changelog in package directory.
302
+ ... 3186 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 0.13.8-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d0d9500]
8
+ - @mastra/core@0.12.1-alpha.1
9
+
3
10
  ## 0.13.8-alpha.0
4
11
 
5
12
  ### Patch Changes
@@ -291,12 +298,5 @@
291
298
  - Updated dependencies [4fb0cc2]
292
299
  - Updated dependencies [d2a7a31]
293
300
  - Updated dependencies [0e17048]
294
- - @mastra/core@0.10.7-alpha.1
295
- - @mastra/mcp@0.10.5-alpha.0
296
-
297
- ## 0.13.1
298
-
299
- ### Patch Changes
300
-
301
301
 
302
- ... 1107 more lines hidden. See full changelog in package directory.
302
+ ... 1114 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,12 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.12.1-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d0d9500]
8
+ - @mastra/core@0.12.1-alpha.1
9
+
3
10
  ## 0.12.1-alpha.0
4
11
 
5
12
  ### Patch Changes
@@ -292,11 +299,4 @@
292
299
 
293
300
  ### Patch Changes
294
301
 
295
- - @mastra/core@0.10.14
296
-
297
- ## 0.10.12
298
-
299
- ### Patch Changes
300
-
301
-
302
- ... 2630 more lines hidden. See full changelog in package directory.
302
+ ... 2637 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,14 @@
1
1
  # mastra
2
2
 
3
+ ## 0.10.17-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 9862477: Install specific ai v4 deps when scaffolding a project
8
+ - Updated dependencies [d0d9500]
9
+ - @mastra/core@0.12.1-alpha.1
10
+ - @mastra/deployer@0.12.1-alpha.1
11
+
3
12
  ## 0.10.17-alpha.0
4
13
 
5
14
  ### Patch Changes
@@ -289,14 +298,5 @@
289
298
  - Updated dependency [`swr@^2.3.4` ↗︎](https://www.npmjs.com/package/swr/v/2.3.4) (from `^2.3.3`, in `dependencies`)
290
299
  - 984887a: dependencies updates:
291
300
  - Updated dependency [`prettier@^3.6.2` ↗︎](https://www.npmjs.com/package/prettier/v/3.6.2) (from `^3.5.3`, in `dependencies`)
292
- - aa9528a: Display reasoning in playground
293
- - 45174f3: share network list between core and cloud
294
- - 48f5532: export workflow list for usage in cloud
295
- - 3e484be: Added CLI template option
296
- - 626b0f4: [Cloud-126] Working Memory Playground - Added working memory to playground to allow users to view/edit working memory
297
- - e1d0080: abstract Link component between cloud and core
298
- - f9b1508: add the same agent table as in cloud and export it from the playground
299
- - dfbeec6: Fix navigation to vnext AgentNetwork agents
300
- - Updated dependencies [7776324]
301
-
302
- ... 4674 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 4683 more lines hidden. See full changelog in package directory.
@@ -15,21 +15,21 @@ Additionally, agents support dynamic configuration, allowing you to change their
15
15
 
16
16
  To create an agent in Mastra, you use the `Agent` class and define its properties:
17
17
 
18
- ```ts showLineNumbers filename="src/mastra/agents/index.ts" copy
19
- import { Agent } from "@mastra/core/agent";
18
+ ```typescript filename="src/mastra/agents/test-agent.ts" showLineNumbers copy
20
19
  import { openai } from "@ai-sdk/openai";
20
+ import { Agent } from "@mastra/core/agent";
21
21
 
22
- export const myAgent = new Agent({
23
- name: "My Agent",
22
+ const testAgent = new Agent({
23
+ name: "test-agent",
24
24
  instructions: "You are a helpful assistant.",
25
- model: openai("gpt-4o-mini"),
25
+ model: openai("gpt-4o")
26
26
  });
27
27
  ```
28
28
 
29
29
  **Note:** Ensure that you have set the necessary environment variables, such as your OpenAI API key, in your `.env` file:
30
30
 
31
- ```.env filename=".env" copy
32
- OPENAI_API_KEY=your_openai_api_key
31
+ ```bash filename=".env" copy
32
+ OPENAI_API_KEY=<your-api-key>
33
33
  ```
34
34
 
35
35
  Also, make sure you have the `@mastra/core` package installed:
@@ -44,12 +44,13 @@ All agent properties (instructions, model, tools, memory) can be configured dyna
44
44
 
45
45
  Register your agent with Mastra to enable logging and access to configured tools and integrations:
46
46
 
47
- ```ts showLineNumbers filename="src/mastra/index.ts" copy
47
+ ```typescript showLineNumbers filename="src/mastra/index.ts" copy
48
48
  import { Mastra } from "@mastra/core";
49
- import { myAgent } from "./agents";
49
+ import { testAgent } from './agents/test-agent';
50
50
 
51
51
  export const mastra = new Mastra({
52
- agents: { myAgent },
52
+ // ...
53
+ agents: { testAgent },
53
54
  });
54
55
  ```
55
56
 
@@ -59,8 +60,8 @@ export const mastra = new Mastra({
59
60
 
60
61
  Use the `.generate()` method to have your agent produce text responses:
61
62
 
62
- ```ts showLineNumbers filename="src/mastra/index.ts" copy
63
- const response = await myAgent.generate([
63
+ ```typescript showLineNumbers copy
64
+ const response = await testAgent.generate([
64
65
  { role: "user", content: "Hello, how can you assist me today?" },
65
66
  ]);
66
67
 
@@ -73,8 +74,8 @@ For more details about the generate method and its options, see the [generate re
73
74
 
74
75
  For more real-time responses, you can stream the agent's response:
75
76
 
76
- ```ts showLineNumbers filename="src/mastra/index.ts" copy
77
- const stream = await myAgent.stream([
77
+ ```typescript showLineNumbers copy
78
+ const stream = await testAgent.stream([
78
79
  { role: "user", content: "Tell me a story." },
79
80
  ]);
80
81
 
@@ -87,13 +88,35 @@ for await (const chunk of stream.textStream) {
87
88
 
88
89
  For more details about streaming responses, see the [stream reference documentation](/reference/agents/stream).
89
90
 
90
- ## 3. Structured Output
91
+ ## 3. Describing images
92
+
93
+ Agents can analyze and describe images by processing both the visual content and any text within them. To enable image analysis, pass an object with `type: 'image'` and the image URL in the content array. You can combine image content with text prompts to guide the agent's analysis.
94
+
95
+ ```typescript showLineNumbers copy
96
+ await testAgent.generate([
97
+ {
98
+ role: 'user',
99
+ content: [
100
+ {
101
+ type: 'image',
102
+ image: "https://example.com/images/test-image.jpg",
103
+ },
104
+ {
105
+ type: 'text',
106
+ text: 'Describe the image in detail, and extract all the text in the image.',
107
+ },
108
+ ],
109
+ },
110
+ ]);
111
+ ```
112
+
113
+ ## 4. Structured Output
91
114
 
92
115
  Agents can return structured data by providing a JSON Schema or using a Zod schema.
93
116
 
94
117
  ### Using JSON Schema
95
118
 
96
- ```typescript
119
+ ```typescript showLineNumbers copy
97
120
  const schema = {
98
121
  type: "object",
99
122
  properties: {
@@ -104,7 +127,7 @@ const schema = {
104
127
  required: ["summary", "keywords"],
105
128
  };
106
129
 
107
- const response = await myAgent.generate(
130
+ const response = await testAgent.generate(
108
131
  [
109
132
  {
110
133
  role: "user",
@@ -132,7 +155,7 @@ npm install zod
132
155
 
133
156
  Then, define a Zod schema and use it with the agent:
134
157
 
135
- ```ts showLineNumbers filename="src/mastra/index.ts" copy
158
+ ```typescript showLineNumbers copy
136
159
  import { z } from "zod";
137
160
 
138
161
  // Define the Zod schema
@@ -142,7 +165,7 @@ const schema = z.object({
142
165
  });
143
166
 
144
167
  // Use the schema with the agent
145
- const response = await myAgent.generate(
168
+ const response = await testAgent.generate(
146
169
  [
147
170
  {
148
171
  role: "user",
@@ -162,13 +185,13 @@ console.log("Structured Output:", response.object);
162
185
 
163
186
  If you need to generate structured output alongside tool calls, you'll need to use the `experimental_output` property instead of `output`. Here's how:
164
187
 
165
- ```typescript
188
+ ```typescript showLineNumbers copy
166
189
  const schema = z.object({
167
190
  summary: z.string(),
168
191
  keywords: z.array(z.string()),
169
192
  });
170
193
 
171
- const response = await myAgent.generate(
194
+ const response = await testAgent.generate(
172
195
  [
173
196
  {
174
197
  role: "user",
@@ -189,7 +212,7 @@ console.log("Structured Output:", response.object);
189
212
 
190
213
  This allows you to have strong typing and validation for the structured data returned by the agent.
191
214
 
192
- ## 4. Multi-step tool use
215
+ ## 5. Multi-step tool use
193
216
 
194
217
  Agents can be enhanced with tools - functions that extend their capabilities beyond text generation. Tools allow agents to perform calculations, access external systems, and process data. Agents not only decide whether to call tools they're given, they determine the parameters that should be given to that tool.
195
218
 
@@ -199,26 +222,8 @@ For a detailed guide to creating and configuring tools, see the [Adding Tools do
199
222
 
200
223
  The `maxSteps` parameter controls the maximum number of sequential LLM calls an agent can make, particularly important when using tool calls. By default, it is set to 1 to prevent infinite loops in case of misconfigured tools. You can increase this limit based on your use case:
201
224
 
202
- ```ts showLineNumbers filename="src/mastra/agents/index.ts" copy
203
- import { Agent } from "@mastra/core/agent";
204
- import { openai } from "@ai-sdk/openai";
205
- import * as mathjs from "mathjs";
206
- import { z } from "zod";
207
-
208
- export const myAgent = new Agent({
209
- name: "My Agent",
210
- instructions: "You are a helpful assistant that can solve math problems.",
211
- model: openai("gpt-4o-mini"),
212
- tools: {
213
- calculate: {
214
- description: "Calculator for mathematical expressions",
215
- schema: z.object({ expression: z.string() }),
216
- execute: async ({ expression }) => mathjs.evaluate(expression),
217
- },
218
- },
219
- });
220
-
221
- const response = await myAgent.generate(
225
+ ```typescript showLineNumbers copy
226
+ const response = await testAgent.generate(
222
227
  [
223
228
  {
224
229
  role: "user",
@@ -238,8 +243,8 @@ You can monitor the progress of multi-step operations using the `onStepFinish` c
238
243
 
239
244
  `onStepFinish` is only available when streaming or generating text without structured output.
240
245
 
241
- ```ts showLineNumbers filename="src/mastra/agents/index.ts" copy
242
- const response = await myAgent.generate(
246
+ ```typescript showLineNumbers copy
247
+ const response = await testAgent.generate(
243
248
  [{ role: "user", content: "Calculate the taxi driver's daily earnings." }],
244
249
  {
245
250
  maxSteps: 5,
@@ -255,8 +260,8 @@ const response = await myAgent.generate(
255
260
  The `onFinish` callback is available when streaming responses and provides detailed information about the completed interaction. It is called after the LLM has finished generating its response and all tool executions have completed.
256
261
  This callback receives the final response text, execution steps, token usage statistics, and other metadata that can be useful for monitoring and logging:
257
262
 
258
- ```ts showLineNumbers filename="src/mastra/agents/index.ts" copy
259
- const stream = await myAgent.stream(
263
+ ```typescript showLineNumbers copy
264
+ const stream = await testAgent.stream(
260
265
  [{ role: "user", content: "Calculate the taxi driver's daily earnings." }],
261
266
  {
262
267
  maxSteps: 5,
@@ -277,7 +282,7 @@ const stream = await myAgent.stream(
277
282
  );
278
283
  ```
279
284
 
280
- ## 5. Testing agents locally
285
+ ## 6. Testing agents locally
281
286
 
282
287
  Mastra provides a CLI command `mastra dev` to run your agents behind an API. By default, this looks for exported agents in files in the `src/mastra/agents` directory. It generates endpoints for testing your agent (eg `http://localhost:4111/api/agents/myAgent/generate`) and provides a visual playground where you can chat with an agent and view traces.
283
288
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "0.13.8-alpha.0",
3
+ "version": "0.13.8",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,8 +32,8 @@
32
32
  "uuid": "^11.1.0",
33
33
  "zod": "^3.25.67",
34
34
  "zod-to-json-schema": "^3.24.5",
35
- "@mastra/mcp": "^0.10.9-alpha.0",
36
- "@mastra/core": "0.12.1-alpha.0"
35
+ "@mastra/core": "0.12.1",
36
+ "@mastra/mcp": "^0.10.9"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@hono/node-server": "^1.17.1",
@@ -48,8 +48,8 @@
48
48
  "tsx": "^4.19.4",
49
49
  "typescript": "^5.8.3",
50
50
  "vitest": "^3.2.4",
51
- "@mastra/core": "0.12.1-alpha.0",
52
- "@internal/lint": "0.0.24"
51
+ "@mastra/core": "0.12.1",
52
+ "@internal/lint": "0.0.25"
53
53
  },
54
54
  "scripts": {
55
55
  "prepare-docs": "cross-env PREPARE=true node dist/prepare-docs/prepare.js",