@mastra/mcp-docs-server 1.2.6-alpha.1 → 1.2.6-alpha.2
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/using-tools.md +92 -0
- package/.docs/reference/index.md +3 -0
- package/.docs/reference/tools/ask-user-tool.md +78 -0
- package/.docs/reference/tools/submit-plan-tool.md +93 -0
- package/.docs/reference/tools/task-tools.md +132 -0
- package/CHANGELOG.md +7 -0
- package/package.json +4 -4
|
@@ -411,6 +411,94 @@ Note that for subagents, you'll see two different identifiers in stream response
|
|
|
411
411
|
- `toolName: "agent-weather"` in tool call events — the generated tool wrapper name
|
|
412
412
|
- `id: "weather-agent"` in `data-tool-agent` chunks — the subagent's actual `id` property
|
|
413
413
|
|
|
414
|
+
## Built-in tools
|
|
415
|
+
|
|
416
|
+
Mastra ships agent-agnostic built-in tools in `@mastra/core/tools` that add interactive and organizational capabilities to any agent.
|
|
417
|
+
|
|
418
|
+
| Tool | Purpose |
|
|
419
|
+
| --------------- | ------------------------------------------------- |
|
|
420
|
+
| `ask_user` | Ask the user a question and wait for their answer |
|
|
421
|
+
| `submit_plan` | Submit a plan file for user approval |
|
|
422
|
+
| `task_write` | Create or replace a structured task list |
|
|
423
|
+
| `task_update` | Update one tracked task by ID |
|
|
424
|
+
| `task_complete` | Mark one tracked task completed |
|
|
425
|
+
| `task_check` | Check task list completion status |
|
|
426
|
+
|
|
427
|
+
### Ask the user a question
|
|
428
|
+
|
|
429
|
+
Import [`askUserTool`](https://mastra.ai/reference/tools/ask-user-tool) and add it to the agent's toolset. The tool suspends the run, emits a `tool-call-suspended` event with the question, and resumes when you call `resumeStream()` with the user's answer.
|
|
430
|
+
|
|
431
|
+
```typescript
|
|
432
|
+
import { Agent } from '@mastra/core/agent'
|
|
433
|
+
import { askUserTool } from '@mastra/core/tools'
|
|
434
|
+
|
|
435
|
+
const agent = new Agent({
|
|
436
|
+
id: 'assistant',
|
|
437
|
+
name: 'Assistant',
|
|
438
|
+
instructions: 'Ask the user for clarification when the request is ambiguous.',
|
|
439
|
+
model,
|
|
440
|
+
tools: { askUserTool },
|
|
441
|
+
})
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
Stream the agent and watch for `tool-call-suspended` chunks. The `suspendPayload` contains the question and optional structured choices:
|
|
445
|
+
|
|
446
|
+
```typescript
|
|
447
|
+
const stream = await agent.stream('Summarize my project')
|
|
448
|
+
|
|
449
|
+
for await (const chunk of stream.fullStream) {
|
|
450
|
+
if (chunk.type === 'tool-call-suspended') {
|
|
451
|
+
const { question, options } = chunk.payload.suspendPayload
|
|
452
|
+
console.log(question)
|
|
453
|
+
const answer = await getUserAnswer() // your UI logic
|
|
454
|
+
const resumed = await agent.resumeStream(answer, { runId: stream.runId })
|
|
455
|
+
for await (const c of resumed.textStream) process.stdout.write(c)
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
`askUserTool` supports free-text, single-select (`options` array), and multi-select (`selectionMode: 'multi_select'`) prompts. Pair it with `autoResumeSuspendedTools` so the agent resumes automatically from the user's next chat message. See [Automatic tool resumption](https://mastra.ai/docs/agents/agent-approval) for details.
|
|
461
|
+
|
|
462
|
+
### Submit a plan for review
|
|
463
|
+
|
|
464
|
+
Import [`submitPlanTool`](https://mastra.ai/reference/tools/submit-plan-tool) to let the agent write a plan to a file and submit it for user review. The tool suspends the run until the user approves or rejects:
|
|
465
|
+
|
|
466
|
+
```typescript
|
|
467
|
+
for await (const chunk of stream.fullStream) {
|
|
468
|
+
if (chunk.type === 'tool-call-suspended' && chunk.payload.toolName === 'submit_plan') {
|
|
469
|
+
const { path } = chunk.payload.suspendPayload
|
|
470
|
+
// Read and display the plan file, then resume:
|
|
471
|
+
const resumed = await agent.resumeStream({ action: 'approved' }, { runId: stream.runId })
|
|
472
|
+
for await (const c of resumed.textStream) process.stdout.write(c)
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### Task tracking
|
|
478
|
+
|
|
479
|
+
The four task tools manage a structured, durable task list for an agent run. They require [Memory](https://mastra.ai/docs/memory/overview) so the list is persisted in a thread-scoped store.
|
|
480
|
+
|
|
481
|
+
Add task tracking through [`TaskSignalProvider`](https://mastra.ai/reference/signals/task-signal-provider), which bundles all four tools and the `TaskStateProcessor` in a single registration:
|
|
482
|
+
|
|
483
|
+
```typescript
|
|
484
|
+
import { Agent } from '@mastra/core/agent'
|
|
485
|
+
import { Memory } from '@mastra/memory'
|
|
486
|
+
import { TaskSignalProvider } from '@mastra/core/signals'
|
|
487
|
+
|
|
488
|
+
const agent = new Agent({
|
|
489
|
+
id: 'coder',
|
|
490
|
+
name: 'Coder',
|
|
491
|
+
instructions: 'Track your progress with the task tools.',
|
|
492
|
+
model,
|
|
493
|
+
memory: new Memory(),
|
|
494
|
+
signals: [new TaskSignalProvider()],
|
|
495
|
+
})
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
Only one task can be `in_progress` at a time. The list is stored in the thread-scoped `threadState` storage domain and projected onto the agent's [state-signal](https://mastra.ai/docs/long-running-agents/signals) lane, so it survives observational-memory truncation. See the [Task tools reference](https://mastra.ai/reference/tools/task-tools) for full schemas.
|
|
499
|
+
|
|
500
|
+
The [AgentController](https://mastra.ai/docs/agent-controller/overview) automatically includes all built-in tools in every mode — you don't need to add them manually. See [Tool approvals](https://mastra.ai/docs/agent-controller/tool-approvals) for AgentController-specific behavior.
|
|
501
|
+
|
|
414
502
|
## Related
|
|
415
503
|
|
|
416
504
|
- [`createTool` reference](https://mastra.ai/reference/tools/create-tool)
|
|
@@ -420,4 +508,8 @@ Note that for subagents, you'll see two different identifiers in stream response
|
|
|
420
508
|
- [Dynamic tool search](https://mastra.ai/reference/processors/tool-search-processor): Load tools on demand for agents with large tool libraries
|
|
421
509
|
- [Tools with structured output](https://mastra.ai/docs/agents/structured-output): Model compatibility when combining tools and structured output
|
|
422
510
|
- [Agent approval](https://mastra.ai/docs/agents/agent-approval)
|
|
511
|
+
- [`askUserTool` reference](https://mastra.ai/reference/tools/ask-user-tool)
|
|
512
|
+
- [`submitPlanTool` reference](https://mastra.ai/reference/tools/submit-plan-tool)
|
|
513
|
+
- [Task tools reference](https://mastra.ai/reference/tools/task-tools)
|
|
514
|
+
- [TaskSignalProvider reference](https://mastra.ai/reference/signals/task-signal-provider)
|
|
423
515
|
- [Request context](https://mastra.ai/docs/server/request-context)
|
package/.docs/reference/index.md
CHANGED
|
@@ -272,6 +272,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
272
272
|
- [.stream()](https://mastra.ai/reference/streaming/workflows/stream)
|
|
273
273
|
- [.timeTravelStream()](https://mastra.ai/reference/streaming/workflows/timeTravelStream)
|
|
274
274
|
- [Overview](https://mastra.ai/reference/templates/overview)
|
|
275
|
+
- [askUserTool](https://mastra.ai/reference/tools/ask-user-tool)
|
|
275
276
|
- [Bright Data Tools](https://mastra.ai/reference/tools/brightdata)
|
|
276
277
|
- [createCodeMode()](https://mastra.ai/reference/tools/create-code-mode)
|
|
277
278
|
- [createDocumentChunkerTool()](https://mastra.ai/reference/tools/document-chunker-tool)
|
|
@@ -281,6 +282,8 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
281
282
|
- [MCPClient](https://mastra.ai/reference/tools/mcp-client)
|
|
282
283
|
- [MCPServer](https://mastra.ai/reference/tools/mcp-server)
|
|
283
284
|
- [Perplexity Tools](https://mastra.ai/reference/tools/perplexity)
|
|
285
|
+
- [submitPlanTool](https://mastra.ai/reference/tools/submit-plan-tool)
|
|
286
|
+
- [Task tools](https://mastra.ai/reference/tools/task-tools)
|
|
284
287
|
- [Tavily Tools](https://mastra.ai/reference/tools/tavily)
|
|
285
288
|
- [Amazon S3 Vector Store](https://mastra.ai/reference/vectors/s3vectors)
|
|
286
289
|
- [Astra Vector Store](https://mastra.ai/reference/vectors/astra)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# askUserTool
|
|
4
|
+
|
|
5
|
+
A built-in, agent-agnostic tool that asks the user a question and waits for their response. The tool supports free-text questions, single-select prompts, and multi-select prompts.
|
|
6
|
+
|
|
7
|
+
The tool pauses through the native [tool suspension](https://mastra.ai/docs/agents/agent-approval) primitive: it calls `suspend()` with the question payload, which makes the agent emit a `tool-call-suspended` event and persist run state. Resume the run with `agent.resumeStream(answer, { runId })`.
|
|
8
|
+
|
|
9
|
+
When executed outside an agent run (no `suspend` available), the tool returns a readable fallback string containing the question and choices.
|
|
10
|
+
|
|
11
|
+
## Usage example
|
|
12
|
+
|
|
13
|
+
Add `askUserTool` to an agent's toolset:
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { Agent } from '@mastra/core/agent'
|
|
17
|
+
import { askUserTool } from '@mastra/core/tools'
|
|
18
|
+
|
|
19
|
+
const agent = new Agent({
|
|
20
|
+
id: 'assistant',
|
|
21
|
+
name: 'Assistant',
|
|
22
|
+
instructions: 'Ask the user for clarification when the request is ambiguous.',
|
|
23
|
+
model,
|
|
24
|
+
tools: { askUserTool },
|
|
25
|
+
})
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Handle the suspension and resume:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
const stream = await agent.stream('Summarize my project')
|
|
32
|
+
|
|
33
|
+
for await (const chunk of stream.fullStream) {
|
|
34
|
+
if (chunk.type === 'tool-call-suspended') {
|
|
35
|
+
const { question, options, selectionMode } = chunk.payload.suspendPayload
|
|
36
|
+
// Present the question to the user, collect their answer, then resume:
|
|
37
|
+
const resumed = await agent.resumeStream('The main repo', { runId: stream.runId })
|
|
38
|
+
for await (const c of resumed.textStream) process.stdout.write(c)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
For multi-select prompts, resume with a string array:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
await agent.resumeStream(['Add tests', 'Update docs'], { runId: stream.runId })
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Input schema
|
|
50
|
+
|
|
51
|
+
The model calls this tool with the following parameters:
|
|
52
|
+
|
|
53
|
+
**question** (`string`): The question to ask the user. Must be non-empty.
|
|
54
|
+
|
|
55
|
+
**options** (`AskUserOption[]`): Structured choices for the user. When omitted, the prompt is free-text.
|
|
56
|
+
|
|
57
|
+
**options.label** (`string`): Short display text for this option. This value is returned to the model when selected.
|
|
58
|
+
|
|
59
|
+
**options.description** (`string`): Explanation of what this option means.
|
|
60
|
+
|
|
61
|
+
**selectionMode** (`'single_select' | 'multi_select'`): Controls how many options the user can select. Defaults to 'single\_select' when options are provided. Requires options.
|
|
62
|
+
|
|
63
|
+
## Suspend payload
|
|
64
|
+
|
|
65
|
+
The `tool-call-suspended` event carries a `suspendPayload` with the same shape as the input:
|
|
66
|
+
|
|
67
|
+
**question** (`string`): The question being asked.
|
|
68
|
+
|
|
69
|
+
**options** (`AskUserOption[]`): The structured choices, if any.
|
|
70
|
+
|
|
71
|
+
**selectionMode** (`'single_select' | 'multi_select'`): The resolved selection mode. Omitted for free-text prompts.
|
|
72
|
+
|
|
73
|
+
## Resume data
|
|
74
|
+
|
|
75
|
+
Pass the user's answer to `agent.resumeStream()`:
|
|
76
|
+
|
|
77
|
+
- **Free-text and single-select:** A `string`.
|
|
78
|
+
- **Multi-select:** A `string[]` of selected option labels.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# submitPlanTool
|
|
4
|
+
|
|
5
|
+
A built-in, agent-agnostic tool that submits an implementation plan for user review. The agent writes a plan to a markdown file and passes the file path to this tool. The tool suspends the run until the user approves or rejects the plan.
|
|
6
|
+
|
|
7
|
+
The tool pauses through the native [tool suspension](https://mastra.ai/docs/agents/agent-approval) primitive: it calls `suspend({ path })`, which makes the agent emit a `tool-call-suspended` event. The host reads the plan file, presents it to the user, and resumes with an approval or rejection.
|
|
8
|
+
|
|
9
|
+
When executed outside an agent run (no `suspend` available), the tool returns a readable fallback string containing the file path.
|
|
10
|
+
|
|
11
|
+
## Usage example
|
|
12
|
+
|
|
13
|
+
Add `submitPlanTool` to an agent's toolset:
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { Agent } from '@mastra/core/agent'
|
|
17
|
+
import { submitPlanTool } from '@mastra/core/tools'
|
|
18
|
+
|
|
19
|
+
const agent = new Agent({
|
|
20
|
+
id: 'planner',
|
|
21
|
+
name: 'Planner',
|
|
22
|
+
instructions: 'Write a plan to a file before starting work, then submit it for approval.',
|
|
23
|
+
model,
|
|
24
|
+
tools: { submitPlanTool },
|
|
25
|
+
})
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Handle the suspension and resume:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import fs from 'node:fs'
|
|
32
|
+
|
|
33
|
+
const stream = await agent.stream('Refactor the auth module')
|
|
34
|
+
|
|
35
|
+
for await (const chunk of stream.fullStream) {
|
|
36
|
+
if (chunk.type === 'tool-call-suspended' && chunk.payload.toolName === 'submit_plan') {
|
|
37
|
+
const { path } = chunk.payload.suspendPayload
|
|
38
|
+
const plan = fs.readFileSync(path, 'utf-8')
|
|
39
|
+
console.log(plan)
|
|
40
|
+
|
|
41
|
+
// Approve:
|
|
42
|
+
const resumed = await agent.resumeStream({ action: 'approved' }, { runId: stream.runId })
|
|
43
|
+
for await (const c of resumed.textStream) process.stdout.write(c)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
To reject with feedback:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
await agent.resumeStream(
|
|
52
|
+
{ action: 'rejected', feedback: 'Add error handling steps' },
|
|
53
|
+
{ runId: stream.runId },
|
|
54
|
+
)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Input schema
|
|
58
|
+
|
|
59
|
+
The model calls this tool with the following parameters:
|
|
60
|
+
|
|
61
|
+
**path** (`string`): Path to the plan markdown file on disk (e.g. '.mastracode/plans/add-dark-mode.md').
|
|
62
|
+
|
|
63
|
+
## Suspend payload
|
|
64
|
+
|
|
65
|
+
The `tool-call-suspended` event carries a `suspendPayload`:
|
|
66
|
+
|
|
67
|
+
**path** (`string`): Path to the plan file the agent wrote.
|
|
68
|
+
|
|
69
|
+
**title** (`string`): Plan title, filled by the host after reading the file.
|
|
70
|
+
|
|
71
|
+
**plan** (`string`): Plan body, filled by the host after reading the file.
|
|
72
|
+
|
|
73
|
+
## Resume data
|
|
74
|
+
|
|
75
|
+
Pass an object to `agent.resumeStream()`:
|
|
76
|
+
|
|
77
|
+
**action** (`'approved' | 'rejected'`): Whether the user approved or rejected the plan.
|
|
78
|
+
|
|
79
|
+
**feedback** (`string`): Revision instructions when the plan is rejected. Surfaced to the model so it can revise and resubmit.
|
|
80
|
+
|
|
81
|
+
**path** (`string`): The plan file path, echoed back for history replay.
|
|
82
|
+
|
|
83
|
+
**title** (`string`): The plan title, echoed back for history replay.
|
|
84
|
+
|
|
85
|
+
**plan** (`string`): The plan body, echoed back for history replay.
|
|
86
|
+
|
|
87
|
+
## Approval behavior
|
|
88
|
+
|
|
89
|
+
- **Approved:** The tool returns `"Plan approved. Proceed with implementation following the approved plan."` to the model.
|
|
90
|
+
- **Rejected with feedback:** The tool returns the feedback and asks the model to revise the plan and submit again.
|
|
91
|
+
- **Rejected without feedback:** The tool tells the model to wait for the user's next message before revising.
|
|
92
|
+
|
|
93
|
+
When used inside an [AgentController](https://mastra.ai/docs/agent-controller/overview), plan approval triggers an automatic mode switch from the planning mode to the default execution mode. See [Modes](https://mastra.ai/docs/agent-controller/modes) for details.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# Task tools
|
|
4
|
+
|
|
5
|
+
Four built-in, agent-agnostic tools that manage a structured task list for an agent run. The task list is persisted in the thread-scoped `threadState` storage domain and projected onto the agent [state-signal](https://mastra.ai/docs/long-running-agents/signals) lane so it survives [observational-memory](https://mastra.ai/docs/memory/observational-memory) truncation.
|
|
6
|
+
|
|
7
|
+
Task tracking requires a memory-backed thread (`threadId` + `resourceId`). Without memory the tools return an error explaining that task tracking requires agent memory.
|
|
8
|
+
|
|
9
|
+
The recommended setup is [`TaskSignalProvider`](https://mastra.ai/reference/signals/task-signal-provider), which bundles all four tools and the `TaskStateProcessor` in a single registration. See [Built-in tools](https://mastra.ai/docs/agents/using-tools) for the conceptual guide.
|
|
10
|
+
|
|
11
|
+
## Usage example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Agent } from '@mastra/core/agent'
|
|
15
|
+
import { Memory } from '@mastra/memory'
|
|
16
|
+
import { TaskSignalProvider } from '@mastra/core/signals'
|
|
17
|
+
|
|
18
|
+
const agent = new Agent({
|
|
19
|
+
id: 'coder',
|
|
20
|
+
name: 'Coder',
|
|
21
|
+
instructions: 'Track your progress with the task tools.',
|
|
22
|
+
model,
|
|
23
|
+
memory: new Memory(),
|
|
24
|
+
signals: [new TaskSignalProvider()],
|
|
25
|
+
})
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or import the tools directly:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import { taskWriteTool, taskUpdateTool, taskCompleteTool, taskCheckTool } from '@mastra/core/tools'
|
|
32
|
+
|
|
33
|
+
const agent = new Agent({
|
|
34
|
+
id: 'coder',
|
|
35
|
+
name: 'Coder',
|
|
36
|
+
instructions: 'Track your progress with the task tools.',
|
|
37
|
+
model,
|
|
38
|
+
memory: new Memory(),
|
|
39
|
+
tools: { taskWriteTool, taskUpdateTool, taskCompleteTool, taskCheckTool },
|
|
40
|
+
})
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## `task_write`
|
|
44
|
+
|
|
45
|
+
Create or replace the entire task list. Each call replaces the previous list.
|
|
46
|
+
|
|
47
|
+
### Input schema
|
|
48
|
+
|
|
49
|
+
**tasks** (`TaskItemInput[]`): The complete updated task list.
|
|
50
|
+
|
|
51
|
+
**tasks.id** (`string`): Stable task identifier (e.g. 'task\_investigate\_tests'). Keep this unchanged across updates. Auto-generated when omitted.
|
|
52
|
+
|
|
53
|
+
**tasks.content** (`string`): Task description in imperative form (e.g. 'Fix authentication bug').
|
|
54
|
+
|
|
55
|
+
**tasks.status** (`'pending' | 'in_progress' | 'completed'`): Current task status.
|
|
56
|
+
|
|
57
|
+
**tasks.activeForm** (`string`): Present continuous form shown during execution (e.g. 'Fixing authentication bug').
|
|
58
|
+
|
|
59
|
+
### Output
|
|
60
|
+
|
|
61
|
+
Returns a `TaskToolResult` with a human-readable `content` summary, the full `tasks` array with assigned IDs, and an `isError` flag.
|
|
62
|
+
|
|
63
|
+
### Behavior
|
|
64
|
+
|
|
65
|
+
- IDs must be unique within a call. Duplicate explicit IDs get a generated fallback.
|
|
66
|
+
- When an ID is omitted while rewriting an existing list, one unambiguous matching task reuses its previous ID for stability.
|
|
67
|
+
- Only one task can have `in_progress` status at a time. Submitting multiple `in_progress` tasks returns an error.
|
|
68
|
+
|
|
69
|
+
## `task_update`
|
|
70
|
+
|
|
71
|
+
Update one task by its stable ID. Include only the fields that changed.
|
|
72
|
+
|
|
73
|
+
### Input schema
|
|
74
|
+
|
|
75
|
+
**id** (`string`): The stable task identifier to update.
|
|
76
|
+
|
|
77
|
+
**content** (`string`): New task description in imperative form.
|
|
78
|
+
|
|
79
|
+
**status** (`'pending' | 'in_progress' | 'completed'`): New task status.
|
|
80
|
+
|
|
81
|
+
**activeForm** (`string`): New present continuous form.
|
|
82
|
+
|
|
83
|
+
At least one of `content`, `status`, or `activeForm` is required.
|
|
84
|
+
|
|
85
|
+
### Behavior
|
|
86
|
+
|
|
87
|
+
- When the update sets a task to `in_progress`, any other `in_progress` task is automatically demoted to `pending`.
|
|
88
|
+
- Returns an error with available task IDs when the ID is not found.
|
|
89
|
+
|
|
90
|
+
## `task_complete`
|
|
91
|
+
|
|
92
|
+
Mark one task completed by its stable ID.
|
|
93
|
+
|
|
94
|
+
### Input schema
|
|
95
|
+
|
|
96
|
+
**id** (`string`): The stable task identifier to mark completed.
|
|
97
|
+
|
|
98
|
+
### Behavior
|
|
99
|
+
|
|
100
|
+
Returns an error with available task IDs when the ID is not found.
|
|
101
|
+
|
|
102
|
+
## `task_check`
|
|
103
|
+
|
|
104
|
+
Check the completion status of the task list. Takes no input parameters.
|
|
105
|
+
|
|
106
|
+
### Output
|
|
107
|
+
|
|
108
|
+
Returns a `TaskCheckResult` with:
|
|
109
|
+
|
|
110
|
+
**content** (`string`): Human-readable summary with task counts and incomplete task IDs.
|
|
111
|
+
|
|
112
|
+
**tasks** (`TaskItem[]`): Full task list snapshot with stable IDs.
|
|
113
|
+
|
|
114
|
+
**summary** (`TaskCheckSummary`): Structured counts.
|
|
115
|
+
|
|
116
|
+
**summary.total** (`number`): Total tracked tasks.
|
|
117
|
+
|
|
118
|
+
**summary.completed** (`number`): Completed tasks.
|
|
119
|
+
|
|
120
|
+
**summary.inProgress** (`number`): In-progress tasks.
|
|
121
|
+
|
|
122
|
+
**summary.pending** (`number`): Pending tasks.
|
|
123
|
+
|
|
124
|
+
**summary.incomplete** (`number`): Tasks not yet completed (in-progress + pending).
|
|
125
|
+
|
|
126
|
+
**summary.hasTasks** (`boolean`): True when at least one task exists.
|
|
127
|
+
|
|
128
|
+
**summary.allCompleted** (`boolean`): True when at least one task exists and every task is completed.
|
|
129
|
+
|
|
130
|
+
**incompleteTasks** (`TaskItem[]`): Tasks that still need work (in-progress and pending).
|
|
131
|
+
|
|
132
|
+
**isError** (`boolean`): Whether the check encountered an error.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.6-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`e8eaf3a`](https://github.com/mastra-ai/mastra/commit/e8eaf3aea09d51c131b5d369aee459442f416efc), [`d1c930f`](https://github.com/mastra-ai/mastra/commit/d1c930f713d1de09d5f3cd665cb79a8b7ebd7ec7), [`02634f7`](https://github.com/mastra-ai/mastra/commit/02634f700051e014a125d0d10165e3c9b8414e95)]:
|
|
8
|
+
- @mastra/core@1.50.1-alpha.1
|
|
9
|
+
|
|
3
10
|
## 1.2.6-alpha.0
|
|
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.2.6-alpha.
|
|
3
|
+
"version": "1.2.6-alpha.2",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"jsdom": "^26.1.0",
|
|
29
29
|
"local-pkg": "^1.1.2",
|
|
30
30
|
"zod": "^4.4.3",
|
|
31
|
-
"@mastra/core": "1.50.1-alpha.
|
|
31
|
+
"@mastra/core": "1.50.1-alpha.1",
|
|
32
32
|
"@mastra/mcp": "^1.13.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "4.1.8",
|
|
48
48
|
"@internal/lint": "0.0.112",
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
49
|
+
"@mastra/core": "1.50.1-alpha.1",
|
|
50
|
+
"@internal/types-builder": "0.0.87"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|