@thoughtfree/mcp-server 0.3.0 → 0.3.3
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/dist/client.d.ts +3 -12
- package/dist/client.js +0 -18
- package/dist/register.js +2 -6
- package/dist/tools/create.js +5 -3
- package/dist/tools/update.js +2 -1
- package/dist/types.d.ts +1 -35
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ThoughtFree REST API client.
|
|
3
3
|
* Lightweight HTTP wrapper — no SvelteKit dependencies.
|
|
4
4
|
*/
|
|
5
|
-
import type { Thought, Category, Stats, ListResponse, SearchResponse,
|
|
5
|
+
import type { Thought, Category, Stats, ListResponse, SearchResponse, WeeklyInsight, TranscribeResult, ResearchResult } from './types.js';
|
|
6
6
|
export declare class ThoughtFreeClient {
|
|
7
7
|
private baseUrl;
|
|
8
8
|
private apiKey;
|
|
@@ -31,6 +31,7 @@ export declare class ThoughtFreeClient {
|
|
|
31
31
|
source?: string;
|
|
32
32
|
autoClassify?: boolean;
|
|
33
33
|
parentThoughtId?: string;
|
|
34
|
+
listId?: string;
|
|
34
35
|
}): Promise<Thought>;
|
|
35
36
|
updateThought(id: string, data: {
|
|
36
37
|
content?: string;
|
|
@@ -41,6 +42,7 @@ export declare class ThoughtFreeClient {
|
|
|
41
42
|
isArchived?: boolean;
|
|
42
43
|
dueDate?: string;
|
|
43
44
|
priority?: string;
|
|
45
|
+
listId?: string;
|
|
44
46
|
}): Promise<Thought>;
|
|
45
47
|
deleteThought(id: string): Promise<{
|
|
46
48
|
id: string;
|
|
@@ -64,17 +66,6 @@ export declare class ThoughtFreeClient {
|
|
|
64
66
|
categories: Category[];
|
|
65
67
|
}>;
|
|
66
68
|
getStats(): Promise<Stats>;
|
|
67
|
-
listPipelines(): Promise<{
|
|
68
|
-
pipelines: Pipeline[];
|
|
69
|
-
}>;
|
|
70
|
-
runPipeline(id: string): Promise<PipelineRunResult>;
|
|
71
|
-
getPipelineRuns(id: string, params?: {
|
|
72
|
-
limit?: number;
|
|
73
|
-
cursor?: string;
|
|
74
|
-
}): Promise<{
|
|
75
|
-
runs: PipelineRun[];
|
|
76
|
-
nextCursor: string | null;
|
|
77
|
-
}>;
|
|
78
69
|
getWeeklyInsights(thoughts: {
|
|
79
70
|
content: string;
|
|
80
71
|
createdAt: string;
|
package/dist/client.js
CHANGED
|
@@ -102,24 +102,6 @@ export class ThoughtFreeClient {
|
|
|
102
102
|
async getStats() {
|
|
103
103
|
return this.request('/api/v1/stats');
|
|
104
104
|
}
|
|
105
|
-
// ─── Pipelines ────────────────────────────────────────────
|
|
106
|
-
async listPipelines() {
|
|
107
|
-
return this.request('/api/v1/pipelines');
|
|
108
|
-
}
|
|
109
|
-
async runPipeline(id) {
|
|
110
|
-
return this.request(`/api/v1/pipelines/${id}/run`, {
|
|
111
|
-
method: 'POST'
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
async getPipelineRuns(id, params) {
|
|
115
|
-
const searchParams = new URLSearchParams();
|
|
116
|
-
if (params?.limit)
|
|
117
|
-
searchParams.set('limit', String(params.limit));
|
|
118
|
-
if (params?.cursor)
|
|
119
|
-
searchParams.set('cursor', params.cursor);
|
|
120
|
-
const qs = searchParams.toString();
|
|
121
|
-
return this.request(`/api/v1/pipelines/${id}/runs${qs ? `?${qs}` : ''}`);
|
|
122
|
-
}
|
|
123
105
|
// ─── Weekly Insights ─────────────────────────────────────
|
|
124
106
|
async getWeeklyInsights(thoughts) {
|
|
125
107
|
return this.request('/api/ai/weekly-insights', {
|
package/dist/register.js
CHANGED
|
@@ -16,7 +16,6 @@ import { registerQueryBrainTool } from './tools/query-brain.js';
|
|
|
16
16
|
import { registerCategoriesTool } from './tools/categories.js';
|
|
17
17
|
import { registerStatsTool } from './tools/stats.js';
|
|
18
18
|
import { registerWeeklyInsightsTool } from './tools/weekly-insights.js';
|
|
19
|
-
import { registerPipelineTools } from './tools/pipelines.js';
|
|
20
19
|
import { registerCommentTools } from './tools/comments.js';
|
|
21
20
|
import { registerResearchTools } from './tools/research.js';
|
|
22
21
|
// Resources
|
|
@@ -28,7 +27,6 @@ import { registerWeeklyReviewPrompt } from './prompts/weekly-review.js';
|
|
|
28
27
|
import { registerDailyCapturePrompt } from './prompts/daily-capture.js';
|
|
29
28
|
import { registerResearchVideoPrompt } from './prompts/research-video.js';
|
|
30
29
|
import { registerOrganizeInboxPrompt } from './prompts/organize-inbox.js';
|
|
31
|
-
import { registerPipelineStatusPrompt } from './prompts/pipeline-status.js';
|
|
32
30
|
export function registerAllMcpCapabilities(server, client) {
|
|
33
31
|
// Core tools (10)
|
|
34
32
|
registerSearchTool(server, client);
|
|
@@ -41,19 +39,17 @@ export function registerAllMcpCapabilities(server, client) {
|
|
|
41
39
|
registerQueryBrainTool(server, client);
|
|
42
40
|
registerCategoriesTool(server, client);
|
|
43
41
|
registerStatsTool(server, client);
|
|
44
|
-
// Expanded tools (
|
|
42
|
+
// Expanded tools (5)
|
|
45
43
|
registerWeeklyInsightsTool(server, client);
|
|
46
|
-
registerPipelineTools(server, client); // 3 tools
|
|
47
44
|
registerCommentTools(server, client); // 2 tools
|
|
48
45
|
registerResearchTools(server, client); // 2 tools
|
|
49
46
|
// Resources (3)
|
|
50
47
|
registerRecentResource(server, client);
|
|
51
48
|
registerStarredResource(server, client);
|
|
52
49
|
registerByCategoryResource(server, client);
|
|
53
|
-
// Prompts (
|
|
50
|
+
// Prompts (4)
|
|
54
51
|
registerWeeklyReviewPrompt(server);
|
|
55
52
|
registerDailyCapturePrompt(server);
|
|
56
53
|
registerResearchVideoPrompt(server);
|
|
57
54
|
registerOrganizeInboxPrompt(server);
|
|
58
|
-
registerPipelineStatusPrompt(server);
|
|
59
55
|
}
|
package/dist/tools/create.js
CHANGED
|
@@ -10,9 +10,10 @@ export function registerCreateTool(server, client) {
|
|
|
10
10
|
userTags: z.array(z.string()).optional().describe('Tags to attach'),
|
|
11
11
|
dueDate: z.string().optional().describe('Due date in YYYY-MM-DD format (for tasks)'),
|
|
12
12
|
priority: z.enum(['high', 'medium', 'low']).optional().describe('Priority level'),
|
|
13
|
-
autoClassify: z.boolean().default(true).describe('Let AI classify the thought automatically')
|
|
13
|
+
autoClassify: z.boolean().default(true).describe('Let AI classify the thought automatically'),
|
|
14
|
+
listId: z.string().optional().describe('Tracker list UUID to assign this thought to')
|
|
14
15
|
})
|
|
15
|
-
}, async ({ content, type, category, userTags, dueDate, priority, autoClassify }) => {
|
|
16
|
+
}, async ({ content, type, category, userTags, dueDate, priority, autoClassify, listId }) => {
|
|
16
17
|
try {
|
|
17
18
|
const result = await client.createThought({
|
|
18
19
|
content,
|
|
@@ -22,7 +23,8 @@ export function registerCreateTool(server, client) {
|
|
|
22
23
|
dueDate,
|
|
23
24
|
priority,
|
|
24
25
|
source: 'mcp',
|
|
25
|
-
autoClassify
|
|
26
|
+
autoClassify,
|
|
27
|
+
listId
|
|
26
28
|
});
|
|
27
29
|
return {
|
|
28
30
|
content: [{
|
package/dist/tools/update.js
CHANGED
|
@@ -12,7 +12,8 @@ export function registerUpdateTool(server, client) {
|
|
|
12
12
|
isStarred: z.boolean().optional().describe('Star or unstar'),
|
|
13
13
|
isArchived: z.boolean().optional().describe('Archive or unarchive'),
|
|
14
14
|
dueDate: z.string().optional().describe('New due date (YYYY-MM-DD) or empty to clear'),
|
|
15
|
-
priority: z.enum(['high', 'medium', 'low']).optional().describe('New priority')
|
|
15
|
+
priority: z.enum(['high', 'medium', 'low']).optional().describe('New priority'),
|
|
16
|
+
listId: z.string().optional().describe('Tracker list UUID to move this thought to, or empty string to remove from list')
|
|
16
17
|
})
|
|
17
18
|
}, async ({ id, ...updates }) => {
|
|
18
19
|
try {
|
package/dist/types.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface Thought {
|
|
|
14
14
|
completedAt: string | null;
|
|
15
15
|
attachments: unknown[];
|
|
16
16
|
parentThoughtId: string | null;
|
|
17
|
+
listId: string | null;
|
|
17
18
|
createdAt: string;
|
|
18
19
|
updatedAt: string;
|
|
19
20
|
deletedAt?: string | null;
|
|
@@ -59,41 +60,6 @@ export interface SearchResponse {
|
|
|
59
60
|
mode: string;
|
|
60
61
|
total: number;
|
|
61
62
|
}
|
|
62
|
-
export interface Pipeline {
|
|
63
|
-
id: string;
|
|
64
|
-
name: string;
|
|
65
|
-
description: string | null;
|
|
66
|
-
category: string;
|
|
67
|
-
action: string;
|
|
68
|
-
config: Record<string, unknown>;
|
|
69
|
-
isActive: boolean;
|
|
70
|
-
lastRunAt: string | null;
|
|
71
|
-
lastRunStatus: string | null;
|
|
72
|
-
createdAt: string;
|
|
73
|
-
updatedAt: string;
|
|
74
|
-
}
|
|
75
|
-
export interface PipelineRun {
|
|
76
|
-
id: string;
|
|
77
|
-
pipelineId: string;
|
|
78
|
-
status: string;
|
|
79
|
-
triggeredBy: string;
|
|
80
|
-
startedAt: string | null;
|
|
81
|
-
completedAt: string | null;
|
|
82
|
-
durationMs: number | null;
|
|
83
|
-
processedCount: number | null;
|
|
84
|
-
result: string | null;
|
|
85
|
-
resultMetadata: Record<string, unknown>;
|
|
86
|
-
error: string | null;
|
|
87
|
-
createdAt: string;
|
|
88
|
-
}
|
|
89
|
-
export interface PipelineRunResult {
|
|
90
|
-
runId: string;
|
|
91
|
-
status: string;
|
|
92
|
-
processedCount: number;
|
|
93
|
-
result: string | null;
|
|
94
|
-
error: string | null;
|
|
95
|
-
durationMs: number;
|
|
96
|
-
}
|
|
97
63
|
export interface WeeklyInsight {
|
|
98
64
|
summary: string;
|
|
99
65
|
themes: string[];
|