@mastra/mcp-docs-server 1.1.35-alpha.6 → 1.1.35-alpha.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.
@@ -17,7 +17,7 @@ Some LLM providers include built-in web search capabilities that can be used dir
17
17
 
18
18
  1. Install dependencies
19
19
 
20
- **Open AI**:
20
+ **OpenAI**:
21
21
 
22
22
  **npm**:
23
23
 
@@ -119,7 +119,7 @@ Some LLM providers include built-in web search capabilities that can be used dir
119
119
 
120
120
  2. Create a new file `src/mastra/agents/searchAgent.ts` and define your agent:
121
121
 
122
- **Open AI**:
122
+ **OpenAI**:
123
123
 
124
124
  ```ts
125
125
  import { Agent } from '@mastra/core/agent'
@@ -128,7 +128,7 @@ Some LLM providers include built-in web search capabilities that can be used dir
128
128
  id: 'search-agent',
129
129
  name: 'Search Agent',
130
130
  instructions: 'You are a search agent that can search the web for information.',
131
- model: 'openai/gpt-5.4',
131
+ model: 'openai/gpt-5.5',
132
132
  })
133
133
  ```
134
134
 
@@ -147,7 +147,7 @@ Some LLM providers include built-in web search capabilities that can be used dir
147
147
 
148
148
  3. Setup the tool:
149
149
 
150
- **Open AI**:
150
+ **OpenAI**:
151
151
 
152
152
  ```ts
153
153
  import { openai } from '@ai-sdk/openai'
@@ -157,7 +157,7 @@ Some LLM providers include built-in web search capabilities that can be used dir
157
157
  id: 'search-agent',
158
158
  name: 'Search Agent',
159
159
  instructions: 'You are a search agent that can search the web for information.',
160
- model: 'openai/gpt-5.4',
160
+ model: 'openai/gpt-5.5',
161
161
  tools: {
162
162
  webSearch: openai.tools.webSearch(),
163
163
  },
@@ -241,7 +241,7 @@ For more control over search behavior, you can integrate external search APIs as
241
241
  id: 'search-agent',
242
242
  name: 'Search Agent',
243
243
  instructions: 'You are a search agent that can search the web for information.',
244
- model: 'openai/gpt-5.4',
244
+ model: 'openai/gpt-5.5',
245
245
  })
246
246
  ```
247
247
 
@@ -293,7 +293,7 @@ For more control over search behavior, you can integrate external search APIs as
293
293
  id: 'search-agent',
294
294
  name: 'Search Agent',
295
295
  instructions: 'You are a search agent that can search the web for information.',
296
- model: 'openai/gpt-5.4',
296
+ model: 'openai/gpt-5.5',
297
297
  tools: {
298
298
  webSearch,
299
299
  },
@@ -13,7 +13,7 @@ const agent = new Agent({
13
13
  id: "my-agent",
14
14
  name: "My Agent",
15
15
  instructions: "You are a helpful assistant",
16
- model: "azure-openai/my-gpt4-deployment" // Use your Azure deployment name (autocompleted in dev mode)
16
+ model: "azure-openai/my-gpt-5-4-deployment" // Use your Azure deployment name (autocompleted in dev mode)
17
17
  });
18
18
 
19
19
  // Generate a response
@@ -34,9 +34,9 @@ Azure model IDs follow this pattern: `azure-openai/your-deployment-name`
34
34
 
35
35
  The deployment name is **specific to your Azure account** and chosen when you create a deployment in Azure Portal. Common examples:
36
36
 
37
- - `azure-openai/my-gpt4-deployment`
38
- - `azure-openai/production-gpt-35-turbo`
39
- - `azure-openai/staging-gpt-4o`
37
+ - `azure-openai/my-gpt-5-4-deployment`
38
+ - `azure-openai/production-gpt-5-4`
39
+ - `azure-openai/staging-gpt-5-4-mini`
40
40
 
41
41
  ## Setup
42
42
 
@@ -44,7 +44,7 @@ Create deployments in [Azure OpenAI Studio](https://oai.azure.com/). The resourc
44
44
 
45
45
  ## Configuration
46
46
 
47
- Instantiate the gateway and pass it to Mastra. Three configuration modes are available.
47
+ Instantiate the gateway and pass it to Mastra. The common configuration modes are shown below.
48
48
 
49
49
  ### Static Deployments
50
50
 
@@ -59,7 +59,7 @@ export const mastra = new Mastra({
59
59
  new AzureOpenAIGateway({
60
60
  resourceName: "my-openai-resource",
61
61
  apiKey: process.env.AZURE_API_KEY!,
62
- deployments: ["gpt-4-prod", "gpt-35-turbo-dev"],
62
+ deployments: ["gpt-5-4-prod", "gpt-5-4-mini-dev"],
63
63
  }),
64
64
  ],
65
65
  });
@@ -111,7 +111,7 @@ export const mastra = new Mastra({
111
111
  type: "entraId",
112
112
  credential: new DefaultAzureCredential(),
113
113
  },
114
- deployments: ["gpt-4-prod", "gpt-35-turbo-dev"],
114
+ deployments: ["gpt-5-4-prod", "gpt-5-4-mini-dev"],
115
115
  }),
116
116
  ],
117
117
  });
@@ -145,23 +145,94 @@ export const mastra = new Mastra({
145
145
  });
146
146
  ```
147
147
 
148
+ ### Azure Responses API
149
+
150
+ Azure OpenAI supports the Responses API through the `v1` API path used by the AI SDK Azure provider. Set `useResponsesAPI: true` when your Azure resource and deployment support that route. The gateway then uses `apiVersion: "v1"` and `useDeploymentBasedUrls: false` by default.
151
+
152
+ ```typescript
153
+ import { Mastra } from "@mastra/core";
154
+ import { AzureOpenAIGateway } from "@mastra/core/llm";
155
+
156
+ export const mastra = new Mastra({
157
+ gateways: [
158
+ new AzureOpenAIGateway({
159
+ resourceName: "my-openai-resource",
160
+ apiKey: process.env.AZURE_API_KEY!,
161
+ useResponsesAPI: true,
162
+ deployments: ["my-gpt-5-4-deployment"],
163
+ }),
164
+ ],
165
+ });
166
+ ```
167
+
168
+ Keep `useResponsesAPI` omitted or set it to `false` for the existing Azure chat completions route. That path keeps `apiVersion: "2024-04-01-preview"` and deployment-based URLs by default for compatibility.
169
+
170
+ You can still configure `apiVersion` and `useDeploymentBasedUrls` directly. For example, set `useDeploymentBasedUrls: false` to use the Azure `v1` URL shape with the chat model constructor; the gateway defaults `apiVersion` to `"v1"` for that route. Passing `apiVersion: "v1"` by itself keeps the existing deployment-based URL default for compatibility.
171
+
172
+ Do not combine `useResponsesAPI: true` with `useDeploymentBasedUrls: true`; the gateway rejects that configuration because Responses API support uses the Azure `v1` route.
173
+
174
+ Use `apiVersion: "v1"` for the GA `v1` route. Microsoft currently exposes preview `v1` features through feature-specific headers, such as `"aoai-evals": "preview"`, or through preview/alpha API paths. The gateway still accepts `apiVersion: "preview"` with `useDeploymentBasedUrls: false` for Azure provider configurations that require the preview query value. Date-based API versions are only for the legacy deployment-based route, so the gateway rejects them when `useResponsesAPI` is `true` or `useDeploymentBasedUrls` is `false`.
175
+
176
+ The same API key and Microsoft Entra ID authentication modes work with the `v1` route.
177
+
178
+ ### Azure Responses WebSocket transport
179
+
180
+ Azure OpenAI also supports WebSocket mode on the Responses API. Use it for agent or tool loops with many model-tool round trips. Keep the standard HTTP transport for single-shot requests and short conversations.
181
+
182
+ WebSocket transport requires `useResponsesAPI: true`, because Azure exposes it on the `v1` Responses path. Then opt in per stream request with `providerOptions.azure.transport: "websocket"`.
183
+
184
+ ```typescript
185
+ import { Agent } from "@mastra/core/agent";
186
+
187
+ const agent = new Agent({
188
+ id: "azure-ws-agent",
189
+ name: "Azure WebSocket Agent",
190
+ instructions: "Use tools when they are useful.",
191
+ model: "azure-openai/my-gpt-5-4-deployment",
192
+ });
193
+
194
+ const stream = await agent.stream("Find and improve the slow function.", {
195
+ providerOptions: {
196
+ azure: {
197
+ transport: "websocket",
198
+ store: false,
199
+ websocket: {
200
+ closeOnFinish: false,
201
+ },
202
+ },
203
+ },
204
+ });
205
+
206
+ for await (const chunk of stream.textStream) {
207
+ process.stdout.write(chunk);
208
+ }
209
+
210
+ stream.transport?.close();
211
+ ```
212
+
213
+ Set `closeOnFinish: false` when you want to keep the socket open across follow-up turns. Azure keeps one response chain in connection-local memory, so continuing from the most recent `previous_response_id` can reduce continuation latency. The connection runs one response at a time and does not multiplex parallel runs.
214
+
215
+ Do not send overlapping follow-up requests with `previous_response_id` on the same WebSocket transport. Mastra rejects overlapping continuation requests because Azure only keeps one in-flight response per connection. Wait for the active stream to finish before continuing the response chain.
216
+
148
217
  ## Configuration Reference
149
218
 
150
- | Option | Type | Required | Description |
151
- | --------------------------- | ----------------- | -------- | --------------------------------------------------------------------- |
152
- | `resourceName` | `string` | Yes | Azure OpenAI resource name |
153
- | `apiKey` | `string` | Yes\* | API key from "Keys and Endpoint" |
154
- | `authentication` | `object` | No | Microsoft Entra ID authentication |
155
- | `authentication.type` | `"entraId"` | Yes\* | Authentication mode |
156
- | `authentication.credential` | `TokenCredential` | Yes\* | Azure SDK-compatible credential for `entraId` authentication mode |
157
- | `authentication.scope` | `string` | No | Token scope (default: `https://cognitiveservices.azure.com/.default`) |
158
- | `apiVersion` | `string` | No | API version (default: `2024-04-01-preview`) |
159
- | `deployments` | `string[]` | No | Deployment names for static mode |
160
- | `management` | `object` | No | Management API credentials |
161
- | `management.tenantId` | `string` | Yes\* | Azure AD tenant ID |
162
- | `management.clientId` | `string` | Yes\* | Service Principal client ID |
163
- | `management.clientSecret` | `string` | Yes\* | Service Principal secret |
164
- | `management.subscriptionId` | `string` | Yes\* | Azure subscription ID |
165
- | `management.resourceGroup` | `string` | Yes\* | Resource group name |
219
+ | Option | Type | Required | Description |
220
+ | --------------------------- | ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------- |
221
+ | `resourceName` | `string` | Yes | Azure OpenAI resource name |
222
+ | `apiKey` | `string` | Yes\* | API key from "Keys and Endpoint" |
223
+ | `authentication` | `object` | No | Microsoft Entra ID authentication |
224
+ | `authentication.type` | `"entraId"` | Yes\* | Authentication mode |
225
+ | `authentication.credential` | `TokenCredential` | Yes\* | Azure SDK-compatible credential for `entraId` authentication mode |
226
+ | `authentication.scope` | `string` | No | Token scope (default: `https://cognitiveservices.azure.com/.default`) |
227
+ | `apiVersion` | `string` | No | API version (default: `2024-04-01-preview`, or `v1` when `useResponsesAPI` is `true` or `useDeploymentBasedUrls` is `false`) |
228
+ | `useResponsesAPI` | `boolean` | No | Resolve deployments through the Azure OpenAI Responses API (default: `false`) |
229
+ | `useDeploymentBasedUrls` | `boolean` | No | Use Azure deployment-based URLs (default: `true`, or `false` when `useResponsesAPI` is `true`) |
230
+ | `deployments` | `string[]` | No | Deployment names for static mode |
231
+ | `management` | `object` | No | Management API credentials |
232
+ | `management.tenantId` | `string` | Yes\* | Azure AD tenant ID |
233
+ | `management.clientId` | `string` | Yes\* | Service Principal client ID |
234
+ | `management.clientSecret` | `string` | Yes\* | Service Principal secret |
235
+ | `management.subscriptionId` | `string` | Yes\* | Azure subscription ID |
236
+ | `management.resourceGroup` | `string` | Yes\* | Resource group name |
166
237
 
167
238
  \* Provide either `apiKey` or `authentication.type: "entraId"`. Management fields are required if `management` is provided.
@@ -550,6 +550,470 @@ See the [Storage migration guide](https://mastra.ai/guides/migrations/upgrade-to
550
550
 
551
551
  It accepts [common flags](#common-flags).
552
552
 
553
+ ## `mastra api`
554
+
555
+ Calls a Mastra runtime server with JSON input and JSON output. Use it for local development servers, deployed Mastra Platform projects, or self-hosted Mastra servers.
556
+
557
+ ```bash
558
+ mastra api agent list --pretty
559
+ mastra api agent run weather-agent '{"messages":"What is the weather in London?"}'
560
+ mastra api tool execute get-weather '{"location":"San Francisco"}'
561
+ ```
562
+
563
+ Use `mastra api <resource> <action> --help` to see examples for a command.
564
+
565
+ ### Output
566
+
567
+ Success responses are written to `stdout` as JSON. Single-resource commands return:
568
+
569
+ ```json
570
+ { "data": {} }
571
+ ```
572
+
573
+ List commands return a `data` array and pagination metadata:
574
+
575
+ ```json
576
+ { "data": [], "page": { "total": 0, "page": 0, "perPage": 0, "hasMore": false } }
577
+ ```
578
+
579
+ Errors are written to `stderr` as JSON and return a non-zero exit code:
580
+
581
+ ```json
582
+ {
583
+ "error": {
584
+ "code": "SERVER_UNREACHABLE",
585
+ "message": "Could not connect to target server",
586
+ "details": {}
587
+ }
588
+ }
589
+ ```
590
+
591
+ ### Target resolution
592
+
593
+ The command resolves the target server in this order:
594
+
595
+ 1. `--url <url>` for an explicit remote or self-hosted server.
596
+ 2. `http://localhost:4111` for a local `mastra dev` server.
597
+ 3. `.mastra-project.json` for a Mastra Platform project.
598
+
599
+ Automatic platform auth is only used when the CLI resolves a Mastra Platform target from `.mastra-project.json`. Localhost targets and explicit `--url` targets do not receive automatic credentials. Headers passed with `--header` are sent to any target, including localhost.
600
+
601
+ ### Flags
602
+
603
+ #### `--url <url>`
604
+
605
+ Target a specific Mastra server URL.
606
+
607
+ ```bash
608
+ mastra api --url https://example.com agent list
609
+ ```
610
+
611
+ #### `--header <"Key: Value">`
612
+
613
+ Send a custom HTTP header. Repeat the flag to send multiple headers.
614
+
615
+ ```bash
616
+ mastra api --url https://example.com --header "Authorization: Bearer $TOKEN" agent list
617
+ ```
618
+
619
+ #### `--timeout <ms>`
620
+
621
+ Set the request timeout in milliseconds. Defaults to `30000`. Workflow run start and resume commands default to `120000`.
622
+
623
+ #### `--pretty`
624
+
625
+ Pretty-print JSON output. Defaults to `false`.
626
+
627
+ #### `--schema`
628
+
629
+ Print the CLI-oriented request schema for a command that accepts JSON input. The schema comes from the target server's route contracts and includes the command shape, positionals, examples, request schemas, and response shape.
630
+
631
+ `--schema` is available on leaf commands that accept JSON input. It is not available as a top-level `mastra api` flag.
632
+
633
+ ```bash
634
+ mastra api agent run --schema
635
+ mastra api tool execute --schema
636
+ ```
637
+
638
+ ### Input model
639
+
640
+ Commands that accept input take one inline JSON argument. Do not pass file paths or stdin.
641
+
642
+ ```bash
643
+ mastra api workflow run start data-pipeline '{"inputData":{"source":"s3://bucket/data.csv"}}'
644
+ ```
645
+
646
+ Use positional arguments for stable IDs and JSON for filters or payloads. For routes that require both query parameters and a request body, pass one JSON object. The CLI splits the input according to the server route schema.
647
+
648
+ ```bash
649
+ mastra api thread create '{"agentId":"weather-agent","resourceId":"user_123","threadId":"thread_abc123","title":"Support conversation"}'
650
+ ```
651
+
652
+ List commands accept `page` and `perPage` in the JSON input when the target route supports pagination:
653
+
654
+ ```bash
655
+ mastra api score list '{"page":0,"perPage":50}'
656
+ ```
657
+
658
+ ### Get command-specific help
659
+
660
+ Each `mastra api` leaf command includes command-specific examples in its help output. Use `--help` on the exact command you want to call:
661
+
662
+ ```bash
663
+ mastra api agent run --help
664
+ mastra api tool execute --help
665
+ mastra api memory current update --help
666
+ mastra api workflow run resume --help
667
+ ```
668
+
669
+ Use `--schema` on commands that accept JSON input to inspect the request shape returned by the target server:
670
+
671
+ ```bash
672
+ mastra api agent run --schema
673
+ mastra api thread create --schema
674
+ mastra api score create --schema
675
+ ```
676
+
677
+ Some commands have important runtime requirements. For example, `mastra api memory current update` requires working memory to be enabled for the memory instance, and `mastra api workflow run resume` only works for suspended workflow runs.
678
+
679
+ ### Commands
680
+
681
+ #### `mastra api agent list`
682
+
683
+ Lists the agents registered on the target server. Pass optional JSON input for route-supported filters.
684
+
685
+ ```bash
686
+ mastra api agent list [input]
687
+ ```
688
+
689
+ #### `mastra api agent get`
690
+
691
+ Gets metadata for one registered agent.
692
+
693
+ ```bash
694
+ mastra api agent get <agentId>
695
+ ```
696
+
697
+ #### `mastra api agent run`
698
+
699
+ Runs an agent with JSON input. Use command help to see examples for text prompts, chat messages, and memory thread options.
700
+
701
+ ```bash
702
+ mastra api agent run <agentId> <input>
703
+ ```
704
+
705
+ #### `mastra api workflow list`
706
+
707
+ Lists workflows registered on the target server. Pass optional JSON input for route-supported filters.
708
+
709
+ ```bash
710
+ mastra api workflow list [input]
711
+ ```
712
+
713
+ #### `mastra api workflow get`
714
+
715
+ Gets metadata for one registered workflow.
716
+
717
+ ```bash
718
+ mastra api workflow get <workflowId>
719
+ ```
720
+
721
+ #### `mastra api workflow run start`
722
+
723
+ Starts a workflow run with JSON input. Workflow start commands use a longer default timeout than most commands because runs can take longer to complete.
724
+
725
+ ```bash
726
+ mastra api workflow run start <workflowId> <input>
727
+ ```
728
+
729
+ #### `mastra api workflow run list`
730
+
731
+ Lists runs for a workflow. Pass optional JSON input for route-supported filters or pagination.
732
+
733
+ ```bash
734
+ mastra api workflow run list <workflowId> [input]
735
+ ```
736
+
737
+ #### `mastra api workflow run get`
738
+
739
+ Gets one workflow run by ID.
740
+
741
+ ```bash
742
+ mastra api workflow run get <workflowId> <runId>
743
+ ```
744
+
745
+ #### `mastra api workflow run resume`
746
+
747
+ Resumes a suspended workflow run with JSON input. The run must be in a suspended state.
748
+
749
+ ```bash
750
+ mastra api workflow run resume <workflowId> <runId> <input>
751
+ ```
752
+
753
+ #### `mastra api workflow run cancel`
754
+
755
+ Cancels a workflow run.
756
+
757
+ ```bash
758
+ mastra api workflow run cancel <workflowId> <runId>
759
+ ```
760
+
761
+ #### `mastra api tool list`
762
+
763
+ Lists tools registered on the target server. Pass optional JSON input for route-supported filters.
764
+
765
+ ```bash
766
+ mastra api tool list [input]
767
+ ```
768
+
769
+ #### `mastra api tool get`
770
+
771
+ Gets metadata and schemas for one tool.
772
+
773
+ ```bash
774
+ mastra api tool get <toolId>
775
+ ```
776
+
777
+ #### `mastra api tool execute`
778
+
779
+ Executes a tool with JSON input. Raw tool input is wrapped as the route `data` field unless you pass an explicit `data` object.
780
+
781
+ ```bash
782
+ mastra api tool execute <toolId> <input>
783
+ ```
784
+
785
+ #### `mastra api mcp list`
786
+
787
+ Lists Model Context Protocol (MCP) servers registered on the target server. Pass optional JSON input for route-supported filters.
788
+
789
+ ```bash
790
+ mastra api mcp list [input]
791
+ ```
792
+
793
+ #### `mastra api mcp get`
794
+
795
+ Gets metadata for one MCP server.
796
+
797
+ ```bash
798
+ mastra api mcp get <id>
799
+ ```
800
+
801
+ #### `mastra api mcp tool list`
802
+
803
+ Lists tools exposed by an MCP server. Pass optional JSON input for route-supported filters.
804
+
805
+ ```bash
806
+ mastra api mcp tool list <serverId> [input]
807
+ ```
808
+
809
+ #### `mastra api mcp tool get`
810
+
811
+ Gets metadata and schemas for one MCP tool.
812
+
813
+ ```bash
814
+ mastra api mcp tool get <serverId> <toolId>
815
+ ```
816
+
817
+ #### `mastra api mcp tool execute`
818
+
819
+ Executes an MCP tool with JSON input. Raw tool input is wrapped as the route `data` field unless you pass an explicit `data` object.
820
+
821
+ ```bash
822
+ mastra api mcp tool execute <serverId> <toolId> <input>
823
+ ```
824
+
825
+ #### `mastra api thread list`
826
+
827
+ Lists memory threads. Pass optional JSON input for route-supported filters.
828
+
829
+ ```bash
830
+ mastra api thread list [input]
831
+ ```
832
+
833
+ #### `mastra api thread get`
834
+
835
+ Gets one memory thread by ID.
836
+
837
+ ```bash
838
+ mastra api thread get <threadId>
839
+ ```
840
+
841
+ #### `mastra api thread create`
842
+
843
+ Creates a memory thread. Pass one JSON input object; the CLI splits fields such as `agentId` into query parameters when required by the server route.
844
+
845
+ ```bash
846
+ mastra api thread create <input>
847
+ ```
848
+
849
+ #### `mastra api thread update`
850
+
851
+ Updates a memory thread. Pass one JSON input object for fields such as `agentId`, `resourceId`, `title`, or `metadata`.
852
+
853
+ ```bash
854
+ mastra api thread update <threadId> <input>
855
+ ```
856
+
857
+ #### `mastra api thread delete`
858
+
859
+ Deletes a memory thread. Pass JSON input for route-required query parameters such as `agentId` and `resourceId`.
860
+
861
+ ```bash
862
+ mastra api thread delete <threadId> <input>
863
+ ```
864
+
865
+ #### `mastra api thread messages`
866
+
867
+ Lists messages for a memory thread. Pass optional JSON input for route-supported filters or pagination.
868
+
869
+ ```bash
870
+ mastra api thread messages <threadId> [input]
871
+ ```
872
+
873
+ #### `mastra api memory search`
874
+
875
+ Searches long-term memory. Use `--help` or `--schema` to inspect required fields such as `agentId`, `resourceId`, and `searchQuery`.
876
+
877
+ ```bash
878
+ mastra api memory search <input>
879
+ ```
880
+
881
+ #### `mastra api memory current get`
882
+
883
+ Reads current working memory for a thread.
884
+
885
+ ```bash
886
+ mastra api memory current get <input>
887
+ ```
888
+
889
+ #### `mastra api memory current update`
890
+
891
+ Updates current working memory for a thread. Working memory must be enabled for the memory instance.
892
+
893
+ ```bash
894
+ mastra api memory current update <input>
895
+ ```
896
+
897
+ #### `mastra api memory status`
898
+
899
+ Gets memory status for an agent and optional thread or resource context.
900
+
901
+ ```bash
902
+ mastra api memory status <input>
903
+ ```
904
+
905
+ #### `mastra api trace list`
906
+
907
+ Lists observability traces. Pass optional JSON input for route-supported filters or pagination.
908
+
909
+ ```bash
910
+ mastra api trace list [input]
911
+ ```
912
+
913
+ #### `mastra api trace get`
914
+
915
+ Gets one observability trace by ID.
916
+
917
+ ```bash
918
+ mastra api trace get <traceId>
919
+ ```
920
+
921
+ #### `mastra api log list`
922
+
923
+ Lists observability logs. Pass optional JSON input for route-supported filters or pagination.
924
+
925
+ ```bash
926
+ mastra api log list [input]
927
+ ```
928
+
929
+ #### `mastra api score create`
930
+
931
+ Creates an observability score. The input uses the server score body shape; inspect it with `--schema`.
932
+
933
+ ```bash
934
+ mastra api score create <input>
935
+ ```
936
+
937
+ #### `mastra api score list`
938
+
939
+ Lists observability scores. Pass optional JSON input for filters such as run ID or pagination.
940
+
941
+ ```bash
942
+ mastra api score list [input]
943
+ ```
944
+
945
+ #### `mastra api score get`
946
+
947
+ Gets one observability score by ID.
948
+
949
+ ```bash
950
+ mastra api score get <scoreId>
951
+ ```
952
+
953
+ #### `mastra api dataset list`
954
+
955
+ Lists datasets. Pass optional JSON input for route-supported filters or pagination.
956
+
957
+ ```bash
958
+ mastra api dataset list [input]
959
+ ```
960
+
961
+ #### `mastra api dataset get`
962
+
963
+ Gets one dataset by ID.
964
+
965
+ ```bash
966
+ mastra api dataset get <datasetId>
967
+ ```
968
+
969
+ #### `mastra api dataset create`
970
+
971
+ Creates a dataset with JSON input.
972
+
973
+ ```bash
974
+ mastra api dataset create <input>
975
+ ```
976
+
977
+ #### `mastra api dataset items`
978
+
979
+ Lists items in a dataset. Pass optional JSON input for route-supported filters or pagination.
980
+
981
+ ```bash
982
+ mastra api dataset items <datasetId> [input]
983
+ ```
984
+
985
+ #### `mastra api experiment list`
986
+
987
+ Lists experiments for a dataset. Pass optional JSON input for route-supported filters or pagination.
988
+
989
+ ```bash
990
+ mastra api experiment list <datasetId> [input]
991
+ ```
992
+
993
+ #### `mastra api experiment get`
994
+
995
+ Gets one experiment by ID.
996
+
997
+ ```bash
998
+ mastra api experiment get <datasetId> <experimentId>
999
+ ```
1000
+
1001
+ #### `mastra api experiment run`
1002
+
1003
+ Starts an experiment for a dataset with JSON input.
1004
+
1005
+ ```bash
1006
+ mastra api experiment run <datasetId> <input>
1007
+ ```
1008
+
1009
+ #### `mastra api experiment results`
1010
+
1011
+ Lists results for an experiment. Pass optional JSON input for route-supported filters or pagination.
1012
+
1013
+ ```bash
1014
+ mastra api experiment results <datasetId> <experimentId> [input]
1015
+ ```
1016
+
553
1017
  ## Common flags
554
1018
 
555
1019
  ### `--dir`
@@ -333,9 +333,9 @@ await agent.stream('message for agent', {
333
333
  })
334
334
  ```
335
335
 
336
- ## OpenAI WebSocket transport
336
+ ## Responses WebSocket transport
337
337
 
338
- 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.
338
+ Opt into Responses WebSocket streaming with provider options. This only applies to streaming calls and is supported for direct OpenAI models and Azure OpenAI Responses deployments. If WebSocket streaming is unavailable, Mastra falls back to HTTP streaming. By default, Mastra closes the WebSocket when the stream finishes.
339
339
 
340
340
  ```ts
341
341
  const stream = await agent.stream('Hello', {
@@ -351,6 +351,20 @@ const stream = await agent.stream('Hello', {
351
351
  })
352
352
  ```
353
353
 
354
+ For Azure OpenAI, configure the gateway with `useResponsesAPI: true`, then use `providerOptions.azure.transport`.
355
+
356
+ ```ts
357
+ const stream = await agent.stream('Hello', {
358
+ providerOptions: {
359
+ azure: {
360
+ transport: 'websocket',
361
+ store: false,
362
+ websocket: { closeOnFinish: true },
363
+ },
364
+ },
365
+ })
366
+ ```
367
+
354
368
  To keep the connection open after the stream finishes, set `closeOnFinish: false` and close it manually.
355
369
 
356
370
  ```ts
@@ -367,6 +381,8 @@ const stream = await agent.stream('Hello', {
367
381
  stream.transport?.close()
368
382
  ```
369
383
 
384
+ Responses WebSocket connections run one response at a time. Mastra rejects overlapping continuation requests that include `previous_response_id` on the same WebSocket transport. Wait for the active stream to finish before sending the next turn in the response chain.
385
+
370
386
  ## Related
371
387
 
372
388
  - [Generating responses](https://mastra.ai/docs/agents/overview)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.1.35-alpha.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`087e413`](https://github.com/mastra-ai/mastra/commit/087e4133e5d6efa36619e9556c16750e4179c047), [`087e413`](https://github.com/mastra-ai/mastra/commit/087e4133e5d6efa36619e9556c16750e4179c047), [`087e413`](https://github.com/mastra-ai/mastra/commit/087e4133e5d6efa36619e9556c16750e4179c047)]:
8
+ - @mastra/core@1.33.0-alpha.3
9
+
3
10
  ## 1.1.35-alpha.6
4
11
 
5
12
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.1.35-alpha.6",
3
+ "version": "1.1.35-alpha.8",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,8 +29,8 @@
29
29
  "jsdom": "^26.1.0",
30
30
  "local-pkg": "^1.1.2",
31
31
  "zod": "^4.3.6",
32
- "@mastra/mcp": "^1.7.0",
33
- "@mastra/core": "1.33.0-alpha.2"
32
+ "@mastra/core": "1.33.0-alpha.3",
33
+ "@mastra/mcp": "^1.7.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@hono/node-server": "^1.19.11",
@@ -47,8 +47,8 @@
47
47
  "typescript": "^6.0.3",
48
48
  "vitest": "4.1.5",
49
49
  "@internal/lint": "0.0.92",
50
- "@mastra/core": "1.33.0-alpha.2",
51
- "@internal/types-builder": "0.0.67"
50
+ "@internal/types-builder": "0.0.67",
51
+ "@mastra/core": "1.33.0-alpha.3"
52
52
  },
53
53
  "homepage": "https://mastra.ai",
54
54
  "repository": {