lystbot 0.3.4 → 0.3.6
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/package.json +1 -1
- package/server.json +2 -2
- package/src/mcp.js +17 -17
- package/.mcpregistry_github_token +0 -1
- package/.mcpregistry_registry_token +0 -1
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "cli"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.3.
|
|
10
|
+
"version": "0.3.5",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "lystbot",
|
|
15
|
-
"version": "0.3.
|
|
15
|
+
"version": "0.3.5",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
package/src/mcp.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const { McpServer } = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
2
2
|
const { StdioServerTransport } = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
3
|
+
const { z } = require('zod');
|
|
3
4
|
const config = require('./config');
|
|
4
5
|
|
|
5
6
|
// --- API helper (non-exiting version for MCP) ---
|
|
@@ -70,7 +71,7 @@ async function startMcpServer() {
|
|
|
70
71
|
});
|
|
71
72
|
|
|
72
73
|
server.tool('get_list', 'Get a list with all its items', {
|
|
73
|
-
list:
|
|
74
|
+
list: z.string().describe('List name or ID'),
|
|
74
75
|
}, async ({ list: query }) => {
|
|
75
76
|
const all = await api('GET', '/lists');
|
|
76
77
|
const match = findList(all.lists || all, query);
|
|
@@ -97,9 +98,9 @@ async function startMcpServer() {
|
|
|
97
98
|
});
|
|
98
99
|
|
|
99
100
|
server.tool('create_list', 'Create a new list', {
|
|
100
|
-
title:
|
|
101
|
-
type:
|
|
102
|
-
emoji:
|
|
101
|
+
title: z.string().describe('List title'),
|
|
102
|
+
type: z.string().optional().describe('List type: shopping, todo, packing, or generic (default: generic)'),
|
|
103
|
+
emoji: z.string().optional().describe('List emoji (optional, auto-picked if omitted)'),
|
|
103
104
|
}, async ({ title, type, emoji }) => {
|
|
104
105
|
const id = uuid();
|
|
105
106
|
if (!emoji) {
|
|
@@ -116,7 +117,7 @@ async function startMcpServer() {
|
|
|
116
117
|
});
|
|
117
118
|
|
|
118
119
|
server.tool('delete_list', 'Delete a list', {
|
|
119
|
-
list:
|
|
120
|
+
list: z.string().describe('List name or ID'),
|
|
120
121
|
}, async ({ list: query }) => {
|
|
121
122
|
const all = await api('GET', '/lists');
|
|
122
123
|
const match = findList(all.lists || all, query);
|
|
@@ -126,14 +127,13 @@ async function startMcpServer() {
|
|
|
126
127
|
});
|
|
127
128
|
|
|
128
129
|
server.tool('add_items', 'Add one or more items to a list', {
|
|
129
|
-
list:
|
|
130
|
-
items:
|
|
130
|
+
list: z.string().describe('List name or ID'),
|
|
131
|
+
items: z.string().describe('Items to add, separated by comma+space or semicolon. Example: "Milk, Eggs, Butter"'),
|
|
131
132
|
}, async ({ list: query, items: itemsStr }) => {
|
|
132
133
|
const all = await api('GET', '/lists');
|
|
133
134
|
const match = findList(all.lists || all, query);
|
|
134
135
|
if (!match) throw new Error(`List "${query}" not found`);
|
|
135
136
|
|
|
136
|
-
// Split on ", " or ";"
|
|
137
137
|
const texts = itemsStr.split(/;\s*|,\s+/).map(s => s.trim()).filter(Boolean);
|
|
138
138
|
const added = [];
|
|
139
139
|
|
|
@@ -147,8 +147,8 @@ async function startMcpServer() {
|
|
|
147
147
|
});
|
|
148
148
|
|
|
149
149
|
server.tool('check_item', 'Check off (complete) an item', {
|
|
150
|
-
list:
|
|
151
|
-
item:
|
|
150
|
+
list: z.string().describe('List name or ID'),
|
|
151
|
+
item: z.string().describe('Item text (fuzzy match)'),
|
|
152
152
|
}, async ({ list: query, item: itemQuery }) => {
|
|
153
153
|
const all = await api('GET', '/lists');
|
|
154
154
|
const match = findList(all.lists || all, query);
|
|
@@ -166,8 +166,8 @@ async function startMcpServer() {
|
|
|
166
166
|
});
|
|
167
167
|
|
|
168
168
|
server.tool('uncheck_item', 'Uncheck (reopen) an item', {
|
|
169
|
-
list:
|
|
170
|
-
item:
|
|
169
|
+
list: z.string().describe('List name or ID'),
|
|
170
|
+
item: z.string().describe('Item text (fuzzy match)'),
|
|
171
171
|
}, async ({ list: query, item: itemQuery }) => {
|
|
172
172
|
const all = await api('GET', '/lists');
|
|
173
173
|
const match = findList(all.lists || all, query);
|
|
@@ -185,8 +185,8 @@ async function startMcpServer() {
|
|
|
185
185
|
});
|
|
186
186
|
|
|
187
187
|
server.tool('remove_item', 'Remove an item from a list', {
|
|
188
|
-
list:
|
|
189
|
-
item:
|
|
188
|
+
list: z.string().describe('List name or ID'),
|
|
189
|
+
item: z.string().describe('Item text (fuzzy match)'),
|
|
190
190
|
}, async ({ list: query, item: itemQuery }) => {
|
|
191
191
|
const all = await api('GET', '/lists');
|
|
192
192
|
const match = findList(all.lists || all, query);
|
|
@@ -204,7 +204,7 @@ async function startMcpServer() {
|
|
|
204
204
|
});
|
|
205
205
|
|
|
206
206
|
server.tool('clear_checked', 'Remove all checked (completed) items from a list', {
|
|
207
|
-
list:
|
|
207
|
+
list: z.string().describe('List name or ID'),
|
|
208
208
|
}, async ({ list: query }) => {
|
|
209
209
|
const all = await api('GET', '/lists');
|
|
210
210
|
const match = findList(all.lists || all, query);
|
|
@@ -215,7 +215,7 @@ async function startMcpServer() {
|
|
|
215
215
|
});
|
|
216
216
|
|
|
217
217
|
server.tool('share_list', 'Generate a share code for a list', {
|
|
218
|
-
list:
|
|
218
|
+
list: z.string().describe('List name or ID'),
|
|
219
219
|
}, async ({ list: query }) => {
|
|
220
220
|
const all = await api('GET', '/lists');
|
|
221
221
|
const match = findList(all.lists || all, query);
|
|
@@ -226,7 +226,7 @@ async function startMcpServer() {
|
|
|
226
226
|
});
|
|
227
227
|
|
|
228
228
|
server.tool('join_list', 'Join a shared list using a share code', {
|
|
229
|
-
code:
|
|
229
|
+
code: z.string().describe('The share code'),
|
|
230
230
|
}, async ({ code }) => {
|
|
231
231
|
const data = await api('POST', '/lists/join', { share_code: code });
|
|
232
232
|
return { content: [{ type: 'text', text: `Joined list: ${data.emoji || '📋'} ${data.title || data.list_id}` }] };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ghu_mzDgu5Mqa67peAVpPyKXjYNsmVKTlu0CZrHJ
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"token":"eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJtY3AtcmVnaXN0cnkiLCJleHAiOjE3NzQzNTEzMjMsIm5iZiI6MTc3NDM1MTAyMywiaWF0IjoxNzc0MzUxMDIzLCJhdXRoX21ldGhvZCI6ImdpdGh1Yi1hdCIsImF1dGhfbWV0aG9kX3N1YiI6IlRvdXJBcm91bmQiLCJwZXJtaXNzaW9ucyI6W3siYWN0aW9uIjoicHVibGlzaCIsInJlc291cmNlIjoiaW8uZ2l0aHViLlRvdXJBcm91bmQvKiJ9XX0.Q4tfiUTMAFzRPgpC0b3IgFFMNF23MRYSi53AQFm-O9PV-4VShMd-60vOfJ2Krhm-HxElaqHI6CirEAk1cI4RBA","expires_at":1774351323}
|