@mastra/mcp-docs-server 0.13.18 → 0.13.19-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.
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +17 -17
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +29 -0
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +16 -0
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +42 -42
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +64 -64
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +39 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +28 -28
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +30 -30
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +33 -33
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +53 -53
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +31 -31
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +26 -26
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fgithub.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Flance.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +26 -26
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Fmem0.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +34 -34
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +30 -30
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +47 -47
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Frag.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fragie.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +10 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +37 -37
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +16 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +16 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +18 -18
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +18 -18
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +17 -17
- package/.docs/organized/changelogs/create-mastra.md +27 -27
- package/.docs/organized/changelogs/mastra.md +57 -57
- package/.docs/organized/code-examples/ai-sdk-useChat.md +1 -1
- package/.docs/organized/code-examples/ai-sdk-v5.md +8 -8
- package/.docs/organized/code-examples/heads-up-game.md +5 -5
- package/.docs/organized/code-examples/workflow-with-suspend-resume.md +1 -0
- package/.docs/raw/auth/jwt.mdx +2 -2
- package/.docs/raw/auth/supabase.mdx +128 -0
- package/.docs/raw/deployment/overview.mdx +7 -7
- package/.docs/raw/getting-started/mcp-docs-server.mdx +52 -48
- package/.docs/raw/memory/overview.mdx +2 -2
- package/.docs/raw/rag/retrieval.mdx +19 -2
- package/.docs/raw/rag/vector-databases.mdx +39 -3
- package/.docs/raw/reference/auth/jwt.mdx +2 -3
- package/.docs/raw/reference/auth/supabase.mdx +62 -0
- package/.docs/raw/reference/{agents → core}/getAgent.mdx +1 -2
- package/.docs/raw/reference/core/getAgentById.mdx +43 -0
- package/.docs/raw/reference/core/getAgents.mdx +35 -0
- package/.docs/raw/reference/core/getDeployer.mdx +35 -0
- package/.docs/raw/reference/core/getLogger.mdx +35 -0
- package/.docs/raw/reference/core/getLogs.mdx +92 -0
- package/.docs/raw/reference/core/getLogsByRunId.mdx +84 -0
- package/.docs/raw/reference/core/getMCPServer.mdx +49 -0
- package/.docs/raw/reference/core/getMCPServers.mdx +35 -0
- package/.docs/raw/reference/core/getMemory.mdx +35 -0
- package/.docs/raw/reference/core/getServer.mdx +35 -0
- package/.docs/raw/reference/core/getStorage.mdx +35 -0
- package/.docs/raw/reference/core/getTelemetry.mdx +35 -0
- package/.docs/raw/reference/core/getVector.mdx +43 -0
- package/.docs/raw/reference/core/getVectors.mdx +35 -0
- package/.docs/raw/reference/core/getWorkflow.mdx +49 -0
- package/.docs/raw/reference/core/getWorkflows.mdx +44 -0
- package/.docs/raw/reference/core/mastra-class.mdx +14 -178
- package/.docs/raw/reference/core/setLogger.mdx +47 -0
- package/.docs/raw/reference/core/setStorage.mdx +39 -0
- package/.docs/raw/reference/core/setTelemetry.mdx +35 -0
- package/.docs/raw/reference/observability/providers/arize-ax.mdx +81 -0
- package/.docs/raw/reference/observability/providers/arize-phoenix.mdx +120 -0
- package/.docs/raw/reference/observability/providers/index.mdx +3 -1
- package/.docs/raw/reference/rag/metadata-filters.mdx +15 -0
- package/.docs/raw/reference/rag/s3vectors.mdx +386 -0
- package/.docs/raw/reference/tools/mcp-server.mdx +27 -26
- package/.docs/raw/tools-mcp/mcp-overview.mdx +5 -6
- package/.docs/raw/workflows/control-flow.mdx +2 -2
- package/.docs/raw/workflows/overview.mdx +8 -8
- package/.docs/raw/workflows/suspend-and-resume.mdx +4 -4
- package/CHANGELOG.md +18 -0
- package/package.json +5 -5
- package/.docs/raw/reference/workflows/execute.mdx +0 -131
- /package/.docs/raw/reference/workflows/{branch.mdx → workflow-methods/branch.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{commit.mdx → workflow-methods/commit.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{create-run.mdx → workflow-methods/create-run.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{dountil.mdx → workflow-methods/dountil.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{dowhile.mdx → workflow-methods/dowhile.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{foreach.mdx → workflow-methods/foreach.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{map.mdx → workflow-methods/map.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{parallel.mdx → workflow-methods/parallel.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{sendEvent.mdx → workflow-methods/sendEvent.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{sleep.mdx → workflow-methods/sleep.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{sleepUntil.mdx → workflow-methods/sleepUntil.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{then.mdx → workflow-methods/then.mdx} +0 -0
- /package/.docs/raw/reference/workflows/{waitForEvent.mdx → workflow-methods/waitForEvent.mdx} +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "MastraAuthSupabase Class"
|
|
3
|
+
description: "API reference for the MastraAuthSupabase class, which authenticates Mastra applications using Supabase Auth."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# MastraAuthSupabase Class
|
|
7
|
+
|
|
8
|
+
The `MastraAuthSupabase` class provides authentication for Mastra using Supabase Auth. It verifies incoming requests using Supabase's authentication system and integrates with the Mastra server using the `experimental_auth` option.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript filename="src/mastra/index.ts" showLineNumbers copy
|
|
13
|
+
import { Mastra } from "@mastra/core/mastra";
|
|
14
|
+
import { MastraAuthSupabase } from '@mastra/auth-supabase';
|
|
15
|
+
|
|
16
|
+
export const mastra = new Mastra({
|
|
17
|
+
// ..
|
|
18
|
+
server: {
|
|
19
|
+
experimental_auth: new MastraAuthSupabase({
|
|
20
|
+
url: process.env.SUPABASE_URL,
|
|
21
|
+
anonKey: process.env.SUPABASE_ANON_KEY
|
|
22
|
+
}),
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Constructor parameters
|
|
28
|
+
|
|
29
|
+
<PropertiesTable
|
|
30
|
+
content={[
|
|
31
|
+
{
|
|
32
|
+
name: "url",
|
|
33
|
+
type: "string",
|
|
34
|
+
description: "The URL of your Supabase project. Can be found in your Supabase project settings.",
|
|
35
|
+
isOptional: true,
|
|
36
|
+
defaultValue: "process.env.SUPABASE_URL"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "anonKey",
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "The anonymous/public key for your Supabase project. Used for client-side authentication.",
|
|
42
|
+
isOptional: true,
|
|
43
|
+
defaultValue: "process.env.SUPABASE_ANON_KEY"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "name",
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Custom name for the auth provider instance.",
|
|
49
|
+
isOptional: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "authorizeUser",
|
|
53
|
+
type: "(user: User, request: HoneRequest) => Promise<boolean> | boolean",
|
|
54
|
+
description: "Custom authorization function to determine if a user should be granted access. Called after token verification. By default, checks the 'isAdmin' column in the 'users' table.",
|
|
55
|
+
isOptional: true,
|
|
56
|
+
},
|
|
57
|
+
]}
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
## Related
|
|
61
|
+
|
|
62
|
+
[MastraAuthSupabase](/docs/auth/supabase.mdx)
|
|
@@ -3,7 +3,7 @@ title: "Reference: Agent.getAgent() | Agents | Mastra Docs"
|
|
|
3
3
|
description: "Documentation for the `Agent.getAgent()` method in Mastra, which retrieves an agent by name."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Mastra.getAgent()
|
|
7
7
|
|
|
8
8
|
The `.getAgent()` method is used to retrieve an agent. The method accepts a single `string` parameter for the agent's name.
|
|
9
9
|
|
|
@@ -13,7 +13,6 @@ The `.getAgent()` method is used to retrieve an agent. The method accepts a sing
|
|
|
13
13
|
mastra.getAgent("testAgent");
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
## Parameters
|
|
18
17
|
|
|
19
18
|
<PropertiesTable
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getAgentById() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getAgentById()` method in Mastra, which retrieves an agent by its ID."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getAgentById()
|
|
7
|
+
|
|
8
|
+
The `.getAgentById()` method is used to retrieve an agent by its ID. The method accepts a single `string` parameter for the agent's ID.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getAgentById("test-agent-123");
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
<PropertiesTable
|
|
19
|
+
content={[
|
|
20
|
+
{
|
|
21
|
+
name: "id",
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "The ID of the agent to retrieve. The method will first search for an agent with this ID, and if not found, will attempt to use it as a name to call getAgent().",
|
|
24
|
+
},
|
|
25
|
+
]}
|
|
26
|
+
/>
|
|
27
|
+
|
|
28
|
+
## Returns
|
|
29
|
+
|
|
30
|
+
<PropertiesTable
|
|
31
|
+
content={[
|
|
32
|
+
{
|
|
33
|
+
name: "agent",
|
|
34
|
+
type: "Agent",
|
|
35
|
+
description: "The agent instance with the specified ID. Throws an error if the agent is not found.",
|
|
36
|
+
},
|
|
37
|
+
]}
|
|
38
|
+
/>
|
|
39
|
+
|
|
40
|
+
## Related
|
|
41
|
+
|
|
42
|
+
- [Agents overview](../../docs/agents/overview.mdx)
|
|
43
|
+
- [Dynamic agents](../../docs/agents/dynamic-agents.mdx)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getAgents() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getAgents()` method in Mastra, which retrieves all configured agents."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getAgents()
|
|
7
|
+
|
|
8
|
+
The `.getAgents()` method is used to retrieve all agents that have been configured in the Mastra instance.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getAgents();
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
This method does not accept any parameters.
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
<PropertiesTable
|
|
23
|
+
content={[
|
|
24
|
+
{
|
|
25
|
+
name: "agents",
|
|
26
|
+
type: "TAgents",
|
|
27
|
+
description: "A record of all configured agents, where keys are agent names and values are agent instances.",
|
|
28
|
+
},
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
## Related
|
|
33
|
+
|
|
34
|
+
- [Agents overview](../../docs/agents/overview.mdx)
|
|
35
|
+
- [Dynamic agents](../../docs/agents/dynamic-agents.mdx)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getDeployer() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getDeployer()` method in Mastra, which retrieves the configured deployer instance."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getDeployer()
|
|
7
|
+
|
|
8
|
+
The `.getDeployer()` method is used to retrieve the deployer instance that has been configured in the Mastra instance.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getDeployer();
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
This method does not accept any parameters.
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
<PropertiesTable
|
|
23
|
+
content={[
|
|
24
|
+
{
|
|
25
|
+
name: "deployer",
|
|
26
|
+
type: "MastraDeployer | undefined",
|
|
27
|
+
description: "The configured deployer instance, or undefined if no deployer has been configured.",
|
|
28
|
+
},
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
## Related
|
|
33
|
+
|
|
34
|
+
- [Deployment overview](../../docs/deployment/overview.mdx)
|
|
35
|
+
- [Deployer reference](../../reference/deployer/deployer.mdx)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getLogger() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getLogger()` method in Mastra, which retrieves the configured logger instance."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getLogger()
|
|
7
|
+
|
|
8
|
+
The `.getLogger()` method is used to retrieve the logger instance that has been configured in the Mastra instance.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getLogger();
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
This method does not accept any parameters.
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
<PropertiesTable
|
|
23
|
+
content={[
|
|
24
|
+
{
|
|
25
|
+
name: "logger",
|
|
26
|
+
type: "TLogger",
|
|
27
|
+
description: "The configured logger instance used for logging across all components (agents, workflows, etc.).",
|
|
28
|
+
},
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
## Related
|
|
33
|
+
|
|
34
|
+
- [Logging overview](../../docs/observability/logging.mdx)
|
|
35
|
+
- [Logger reference](../../reference/observability/logger.mdx)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getLogs() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getLogs()` method in Mastra, which retrieves all logs for a specific transport ID."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getLogs()
|
|
7
|
+
|
|
8
|
+
The `.getLogs()` method is used to retrieve all logs for a specific transport ID. This method requires a configured logger that supports the `getLogs` operation.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getLogs("456");
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
<PropertiesTable
|
|
19
|
+
content={[
|
|
20
|
+
{
|
|
21
|
+
name: "transportId",
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "The transport ID to retrieve logs from.",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "options",
|
|
27
|
+
type: "object",
|
|
28
|
+
description: "Optional parameters for filtering and pagination. See Options section below for details.",
|
|
29
|
+
optional: true,
|
|
30
|
+
},
|
|
31
|
+
]}
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
### Options
|
|
35
|
+
|
|
36
|
+
<PropertiesTable
|
|
37
|
+
content={[
|
|
38
|
+
{
|
|
39
|
+
name: "fromDate",
|
|
40
|
+
type: "Date",
|
|
41
|
+
description: "Optional start date for filtering logs. e.g., new Date('2024-01-01').",
|
|
42
|
+
optional: true,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "toDate",
|
|
46
|
+
type: "Date",
|
|
47
|
+
description: "Optional end date for filtering logs. e.g., new Date('2024-01-31').",
|
|
48
|
+
optional: true,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "logLevel",
|
|
52
|
+
type: "LogLevel",
|
|
53
|
+
description: "Optional log level to filter by.",
|
|
54
|
+
optional: true,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "filters",
|
|
58
|
+
type: "Record<string, any>",
|
|
59
|
+
description: "Optional additional filters to apply to the log query.",
|
|
60
|
+
optional: true,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "page",
|
|
64
|
+
type: "number",
|
|
65
|
+
description: "Optional page number for pagination.",
|
|
66
|
+
optional: true,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "perPage",
|
|
70
|
+
type: "number",
|
|
71
|
+
description: "Optional number of logs per page for pagination.",
|
|
72
|
+
optional: true,
|
|
73
|
+
},
|
|
74
|
+
]}
|
|
75
|
+
/>
|
|
76
|
+
|
|
77
|
+
## Returns
|
|
78
|
+
|
|
79
|
+
<PropertiesTable
|
|
80
|
+
content={[
|
|
81
|
+
{
|
|
82
|
+
name: "logs",
|
|
83
|
+
type: "Promise<any>",
|
|
84
|
+
description: "A promise that resolves to the logs for the specified transport ID.",
|
|
85
|
+
},
|
|
86
|
+
]}
|
|
87
|
+
/>
|
|
88
|
+
|
|
89
|
+
## Related
|
|
90
|
+
|
|
91
|
+
- [Logging overview](../../docs/observability/logging.mdx)
|
|
92
|
+
- [Logger reference](../../reference/observability/logger.mdx)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getLogsByRunId() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getLogsByRunId()` method in Mastra, which retrieves logs for a specific run ID and transport ID."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getLogsByRunId()
|
|
7
|
+
|
|
8
|
+
The `.getLogsByRunId()` method is used to retrieve logs for a specific run ID and transport ID. This method requires a configured logger that supports the `getLogsByRunId` operation.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getLogsByRunId({ runId: "123", transportId: "456" });
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
<PropertiesTable
|
|
19
|
+
content={[
|
|
20
|
+
{
|
|
21
|
+
name: "runId",
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "The run ID to retrieve logs for.",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "transportId",
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "The transport ID to retrieve logs from.",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "fromDate",
|
|
32
|
+
type: "Date",
|
|
33
|
+
description: "Optional start date for filtering logs. e.g., new Date('2024-01-01').",
|
|
34
|
+
optional: true,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "toDate",
|
|
38
|
+
type: "Date",
|
|
39
|
+
description: "Optional end date for filtering logs. e.g., new Date('2024-01-31').",
|
|
40
|
+
optional: true,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "logLevel",
|
|
44
|
+
type: "LogLevel",
|
|
45
|
+
description: "Optional log level to filter by.",
|
|
46
|
+
optional: true,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "filters",
|
|
50
|
+
type: "Record<string, any>",
|
|
51
|
+
description: "Optional additional filters to apply to the log query.",
|
|
52
|
+
optional: true,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "page",
|
|
56
|
+
type: "number",
|
|
57
|
+
description: "Optional page number for pagination.",
|
|
58
|
+
optional: true,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "perPage",
|
|
62
|
+
type: "number",
|
|
63
|
+
description: "Optional number of logs per page for pagination.",
|
|
64
|
+
optional: true,
|
|
65
|
+
},
|
|
66
|
+
]}
|
|
67
|
+
/>
|
|
68
|
+
|
|
69
|
+
## Returns
|
|
70
|
+
|
|
71
|
+
<PropertiesTable
|
|
72
|
+
content={[
|
|
73
|
+
{
|
|
74
|
+
name: "logs",
|
|
75
|
+
type: "Promise<any>",
|
|
76
|
+
description: "A promise that resolves to the logs for the specified run ID and transport ID.",
|
|
77
|
+
},
|
|
78
|
+
]}
|
|
79
|
+
/>
|
|
80
|
+
|
|
81
|
+
## Related
|
|
82
|
+
|
|
83
|
+
- [Logging overview](../../docs/observability/logging.mdx)
|
|
84
|
+
- [Logger reference](../../reference/observability/logger.mdx)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getMCPServer() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getMCPServer()` method in Mastra, which retrieves a specific MCP server instance by ID and optional version."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getMCPServer()
|
|
7
|
+
|
|
8
|
+
The `.getMCPServer()` method is used to retrieve a specific MCP server instance by its logical ID and optional version. If a version is provided, it attempts to find the server with that exact logical ID and version. If no version is provided, it returns the server with the specified logical ID that has the most recent releaseDate.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getMCPServer("1.2.0");
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
<PropertiesTable
|
|
19
|
+
content={[
|
|
20
|
+
{
|
|
21
|
+
name: "serverId",
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "The logical ID of the MCP server to retrieve. Should match the `id` property of the MCPServer instance.",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "version",
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Optional specific version of the MCP server to retrieve. If not provided, returns the server with the most recent releaseDate.",
|
|
29
|
+
optional: true,
|
|
30
|
+
},
|
|
31
|
+
]}
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
## Returns
|
|
35
|
+
|
|
36
|
+
<PropertiesTable
|
|
37
|
+
content={[
|
|
38
|
+
{
|
|
39
|
+
name: "server",
|
|
40
|
+
type: "MCPServerBase | undefined",
|
|
41
|
+
description: "The MCP server instance with the specified ID and version, or undefined if not found or if the specific version is not found.",
|
|
42
|
+
},
|
|
43
|
+
]}
|
|
44
|
+
/>
|
|
45
|
+
|
|
46
|
+
## Related
|
|
47
|
+
|
|
48
|
+
- [MCP overview](../../docs/tools-mcp/mcp-overview.mdx)
|
|
49
|
+
- [MCP server reference](../../reference/tools/mcp-server.mdx)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getMCPServers() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getMCPServers()` method in Mastra, which retrieves all registered MCP server instances."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getMCPServers()
|
|
7
|
+
|
|
8
|
+
The `.getMCPServers()` method is used to retrieve all MCP server instances that have been registered in the Mastra instance.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getMCPServers();
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
This method does not accept any parameters.
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
<PropertiesTable
|
|
23
|
+
content={[
|
|
24
|
+
{
|
|
25
|
+
name: "servers",
|
|
26
|
+
type: "Record<string, MCPServerBase> | undefined",
|
|
27
|
+
description: "A record of all registered MCP server instances, where keys are server IDs and values are MCPServerBase instances, or undefined if no servers are registered.",
|
|
28
|
+
},
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
## Related
|
|
33
|
+
|
|
34
|
+
- [MCP overview](../../docs/tools-mcp/mcp-overview.mdx)
|
|
35
|
+
- [MCP server reference](../../reference/tools/mcp-server.mdx)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getMemory() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getMemory()` method in Mastra, which retrieves the configured memory instance."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getMemory()
|
|
7
|
+
|
|
8
|
+
The `.getMemory()` method is used to retrieve the memory instance that has been configured in the Mastra instance.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getMemory();
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
This method does not accept any parameters.
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
<PropertiesTable
|
|
23
|
+
content={[
|
|
24
|
+
{
|
|
25
|
+
name: "memory",
|
|
26
|
+
type: "MastraMemory | undefined",
|
|
27
|
+
description: "The configured memory instance, or undefined if no memory has been configured.",
|
|
28
|
+
},
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
## Related
|
|
33
|
+
|
|
34
|
+
- [Memory overview](../../docs/memory/overview.mdx)
|
|
35
|
+
- [Memory reference](../../reference/memory/Memory.mdx)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getServer() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getServer()` method in Mastra, which retrieves the configured server configuration."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getServer()
|
|
7
|
+
|
|
8
|
+
The `.getServer()` method is used to retrieve the server configuration that has been configured in the Mastra instance.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getServer();
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
This method does not accept any parameters.
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
<PropertiesTable
|
|
23
|
+
content={[
|
|
24
|
+
{
|
|
25
|
+
name: "server",
|
|
26
|
+
type: "ServerConfig | undefined",
|
|
27
|
+
description: "The configured server configuration including port, timeout, API routes, middleware, CORS settings, and build options, or undefined if no server has been configured.",
|
|
28
|
+
},
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
## Related
|
|
33
|
+
|
|
34
|
+
- [Server deployment](../../docs/deployment/server-deployment.mdx)
|
|
35
|
+
- [Server configuration](../../docs/server-db/custom-api-routes.mdx)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getStorage() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getStorage()` method in Mastra, which retrieves the configured storage instance."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getStorage()
|
|
7
|
+
|
|
8
|
+
The `.getStorage()` method is used to retrieve the storage instance that has been configured in the Mastra instance.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getStorage();
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
This method does not accept any parameters.
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
<PropertiesTable
|
|
23
|
+
content={[
|
|
24
|
+
{
|
|
25
|
+
name: "storage",
|
|
26
|
+
type: "MastraStorage | undefined",
|
|
27
|
+
description: "The configured storage instance, or undefined if no storage has been configured.",
|
|
28
|
+
},
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
## Related
|
|
33
|
+
|
|
34
|
+
- [Storage overview](../../docs/server-db/storage.mdx)
|
|
35
|
+
- [Storage reference](../../reference/storage/libsql.mdx)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getTelemetry() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getTelemetry()` method in Mastra, which retrieves the configured telemetry instance."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getTelemetry()
|
|
7
|
+
|
|
8
|
+
The `.getTelemetry()` method is used to retrieve the telemetry instance that has been configured in the Mastra instance.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getTelemetry();
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
This method does not accept any parameters.
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
<PropertiesTable
|
|
23
|
+
content={[
|
|
24
|
+
{
|
|
25
|
+
name: "telemetry",
|
|
26
|
+
type: "Telemetry | undefined",
|
|
27
|
+
description: "The configured telemetry instance used for tracing and observability across all components, or undefined if no telemetry has been configured.",
|
|
28
|
+
},
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
## Related
|
|
33
|
+
|
|
34
|
+
- [AI tracing](../../docs/observability/ai-tracing.mdx)
|
|
35
|
+
- [Telemetry reference](../../reference/observability/otel-config.mdx)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Mastra.getVector() | Core | Mastra Docs"
|
|
3
|
+
description: "Documentation for the `Mastra.getVector()` method in Mastra, which retrieves a vector store by name."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mastra.getVector()
|
|
7
|
+
|
|
8
|
+
The `.getVector()` method is used to retrieve a vector store by its name. The method accepts a single `string` parameter for the vector store's name.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript copy
|
|
13
|
+
mastra.getVector("testVectorStore");
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
<PropertiesTable
|
|
19
|
+
content={[
|
|
20
|
+
{
|
|
21
|
+
name: "name",
|
|
22
|
+
type: "TVectorName extends keyof TVectors",
|
|
23
|
+
description: "The name of the vector store to retrieve. Must be a valid vector store name that exists in the Mastra configuration.",
|
|
24
|
+
},
|
|
25
|
+
]}
|
|
26
|
+
/>
|
|
27
|
+
|
|
28
|
+
## Returns
|
|
29
|
+
|
|
30
|
+
<PropertiesTable
|
|
31
|
+
content={[
|
|
32
|
+
{
|
|
33
|
+
name: "vector",
|
|
34
|
+
type: "TVectors[TVectorName]",
|
|
35
|
+
description: "The vector store instance with the specified name. Throws an error if the vector store is not found.",
|
|
36
|
+
},
|
|
37
|
+
]}
|
|
38
|
+
/>
|
|
39
|
+
|
|
40
|
+
## Related
|
|
41
|
+
|
|
42
|
+
- [Vector stores overview](../../docs/rag/vector-databases.mdx)
|
|
43
|
+
- [RAG overview](../../docs/rag/overview.mdx)
|