@mastra/mcp-docs-server 1.3.5-alpha.14 → 1.3.5-alpha.18
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/docs/agents/overview.md +1 -1
- package/.docs/docs/auth/composite-auth.md +1 -1
- package/.docs/docs/auth/custom-auth-provider.md +28 -22
- package/.docs/docs/auth/jwt.md +1 -1
- package/.docs/docs/auth/overview.md +2 -2
- package/.docs/docs/auth/simple-auth.md +6 -1
- package/.docs/docs/browser.md +1 -2
- package/.docs/docs/deployment/overview.md +1 -1
- package/.docs/docs/deployment/web-framework.md +1 -1
- package/.docs/docs/evals/built-in-scorers.md +2 -2
- package/.docs/docs/guides/overview.md +15 -0
- package/.docs/docs/harness/agent-controller.md +7 -10
- package/.docs/docs/mastra-platform/configuration.md +1 -1
- package/.docs/docs/observability/overview.md +0 -5
- package/.docs/docs/sandbox/filesystem.md +12 -12
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/integrations/voice/livekit.md +449 -2
- package/.docs/models/gateways/netlify.md +2 -1
- package/.docs/models/gateways/openrouter.md +3 -1
- package/.docs/models/gateways/vercel.md +6 -2
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/aki-io.md +12 -12
- package/.docs/models/providers/edenai.md +15 -13
- package/.docs/models/providers/kilo.md +10 -9
- package/.docs/models/providers/llmgateway-providers.md +4 -1
- package/.docs/models/providers/llmgateway.md +2 -1
- package/.docs/models/providers/mistral.md +7 -6
- package/.docs/models/providers/nano-gpt.md +2 -3
- package/.docs/models/providers/opencode-go.md +2 -2
- package/.docs/models/providers/opencode.md +3 -1
- package/.docs/models/providers/requesty.md +3 -1
- package/.docs/models/providers/the-grid-ai.md +19 -12
- package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
- package/.docs/reference/agent-controller/session.md +18 -11
- package/.docs/reference/agents/createSkill.md +1 -2
- package/.docs/reference/agents/getModel.md +1 -1
- package/.docs/reference/agents/getSkill.md +6 -1
- package/.docs/reference/agents/listSkills.md +0 -1
- package/.docs/reference/auth/jwt.md +1 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +13 -11
- package/.docs/reference/cli/create-mastra.md +1 -1
- package/.docs/reference/client-js/agent-controller.md +19 -3
- package/.docs/reference/client-js/conversations.md +1 -1
- package/.docs/reference/client-js/mastra-client.md +2 -2
- package/.docs/reference/client-js/workflows.md +18 -2
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -1
- package/.docs/reference/memory/observational-memory.md +2 -0
- package/.docs/reference/tools/mcp-server.md +1 -1
- package/.docs/reference/vectors/lance.md +56 -10
- package/package.json +5 -5
|
@@ -187,7 +187,7 @@ Use `--no-skills` or `--no-git` to skip these steps. Skills and Git setup failur
|
|
|
187
187
|
- `--llm` and `--llm-api-key` are only valid for the default starter project.
|
|
188
188
|
- The project name must be a safe, lowercase, single directory name and the target must not already exist.
|
|
189
189
|
|
|
190
|
-
Invalid
|
|
190
|
+
Invalid flags, project names, and GitHub URLs are rejected before any project files are created. An unknown template name is rejected after the template list is fetched, and the CLI prints the available templates.
|
|
191
191
|
|
|
192
192
|
## Arguments and flags
|
|
193
193
|
|
|
@@ -39,12 +39,22 @@ Retrieve the agent controllers hosted on the connected Mastra instance:
|
|
|
39
39
|
const controllers = await client.listAgentControllers()
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
Each entry's `id` is the key the controller is registered under in `new Mastra({ agentControllers })`, not the controller's own `id`.
|
|
43
|
+
|
|
42
44
|
## Working with a specific agent controller
|
|
43
45
|
|
|
44
|
-
Get an instance of an agent controller by the
|
|
46
|
+
Get an instance of an agent controller by the key it's registered under in `new Mastra({ agentControllers })`. The key can differ from the controller's `id`. In this example, pass `'coding'`, not `'coding-controller'`:
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
const codingController = new AgentController({ id: 'coding-controller', agent, modes })
|
|
50
|
+
|
|
51
|
+
export const mastra = new Mastra({
|
|
52
|
+
agentControllers: { coding: codingController },
|
|
53
|
+
})
|
|
54
|
+
```
|
|
45
55
|
|
|
46
56
|
```typescript
|
|
47
|
-
const controller = client.getAgentController('coding
|
|
57
|
+
const controller = client.getAgentController('coding')
|
|
48
58
|
```
|
|
49
59
|
|
|
50
60
|
### `listModes()`
|
|
@@ -155,7 +165,13 @@ Switches the active mode.
|
|
|
155
165
|
|
|
156
166
|
### `switchModel(modelId, options?)`
|
|
157
167
|
|
|
158
|
-
Switches the model
|
|
168
|
+
Switches the session's active model and persists it as the current model for the active thread. Switching modes doesn't change it. Pass `{ thinkingLevel }` as the second argument to apply and persist a thinking level with the model.
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
await session.switchModel('anthropic/claude-sonnet-4-6', {
|
|
172
|
+
thinkingLevel: 'high',
|
|
173
|
+
})
|
|
174
|
+
```
|
|
159
175
|
|
|
160
176
|
### `listThreads(options?)`
|
|
161
177
|
|
|
@@ -122,7 +122,7 @@ console.log(items.data)
|
|
|
122
122
|
- `data`: Conversation items such as `message`, `function_call`, and `function_call_output`
|
|
123
123
|
- `first_id`: The first item ID in the page
|
|
124
124
|
- `last_id`: The last item ID in the page
|
|
125
|
-
- `has_more`:
|
|
125
|
+
- `has_more`: Currently always `false`. `items.list()` returns up to 1000 items in a single response.
|
|
126
126
|
|
|
127
127
|
## Parameters
|
|
128
128
|
|
|
@@ -59,9 +59,9 @@ You can also pass `requestContext` as a `Record<string, any>`.
|
|
|
59
59
|
|
|
60
60
|
**getAgent(agentId)** (`Agent`): Retrieves a specific agent instance by ID.
|
|
61
61
|
|
|
62
|
-
**listAgentControllers()** (`Promise<AgentControllerInfo[]>`): Returns the agent controllers hosted on the connected Mastra instance.
|
|
62
|
+
**listAgentControllers()** (`Promise<AgentControllerInfo[]>`): Returns the agent controllers hosted on the connected Mastra instance. Each entry's id is the key the controller is registered under in new Mastra({ agentControllers }).
|
|
63
63
|
|
|
64
|
-
**getAgentController(controllerId)** (`AgentController`): Retrieves a specific agent controller by
|
|
64
|
+
**getAgentController(controllerId)** (`AgentController`): Retrieves a specific agent controller by the key it is registered under in new Mastra({ agentControllers }), which can differ from the controller id. .session(resourceId) returns a session client; call await session.create() to create or resume the server session.
|
|
65
65
|
|
|
66
66
|
**listMemoryThreads(params)** (`Promise<StorageThreadType[]>`): Retrieves memory threads for the specified resource and agent. Requires a resourceId and an agentId.
|
|
67
67
|
|
|
@@ -223,9 +223,25 @@ A workflow run result yields the following:
|
|
|
223
223
|
|
|
224
224
|
**runId** (`string`): Unique identifier for this workflow run instance
|
|
225
225
|
|
|
226
|
-
**
|
|
226
|
+
**workflowName** (`string`): Name of the workflow this run belongs to
|
|
227
227
|
|
|
228
|
-
**
|
|
228
|
+
**resourceId** (`string`): Resource ID associated with the run, if one was set
|
|
229
|
+
|
|
230
|
+
**createdAt** (`string`): ISO 8601 timestamp of when the run was created
|
|
231
|
+
|
|
232
|
+
**updatedAt** (`string`): ISO 8601 timestamp of when the run was last updated
|
|
233
|
+
|
|
234
|
+
**status** (`WorkflowRunStatus`): Current status of the run, such as 'running', 'success', 'failed', 'suspended', 'waiting', or 'canceled'
|
|
235
|
+
|
|
236
|
+
**payload** (`Record<string, any>`): Input data the run was started with
|
|
237
|
+
|
|
238
|
+
**result** (`Record<string, any>`): Final output of the workflow when the run succeeded
|
|
239
|
+
|
|
240
|
+
**error** (`SerializedError`): Error details when the run failed
|
|
241
|
+
|
|
242
|
+
**steps** (`Record<string, WorkflowStateStepResult>`): Per-step results, including status, output, payload, and timing
|
|
243
|
+
|
|
244
|
+
Use the `fields` option to limit which optional fields are returned. Metadata fields and `status` are always included.
|
|
229
245
|
|
|
230
246
|
## Dynamic workflows
|
|
231
247
|
|
|
@@ -58,7 +58,7 @@ const { controller } = await mountAgentControllerOnMastra({ mastra })
|
|
|
58
58
|
|
|
59
59
|
**mastra** (`Mastra`): Existing Mastra instance to mount onto. When omitted, a Mastra is created that owns the controller storage.
|
|
60
60
|
|
|
61
|
-
**controllerId** (`string`):
|
|
61
|
+
**controllerId** (`string`): Key the controller is registered under on the Mastra instance. Clients pass this key to client.getAgentController(). (Default: `controller.id`)
|
|
62
62
|
|
|
63
63
|
**modes** (`AgentControllerMode[]`): Override agent modes (model ids, colors, which modes exist). (Default: `build/plan/fast`)
|
|
64
64
|
|
|
@@ -592,6 +592,8 @@ Emitted when observation or reflection fails. The system falls back to synchrono
|
|
|
592
592
|
|
|
593
593
|
**error** (`string`): Error message.
|
|
594
594
|
|
|
595
|
+
**retrying** (`true`): Set when a reflection attempt did not compress below its target and OM is retrying at a higher compression level. A new start marker follows, so this failure is not final. Absent on final failures.
|
|
596
|
+
|
|
595
597
|
**observations** (`string`): Any partial content available for display.
|
|
596
598
|
|
|
597
599
|
**recordId** (`string`): The OM record ID.
|
|
@@ -1395,7 +1395,7 @@ const server = new MCPServer({
|
|
|
1395
1395
|
})
|
|
1396
1396
|
```
|
|
1397
1397
|
|
|
1398
|
-
Link a tool to its app resource by setting `mcp._meta.ui.resourceUri` in `createTool()` to the matching `ui://` URI. The server normalizes this metadata for older hosts when listing tools. Visit [MCP Apps](https://mastra.ai/docs/connections/mcp) for the full app bridge API and usage patterns.
|
|
1398
|
+
Link a tool to its app resource by setting `mcp._meta.ui.resourceUri` in `createTool()` to the matching `ui://` URI. The server normalizes this metadata for older hosts when listing tools, and returns the same link on successful tool call results. Visit [MCP Apps](https://mastra.ai/docs/connections/mcp) for the full app bridge API and usage patterns.
|
|
1399
1399
|
|
|
1400
1400
|
## Related information
|
|
1401
1401
|
|
|
@@ -49,15 +49,17 @@ const s3Store = await LanceVectorStore.create('s3://bucket/db', {
|
|
|
49
49
|
|
|
50
50
|
#### `LanceIndexConfig`
|
|
51
51
|
|
|
52
|
-
**type** (`'ivfflat' | 'hnsw'`): Index type (Default: `hnsw`)
|
|
52
|
+
**type** (`'ivfflat' | 'ivfpq' | 'hnsw'`): Index type (Default: `hnsw`)
|
|
53
53
|
|
|
54
|
-
**type.ivfflat** (`ivfflat`): Clusters vectors into
|
|
54
|
+
**type.ivfflat** (`ivfflat`): Clusters vectors into partitions and stores full vectors. Searches compute exact distances only within the probed partitions, so closer vectors in other partitions can be missed.
|
|
55
|
+
|
|
56
|
+
**type.ivfpq** (`ivfpq`): IVF index with product quantization. Uses less memory than ivfflat with lower recall.
|
|
55
57
|
|
|
56
58
|
**type.hnsw** (`hnsw`): Graph-based index offering fast search times and high recall.
|
|
57
59
|
|
|
58
60
|
**numPartitions** (`number`): Number of partitions for IVF indexes (Default: `128`)
|
|
59
61
|
|
|
60
|
-
**numSubVectors** (`number`): Number of sub-vectors for product quantization (Default: `16`)
|
|
62
|
+
**numSubVectors** (`number`): Number of sub-vectors for product quantization. Only applies to ivfpq (Default: `16`)
|
|
61
63
|
|
|
62
64
|
**hnsw** (`HNSWConfig`): HNSW configuration
|
|
63
65
|
|
|
@@ -137,16 +139,60 @@ interface IndexStats {
|
|
|
137
139
|
dimension: number
|
|
138
140
|
count: number
|
|
139
141
|
metric: 'cosine' | 'euclidean' | 'dotproduct'
|
|
140
|
-
type: 'ivfflat' | 'hnsw'
|
|
141
|
-
config: {
|
|
142
|
-
m?: number
|
|
143
|
-
efConstruction?: number
|
|
144
|
-
numPartitions?: number
|
|
145
|
-
numSubVectors?: number
|
|
146
|
-
}
|
|
147
142
|
}
|
|
148
143
|
```
|
|
149
144
|
|
|
145
|
+
### `getIndexCoverage()`
|
|
146
|
+
|
|
147
|
+
**tableName** (`string`): Table to inspect. Defaults to indexName when omitted.
|
|
148
|
+
|
|
149
|
+
**indexName** (`string`): Used as the table name when tableName is omitted, matching upsert() and query().
|
|
150
|
+
|
|
151
|
+
Returns one entry per index on the table:
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
interface LanceIndexCoverage {
|
|
155
|
+
indexName: string
|
|
156
|
+
indexType: string
|
|
157
|
+
columns: string[]
|
|
158
|
+
numIndexedRows: number
|
|
159
|
+
numUnindexedRows: number
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### `optimize()`
|
|
164
|
+
|
|
165
|
+
Runs LanceDB table maintenance. It compacts data files, adds rows written since the index was built to the existing index, and removes old table versions. Mastra never calls it automatically. Concurrent calls for the same table in one process share a single run.
|
|
166
|
+
|
|
167
|
+
**tableName** (`string`): Table to optimize. Defaults to indexName when omitted.
|
|
168
|
+
|
|
169
|
+
**indexName** (`string`): Used as the table name when tableName is omitted.
|
|
170
|
+
|
|
171
|
+
**cleanupOlderThan** (`Date`): Remove table versions older than this date. When omitted, LanceDB keeps versions from the last 7 days.
|
|
172
|
+
|
|
173
|
+
**deleteUnverified** (`boolean`): Also delete unverified files newer than 7 days. Only set this when no other process writes to the table, or the table can be corrupted. (Default: `false`)
|
|
174
|
+
|
|
175
|
+
Returns LanceDB `OptimizeStats` (compaction and pruning counts).
|
|
176
|
+
|
|
177
|
+
#### When to optimize
|
|
178
|
+
|
|
179
|
+
`upsert()` writes rows outside the existing vector index. `query()` still returns those rows by scanning them without the index, so results stay complete, but queries get slower as unindexed rows grow. LanceDB's `fastSearch()` skips unindexed rows entirely.
|
|
180
|
+
|
|
181
|
+
`optimize()` adds new rows to the existing index without retraining it. If your data distribution has changed a lot, rebuild the index with `deleteIndex()` and `createIndex()` instead.
|
|
182
|
+
|
|
183
|
+
LanceDB suggests optimizing after roughly 100,000 modified rows or 20 write operations. Use `getIndexCoverage()` to build your own policy:
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
const [coverage] = await store.getIndexCoverage({ indexName: 'docs' })
|
|
187
|
+
const total = coverage.numIndexedRows + coverage.numUnindexedRows
|
|
188
|
+
|
|
189
|
+
if (coverage.numUnindexedRows >= 1_000 && coverage.numUnindexedRows / total >= 0.1) {
|
|
190
|
+
await store.optimize({ indexName: 'docs' })
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Managed LanceDB Cloud and Enterprise maintain tables automatically, so you don't need to call `optimize()` there.
|
|
195
|
+
|
|
150
196
|
### `deleteIndex()`
|
|
151
197
|
|
|
152
198
|
**indexName** (`string`): Name of the index to delete
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.3.5-alpha.
|
|
3
|
+
"version": "1.3.5-alpha.18",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@mastra/mcp-legacy": "npm:@mastra/mcp@^1.18.0",
|
|
27
27
|
"local-pkg": "^1.1.2",
|
|
28
28
|
"zod": "^4.6.4",
|
|
29
|
-
"@mastra/
|
|
30
|
-
"@mastra/
|
|
29
|
+
"@mastra/mcp": "^2.2.0-alpha.2",
|
|
30
|
+
"@mastra/core": "1.75.0-alpha.8"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@hono/node-server": "^2.0.0",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"tsx": "^4.23.1",
|
|
44
44
|
"typescript": "^7.0.2",
|
|
45
45
|
"vitest": "4.1.11",
|
|
46
|
-
"@internal/lint": "0.0.140",
|
|
47
46
|
"@internal/types-builder": "0.0.115",
|
|
48
|
-
"@
|
|
47
|
+
"@internal/lint": "0.0.140",
|
|
48
|
+
"@mastra/core": "1.75.0-alpha.8"
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://mastra.ai",
|
|
51
51
|
"repository": {
|