@beeper/desktop-mcp 0.1.4 → 4.1.293
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/README.md +10 -14
- package/code-tool.d.mts +1 -1
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +1 -1
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +40 -6
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +4 -3
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +44 -0
- package/docs-search-tool.d.mts.map +1 -0
- package/docs-search-tool.d.ts +44 -0
- package/docs-search-tool.d.ts.map +1 -0
- package/docs-search-tool.js +43 -0
- package/docs-search-tool.js.map +1 -0
- package/docs-search-tool.mjs +39 -0
- package/docs-search-tool.mjs.map +1 -0
- package/http.d.mts +5 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts +5 -1
- package/http.d.ts.map +1 -1
- package/http.js +7 -9
- package/http.js.map +1 -1
- package/http.mjs +7 -9
- package/http.mjs.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/index.mjs +3 -3
- package/index.mjs.map +1 -1
- package/options.d.mts +1 -0
- package/options.d.mts.map +1 -1
- package/options.d.ts +1 -0
- package/options.d.ts.map +1 -1
- package/options.js +15 -8
- package/options.js.map +1 -1
- package/options.mjs +15 -8
- package/options.mjs.map +1 -1
- package/package.json +12 -2
- package/server.d.mts +1 -1
- package/server.d.mts.map +1 -1
- package/server.d.ts +1 -1
- package/server.d.ts.map +1 -1
- package/server.js +39 -13
- package/server.js.map +1 -1
- package/server.mjs +40 -14
- package/server.mjs.map +1 -1
- package/src/code-tool.ts +5 -3
- package/src/docs-search-tool.ts +48 -0
- package/src/http.ts +35 -23
- package/src/index.ts +3 -3
- package/src/options.ts +19 -9
- package/src/server.ts +42 -15
- package/src/tools/accounts/get-accounts.ts +3 -3
- package/src/tools/chats/archive-chat.ts +6 -6
- package/src/tools/chats/get-chat.ts +6 -7
- package/src/tools/chats/reminders/clear-chat-reminder.ts +10 -8
- package/src/tools/chats/reminders/set-chat-reminder.ts +6 -5
- package/src/tools/chats/search-chats.ts +14 -12
- package/src/tools/index.ts +6 -4
- package/src/tools/messages/list-messages.ts +51 -0
- package/src/tools/messages/search-messages.ts +15 -26
- package/src/tools/messages/send-message.ts +5 -6
- package/src/tools/{app/open-in-app.ts → top-level/focus-app.ts} +13 -8
- package/src/tools/top-level/search.ts +41 -0
- package/tools/accounts/get-accounts.js +3 -3
- package/tools/accounts/get-accounts.js.map +1 -1
- package/tools/accounts/get-accounts.mjs +3 -3
- package/tools/accounts/get-accounts.mjs.map +1 -1
- package/tools/chats/archive-chat.d.mts.map +1 -1
- package/tools/chats/archive-chat.d.ts.map +1 -1
- package/tools/chats/archive-chat.js +6 -5
- package/tools/chats/archive-chat.js.map +1 -1
- package/tools/chats/archive-chat.mjs +6 -5
- package/tools/chats/archive-chat.mjs.map +1 -1
- package/tools/chats/get-chat.d.mts.map +1 -1
- package/tools/chats/get-chat.d.ts.map +1 -1
- package/tools/chats/get-chat.js +6 -6
- package/tools/chats/get-chat.js.map +1 -1
- package/tools/chats/get-chat.mjs +6 -6
- package/tools/chats/get-chat.mjs.map +1 -1
- package/tools/chats/reminders/clear-chat-reminder.d.mts.map +1 -1
- package/tools/chats/reminders/clear-chat-reminder.d.ts.map +1 -1
- package/tools/chats/reminders/clear-chat-reminder.js +10 -7
- package/tools/chats/reminders/clear-chat-reminder.js.map +1 -1
- package/tools/chats/reminders/clear-chat-reminder.mjs +10 -7
- package/tools/chats/reminders/clear-chat-reminder.mjs.map +1 -1
- package/tools/chats/reminders/set-chat-reminder.d.mts.map +1 -1
- package/tools/chats/reminders/set-chat-reminder.d.ts.map +1 -1
- package/tools/chats/reminders/set-chat-reminder.js +6 -5
- package/tools/chats/reminders/set-chat-reminder.js.map +1 -1
- package/tools/chats/reminders/set-chat-reminder.mjs +6 -5
- package/tools/chats/reminders/set-chat-reminder.mjs.map +1 -1
- package/tools/chats/search-chats.d.mts.map +1 -1
- package/tools/chats/search-chats.d.ts.map +1 -1
- package/tools/chats/search-chats.js +13 -12
- package/tools/chats/search-chats.js.map +1 -1
- package/tools/chats/search-chats.mjs +13 -12
- package/tools/chats/search-chats.mjs.map +1 -1
- package/tools/index.d.mts.map +1 -1
- package/tools/index.d.ts.map +1 -1
- package/tools/index.js +6 -4
- package/tools/index.js.map +1 -1
- package/tools/index.mjs +6 -4
- package/tools/index.mjs.map +1 -1
- package/tools/messages/{attachments/download-attachment.d.ts → list-messages.d.mts} +1 -1
- package/tools/messages/list-messages.d.mts.map +1 -0
- package/tools/messages/{attachments/download-attachment.d.mts → list-messages.d.ts} +1 -1
- package/tools/messages/list-messages.d.ts.map +1 -0
- package/tools/messages/list-messages.js +47 -0
- package/tools/messages/list-messages.js.map +1 -0
- package/tools/messages/list-messages.mjs +43 -0
- package/tools/messages/list-messages.mjs.map +1 -0
- package/tools/messages/search-messages.d.mts.map +1 -1
- package/tools/messages/search-messages.d.ts.map +1 -1
- package/tools/messages/search-messages.js +14 -26
- package/tools/messages/search-messages.js.map +1 -1
- package/tools/messages/search-messages.mjs +14 -26
- package/tools/messages/search-messages.mjs.map +1 -1
- package/tools/messages/send-message.d.mts.map +1 -1
- package/tools/messages/send-message.d.ts.map +1 -1
- package/tools/messages/send-message.js +5 -5
- package/tools/messages/send-message.js.map +1 -1
- package/tools/messages/send-message.mjs +5 -5
- package/tools/messages/send-message.mjs.map +1 -1
- package/tools/{app/open-in-app.d.ts → top-level/focus-app.d.mts} +1 -1
- package/tools/top-level/focus-app.d.mts.map +1 -0
- package/tools/{app/open-in-app.d.mts → top-level/focus-app.d.ts} +1 -1
- package/tools/top-level/focus-app.d.ts.map +1 -0
- package/tools/{app/open-in-app.js → top-level/focus-app.js} +13 -9
- package/tools/top-level/focus-app.js.map +1 -0
- package/tools/{app/open-in-app.mjs → top-level/focus-app.mjs} +13 -9
- package/tools/top-level/focus-app.mjs.map +1 -0
- package/tools/top-level/search.d.mts +45 -0
- package/tools/top-level/search.d.mts.map +1 -0
- package/tools/top-level/search.d.ts +45 -0
- package/tools/top-level/search.d.ts.map +1 -0
- package/tools/top-level/search.js +37 -0
- package/tools/top-level/search.js.map +1 -0
- package/tools/top-level/search.mjs +33 -0
- package/tools/top-level/search.mjs.map +1 -0
- package/src/tools/messages/attachments/download-attachment.ts +0 -42
- package/tools/app/open-in-app.d.mts.map +0 -1
- package/tools/app/open-in-app.d.ts.map +0 -1
- package/tools/app/open-in-app.js.map +0 -1
- package/tools/app/open-in-app.mjs.map +0 -1
- package/tools/messages/attachments/download-attachment.d.mts.map +0 -1
- package/tools/messages/attachments/download-attachment.d.ts.map +0 -1
- package/tools/messages/attachments/download-attachment.js +0 -39
- package/tools/messages/attachments/download-attachment.js.map +0 -1
- package/tools/messages/attachments/download-attachment.mjs +0 -35
- package/tools/messages/attachments/download-attachment.mjs.map +0 -1
|
@@ -10,8 +10,8 @@ export const metadata: Metadata = {
|
|
|
10
10
|
operation: 'write',
|
|
11
11
|
tags: ['chats'],
|
|
12
12
|
httpMethod: 'post',
|
|
13
|
-
httpPath: '/
|
|
14
|
-
operationId: '
|
|
13
|
+
httpPath: '/v1/chats/{chatID}/archive',
|
|
14
|
+
operationId: 'archiveChat',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
@@ -22,8 +22,7 @@ export const tool: Tool = {
|
|
|
22
22
|
properties: {
|
|
23
23
|
chatID: {
|
|
24
24
|
type: 'string',
|
|
25
|
-
description:
|
|
26
|
-
'The identifier of the chat to archive or unarchive (accepts both chatID and local chat ID)',
|
|
25
|
+
description: 'Unique identifier of the chat.',
|
|
27
26
|
},
|
|
28
27
|
archived: {
|
|
29
28
|
type: 'boolean',
|
|
@@ -36,8 +35,9 @@ export const tool: Tool = {
|
|
|
36
35
|
};
|
|
37
36
|
|
|
38
37
|
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
39
|
-
const body = args as any;
|
|
40
|
-
|
|
38
|
+
const { chatID, ...body } = args as any;
|
|
39
|
+
const response = await client.chats.archive(chatID, body).asResponse();
|
|
40
|
+
return asTextContentResult(await response.text());
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
export default { metadata, tool, handler };
|
|
@@ -10,8 +10,8 @@ export const metadata: Metadata = {
|
|
|
10
10
|
operation: 'read',
|
|
11
11
|
tags: ['chats'],
|
|
12
12
|
httpMethod: 'get',
|
|
13
|
-
httpPath: '/
|
|
14
|
-
operationId: '
|
|
13
|
+
httpPath: '/v1/chats/{chatID}',
|
|
14
|
+
operationId: 'getChat',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
@@ -22,13 +22,12 @@ export const tool: Tool = {
|
|
|
22
22
|
properties: {
|
|
23
23
|
chatID: {
|
|
24
24
|
type: 'string',
|
|
25
|
-
description:
|
|
26
|
-
"Unique identifier of the chat to retrieve. Not available for iMessage chats. Participants are limited by 'maxParticipantCount'.",
|
|
25
|
+
description: 'Unique identifier of the chat.',
|
|
27
26
|
},
|
|
28
27
|
maxParticipantCount: {
|
|
29
28
|
type: 'integer',
|
|
30
29
|
description:
|
|
31
|
-
'Maximum number of participants to return. Use -1 for all; otherwise 0–500. Defaults to
|
|
30
|
+
'Maximum number of participants to return. Use -1 for all; otherwise 0–500. Defaults to all (-1).',
|
|
32
31
|
},
|
|
33
32
|
},
|
|
34
33
|
required: ['chatID'],
|
|
@@ -39,8 +38,8 @@ export const tool: Tool = {
|
|
|
39
38
|
};
|
|
40
39
|
|
|
41
40
|
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
42
|
-
const body = args as any;
|
|
43
|
-
return asTextContentResult(await client.chats.retrieve(body));
|
|
41
|
+
const { chatID, ...body } = args as any;
|
|
42
|
+
return asTextContentResult(await client.chats.retrieve(chatID, body));
|
|
44
43
|
};
|
|
45
44
|
|
|
46
45
|
export default { metadata, tool, handler };
|
|
@@ -9,9 +9,9 @@ export const metadata: Metadata = {
|
|
|
9
9
|
resource: 'chats.reminders',
|
|
10
10
|
operation: 'write',
|
|
11
11
|
tags: ['chats'],
|
|
12
|
-
httpMethod: '
|
|
13
|
-
httpPath: '/
|
|
14
|
-
operationId: '
|
|
12
|
+
httpMethod: 'delete',
|
|
13
|
+
httpPath: '/v1/chats/{chatID}/reminders',
|
|
14
|
+
operationId: 'clearChatReminder',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
@@ -22,18 +22,20 @@ export const tool: Tool = {
|
|
|
22
22
|
properties: {
|
|
23
23
|
chatID: {
|
|
24
24
|
type: 'string',
|
|
25
|
-
description:
|
|
26
|
-
'The identifier of the chat to clear reminder from (accepts both chatID and local chat ID)',
|
|
25
|
+
description: 'Unique identifier of the chat.',
|
|
27
26
|
},
|
|
28
27
|
},
|
|
29
28
|
required: ['chatID'],
|
|
30
29
|
},
|
|
31
|
-
annotations: {
|
|
30
|
+
annotations: {
|
|
31
|
+
idempotentHint: true,
|
|
32
|
+
},
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
35
|
-
const body = args as any;
|
|
36
|
-
|
|
36
|
+
const { chatID, ...body } = args as any;
|
|
37
|
+
const response = await client.chats.reminders.delete(chatID).asResponse();
|
|
38
|
+
return asTextContentResult(await response.text());
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
export default { metadata, tool, handler };
|
|
@@ -10,8 +10,8 @@ export const metadata: Metadata = {
|
|
|
10
10
|
operation: 'write',
|
|
11
11
|
tags: ['chats'],
|
|
12
12
|
httpMethod: 'post',
|
|
13
|
-
httpPath: '/
|
|
14
|
-
operationId: '
|
|
13
|
+
httpPath: '/v1/chats/{chatID}/reminders',
|
|
14
|
+
operationId: 'setChatReminder',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
@@ -22,7 +22,7 @@ export const tool: Tool = {
|
|
|
22
22
|
properties: {
|
|
23
23
|
chatID: {
|
|
24
24
|
type: 'string',
|
|
25
|
-
description: '
|
|
25
|
+
description: 'Unique identifier of the chat.',
|
|
26
26
|
},
|
|
27
27
|
reminder: {
|
|
28
28
|
type: 'object',
|
|
@@ -46,8 +46,9 @@ export const tool: Tool = {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
49
|
-
const body = args as any;
|
|
50
|
-
|
|
49
|
+
const { chatID, ...body } = args as any;
|
|
50
|
+
const response = await client.chats.reminders.create(chatID, body).asResponse();
|
|
51
|
+
return asTextContentResult(await response.text());
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
export default { metadata, tool, handler };
|
|
@@ -10,13 +10,14 @@ export const metadata: Metadata = {
|
|
|
10
10
|
operation: 'read',
|
|
11
11
|
tags: ['chats'],
|
|
12
12
|
httpMethod: 'get',
|
|
13
|
-
httpPath: '/
|
|
14
|
-
operationId: '
|
|
13
|
+
httpPath: '/v1/chats/search',
|
|
14
|
+
operationId: 'searchChats',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'search_chats',
|
|
19
|
-
description:
|
|
19
|
+
description:
|
|
20
|
+
"Search chats by title/network or participants using Beeper Desktop's renderer algorithm. Optional 'scope'.",
|
|
20
21
|
inputSchema: {
|
|
21
22
|
type: 'object',
|
|
22
23
|
properties: {
|
|
@@ -25,17 +26,17 @@ export const tool: Tool = {
|
|
|
25
26
|
description: 'Provide an array of account IDs to filter chats from specific messaging accounts only',
|
|
26
27
|
items: {
|
|
27
28
|
type: 'string',
|
|
28
|
-
description: '
|
|
29
|
+
description: 'Account ID this resource belongs to.',
|
|
29
30
|
},
|
|
30
31
|
},
|
|
31
32
|
cursor: {
|
|
32
33
|
type: 'string',
|
|
33
|
-
description:
|
|
34
|
+
description: "Opaque pagination cursor; do not inspect. Use together with 'direction'.",
|
|
34
35
|
},
|
|
35
36
|
direction: {
|
|
36
37
|
type: 'string',
|
|
37
38
|
description:
|
|
38
|
-
|
|
39
|
+
"Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.",
|
|
39
40
|
enum: ['after', 'before'],
|
|
40
41
|
},
|
|
41
42
|
inbox: {
|
|
@@ -65,21 +66,22 @@ export const tool: Tool = {
|
|
|
65
66
|
type: 'integer',
|
|
66
67
|
description: 'Set the maximum number of chats to retrieve. Valid range: 1-200, default is 50',
|
|
67
68
|
},
|
|
68
|
-
|
|
69
|
+
query: {
|
|
69
70
|
type: 'string',
|
|
70
71
|
description:
|
|
71
|
-
'
|
|
72
|
+
'Literal token search (non-semantic). Use single words users type (e.g., "dinner"). When multiple words provided, ALL must match. Case-insensitive.',
|
|
72
73
|
},
|
|
73
|
-
|
|
74
|
+
scope: {
|
|
74
75
|
type: 'string',
|
|
75
76
|
description:
|
|
76
|
-
|
|
77
|
+
"Search scope: 'titles' matches title + network; 'participants' matches participant names.",
|
|
78
|
+
enum: ['titles', 'participants'],
|
|
77
79
|
},
|
|
78
80
|
type: {
|
|
79
81
|
type: 'string',
|
|
80
82
|
description:
|
|
81
|
-
'Specify the type of chats to retrieve: use "single" for direct messages, "group" for group chats,
|
|
82
|
-
enum: ['single', 'group', '
|
|
83
|
+
'Specify the type of chats to retrieve: use "single" for direct messages, "group" for group chats, or "any" to get all types',
|
|
84
|
+
enum: ['single', 'group', 'any'],
|
|
83
85
|
},
|
|
84
86
|
unreadOnly: {
|
|
85
87
|
type: 'boolean',
|
package/src/tools/index.ts
CHANGED
|
@@ -4,16 +4,17 @@ import { Metadata, Endpoint, HandlerFunction } from './types';
|
|
|
4
4
|
|
|
5
5
|
export { Metadata, Endpoint, HandlerFunction };
|
|
6
6
|
|
|
7
|
+
import focus_app from './top-level/focus-app';
|
|
8
|
+
import search from './top-level/search';
|
|
7
9
|
import get_accounts from './accounts/get-accounts';
|
|
8
|
-
import open_in_app from './app/open-in-app';
|
|
9
10
|
import get_chat from './chats/get-chat';
|
|
10
11
|
import archive_chat from './chats/archive-chat';
|
|
11
12
|
import search_chats from './chats/search-chats';
|
|
12
13
|
import set_chat_reminder from './chats/reminders/set-chat-reminder';
|
|
13
14
|
import clear_chat_reminder from './chats/reminders/clear-chat-reminder';
|
|
15
|
+
import list_messages from './messages/list-messages';
|
|
14
16
|
import search_messages from './messages/search-messages';
|
|
15
17
|
import send_message from './messages/send-message';
|
|
16
|
-
import download_attachment from './messages/attachments/download-attachment';
|
|
17
18
|
|
|
18
19
|
export const endpoints: Endpoint[] = [];
|
|
19
20
|
|
|
@@ -21,16 +22,17 @@ function addEndpoint(endpoint: Endpoint) {
|
|
|
21
22
|
endpoints.push(endpoint);
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
addEndpoint(focus_app);
|
|
26
|
+
addEndpoint(search);
|
|
24
27
|
addEndpoint(get_accounts);
|
|
25
|
-
addEndpoint(open_in_app);
|
|
26
28
|
addEndpoint(get_chat);
|
|
27
29
|
addEndpoint(archive_chat);
|
|
28
30
|
addEndpoint(search_chats);
|
|
29
31
|
addEndpoint(set_chat_reminder);
|
|
30
32
|
addEndpoint(clear_chat_reminder);
|
|
33
|
+
addEndpoint(list_messages);
|
|
31
34
|
addEndpoint(search_messages);
|
|
32
35
|
addEndpoint(send_message);
|
|
33
|
-
addEndpoint(download_attachment);
|
|
34
36
|
|
|
35
37
|
export type Filter = {
|
|
36
38
|
type: 'resource' | 'operation' | 'tag' | 'tool';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { Metadata, asTextContentResult } from '@beeper/desktop-mcp/tools/types';
|
|
4
|
+
|
|
5
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
+
import BeeperDesktop from '@beeper/desktop-api';
|
|
7
|
+
|
|
8
|
+
export const metadata: Metadata = {
|
|
9
|
+
resource: 'messages',
|
|
10
|
+
operation: 'read',
|
|
11
|
+
tags: ['messages'],
|
|
12
|
+
httpMethod: 'get',
|
|
13
|
+
httpPath: '/v1/chats/{chatID}/messages',
|
|
14
|
+
operationId: 'listMessages',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const tool: Tool = {
|
|
18
|
+
name: 'list_messages',
|
|
19
|
+
description: 'List messages from a specific chat with pagination support.',
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
properties: {
|
|
23
|
+
chatID: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'Unique identifier of the chat.',
|
|
26
|
+
},
|
|
27
|
+
cursor: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: "Opaque pagination cursor; do not inspect. Use together with 'direction'.",
|
|
30
|
+
},
|
|
31
|
+
direction: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description:
|
|
34
|
+
"Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.",
|
|
35
|
+
enum: ['after', 'before'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ['chatID'],
|
|
39
|
+
},
|
|
40
|
+
annotations: {
|
|
41
|
+
readOnlyHint: true,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
46
|
+
const { chatID, ...body } = args as any;
|
|
47
|
+
const response = await client.messages.list(chatID, body).asResponse();
|
|
48
|
+
return asTextContentResult(await response.json());
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default { metadata, tool, handler };
|
|
@@ -10,28 +10,28 @@ export const metadata: Metadata = {
|
|
|
10
10
|
operation: 'read',
|
|
11
11
|
tags: ['messages'],
|
|
12
12
|
httpMethod: 'get',
|
|
13
|
-
httpPath: '/
|
|
14
|
-
operationId: '
|
|
13
|
+
httpPath: '/v1/messages/search',
|
|
14
|
+
operationId: 'searchMessages',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'search_messages',
|
|
19
19
|
description:
|
|
20
|
-
'Search messages across chats using Beeper\'s message index.\n- When to use: find messages by text and/or filters (chatIDs, accountIDs, chatType, media type filters, sender, date ranges).\n- CRITICAL: Query is LITERAL WORD MATCHING, NOT semantic search! Only finds messages containing these EXACT words.\n • ✅ RIGHT: query="dinner" or query="sick" or query="error" (single words users type)\n • ❌ WRONG: query="dinner plans tonight" or query="health issues" (phrases/concepts)\n • The query matches ALL words provided (in any order). Example: query="flight booking" finds messages with both "flight" AND "booking".\n-
|
|
20
|
+
'Search messages across chats using Beeper\'s message index.\n- When to use: find messages by text and/or filters (chatIDs, accountIDs, chatType, media type filters, sender, date ranges).\n- CRITICAL: Query is LITERAL WORD MATCHING, NOT semantic search! Only finds messages containing these EXACT words.\n • ✅ RIGHT: query="dinner" or query="sick" or query="error" (single words users type)\n • ❌ WRONG: query="dinner plans tonight" or query="health issues" (phrases/concepts)\n • The query matches ALL words provided (in any order). Example: query="flight booking" finds messages with both "flight" AND "booking".\n- Performance: provide chatIDs/accountIDs when known. Omitted \'query\' returns results based on filters only. Partial matches enabled; \'excludeLowPriority\' defaults to true.\n- Workflow tip: To search messages in specific conversations: 1) Use find-chats to get chatIDs, 2) Use search-messages with those chatIDs.\n- IMPORTANT: Chat names vary widely. ASK the user for clarification:\n • "Which chat do you mean by family?" (could be "The Smiths", "Mom Dad Kids", etc.)\n • "What\'s the name of your work chat?" (could be "Team", company name, project name)\n • "Who are the participants?" (use scope="participants" in search-chats)\nReturns: matching messages and referenced chats.',
|
|
21
21
|
inputSchema: {
|
|
22
22
|
type: 'object',
|
|
23
23
|
properties: {
|
|
24
24
|
accountIDs: {
|
|
25
25
|
type: 'array',
|
|
26
|
-
description: 'Limit search to specific
|
|
26
|
+
description: 'Limit search to specific account IDs.',
|
|
27
27
|
items: {
|
|
28
28
|
type: 'string',
|
|
29
|
-
description: '
|
|
29
|
+
description: 'Account ID this resource belongs to.',
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
chatIDs: {
|
|
33
33
|
type: 'array',
|
|
34
|
-
description: 'Limit search to specific
|
|
34
|
+
description: 'Limit search to specific chat IDs.',
|
|
35
35
|
items: {
|
|
36
36
|
type: 'string',
|
|
37
37
|
},
|
|
@@ -75,27 +75,16 @@ export const tool: Tool = {
|
|
|
75
75
|
},
|
|
76
76
|
limit: {
|
|
77
77
|
type: 'integer',
|
|
78
|
-
description: 'Maximum number of messages to return
|
|
78
|
+
description: 'Maximum number of messages to return.',
|
|
79
79
|
},
|
|
80
|
-
|
|
81
|
-
type: '
|
|
82
|
-
description:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
onlyWithLink: {
|
|
89
|
-
type: 'boolean',
|
|
90
|
-
description: 'Only return messages that contain link attachments.',
|
|
91
|
-
},
|
|
92
|
-
onlyWithMedia: {
|
|
93
|
-
type: 'boolean',
|
|
94
|
-
description: 'Only return messages that contain any type of media attachment.',
|
|
95
|
-
},
|
|
96
|
-
onlyWithVideo: {
|
|
97
|
-
type: 'boolean',
|
|
98
|
-
description: 'Only return messages that contain video attachments.',
|
|
80
|
+
mediaTypes: {
|
|
81
|
+
type: 'array',
|
|
82
|
+
description:
|
|
83
|
+
"Filter messages by media types. Use ['any'] for any media type, or specify exact types like ['video', 'image']. Omit for no media filtering.",
|
|
84
|
+
items: {
|
|
85
|
+
type: 'string',
|
|
86
|
+
enum: ['any', 'video', 'image', 'link', 'file'],
|
|
87
|
+
},
|
|
99
88
|
},
|
|
100
89
|
query: {
|
|
101
90
|
type: 'string',
|
|
@@ -10,8 +10,8 @@ export const metadata: Metadata = {
|
|
|
10
10
|
operation: 'write',
|
|
11
11
|
tags: ['messages'],
|
|
12
12
|
httpMethod: 'post',
|
|
13
|
-
httpPath: '/
|
|
14
|
-
operationId: '
|
|
13
|
+
httpPath: '/v1/chats/{chatID}/messages',
|
|
14
|
+
operationId: 'sendMessage',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
@@ -23,8 +23,7 @@ export const tool: Tool = {
|
|
|
23
23
|
properties: {
|
|
24
24
|
chatID: {
|
|
25
25
|
type: 'string',
|
|
26
|
-
description:
|
|
27
|
-
'The identifier of the chat where the message will send (accepts both chatID and local chat ID)',
|
|
26
|
+
description: 'Unique identifier of the chat.',
|
|
28
27
|
},
|
|
29
28
|
replyToMessageID: {
|
|
30
29
|
type: 'string',
|
|
@@ -41,8 +40,8 @@ export const tool: Tool = {
|
|
|
41
40
|
};
|
|
42
41
|
|
|
43
42
|
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
44
|
-
const body = args as any;
|
|
45
|
-
return asTextContentResult(await client.messages.send(body));
|
|
43
|
+
const { chatID, ...body } = args as any;
|
|
44
|
+
return asTextContentResult(await client.messages.send(chatID, body));
|
|
46
45
|
};
|
|
47
46
|
|
|
48
47
|
export default { metadata, tool, handler };
|
|
@@ -6,17 +6,18 @@ import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
|
6
6
|
import BeeperDesktop from '@beeper/desktop-api';
|
|
7
7
|
|
|
8
8
|
export const metadata: Metadata = {
|
|
9
|
-
resource: '
|
|
9
|
+
resource: '$client',
|
|
10
10
|
operation: 'write',
|
|
11
11
|
tags: ['app'],
|
|
12
12
|
httpMethod: 'post',
|
|
13
|
-
httpPath: '/
|
|
14
|
-
operationId: '
|
|
13
|
+
httpPath: '/v1/focus',
|
|
14
|
+
operationId: 'focusApp',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
|
-
name: '
|
|
19
|
-
description:
|
|
18
|
+
name: 'focus_app',
|
|
19
|
+
description:
|
|
20
|
+
'Focus Beeper Desktop and optionally navigate to a specific chat, message, or pre-fill draft text and attachment.',
|
|
20
21
|
inputSchema: {
|
|
21
22
|
type: 'object',
|
|
22
23
|
properties: {
|
|
@@ -25,13 +26,17 @@ export const tool: Tool = {
|
|
|
25
26
|
description:
|
|
26
27
|
'Optional Beeper chat ID (or local chat ID) to focus after opening the app. If omitted, only opens/focuses the app.',
|
|
27
28
|
},
|
|
29
|
+
draftAttachmentPath: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Optional draft attachment path to populate in the message input field.',
|
|
32
|
+
},
|
|
28
33
|
draftText: {
|
|
29
34
|
type: 'string',
|
|
30
35
|
description: 'Optional draft text to populate in the message input field.',
|
|
31
36
|
},
|
|
32
|
-
|
|
37
|
+
messageID: {
|
|
33
38
|
type: 'string',
|
|
34
|
-
description: 'Optional message
|
|
39
|
+
description: 'Optional message ID. Jumps to that message in the chat when opening.',
|
|
35
40
|
},
|
|
36
41
|
},
|
|
37
42
|
required: [],
|
|
@@ -41,7 +46,7 @@ export const tool: Tool = {
|
|
|
41
46
|
|
|
42
47
|
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
43
48
|
const body = args as any;
|
|
44
|
-
return asTextContentResult(await client.
|
|
49
|
+
return asTextContentResult(await client.focus(body));
|
|
45
50
|
};
|
|
46
51
|
|
|
47
52
|
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { Metadata, asTextContentResult } from '@beeper/desktop-mcp/tools/types';
|
|
4
|
+
|
|
5
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
+
import BeeperDesktop from '@beeper/desktop-api';
|
|
7
|
+
|
|
8
|
+
export const metadata: Metadata = {
|
|
9
|
+
resource: '$client',
|
|
10
|
+
operation: 'read',
|
|
11
|
+
tags: ['app'],
|
|
12
|
+
httpMethod: 'get',
|
|
13
|
+
httpPath: '/v1/search',
|
|
14
|
+
operationId: 'search',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const tool: Tool = {
|
|
18
|
+
name: 'search',
|
|
19
|
+
description:
|
|
20
|
+
'Search for chats, participant name matches in groups, and the first page of messages in one call. Use this when the user asks for a specific chat, group, or person.',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
query: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'User-typed search text. Literal word matching (NOT semantic).',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ['query'],
|
|
30
|
+
},
|
|
31
|
+
annotations: {
|
|
32
|
+
readOnlyHint: true,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
37
|
+
const body = args as any;
|
|
38
|
+
return asTextContentResult(await client.search(body));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default { metadata, tool, handler };
|
|
@@ -8,12 +8,12 @@ exports.metadata = {
|
|
|
8
8
|
operation: 'read',
|
|
9
9
|
tags: ['accounts'],
|
|
10
10
|
httpMethod: 'get',
|
|
11
|
-
httpPath: '/
|
|
12
|
-
operationId: '
|
|
11
|
+
httpPath: '/v1/accounts',
|
|
12
|
+
operationId: 'getAccounts',
|
|
13
13
|
};
|
|
14
14
|
exports.tool = {
|
|
15
15
|
name: 'get_accounts',
|
|
16
|
-
description: 'List connected accounts on this device.
|
|
16
|
+
description: 'List connected accounts on this device.',
|
|
17
17
|
inputSchema: {
|
|
18
18
|
type: 'object',
|
|
19
19
|
properties: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-accounts.js","sourceRoot":"","sources":["../../src/tools/accounts/get-accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAgF;AAKnE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"get-accounts.js","sourceRoot":"","sources":["../../src/tools/accounts/get-accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAgF;AAKnE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,cAAc;IACxB,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,yCAAyC;IACtD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AAC3D,CAAC,CAAC;AAFW,QAAA,OAAO,WAElB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -5,12 +5,12 @@ export const metadata = {
|
|
|
5
5
|
operation: 'read',
|
|
6
6
|
tags: ['accounts'],
|
|
7
7
|
httpMethod: 'get',
|
|
8
|
-
httpPath: '/
|
|
9
|
-
operationId: '
|
|
8
|
+
httpPath: '/v1/accounts',
|
|
9
|
+
operationId: 'getAccounts',
|
|
10
10
|
};
|
|
11
11
|
export const tool = {
|
|
12
12
|
name: 'get_accounts',
|
|
13
|
-
description: 'List connected accounts on this device.
|
|
13
|
+
description: 'List connected accounts on this device.',
|
|
14
14
|
inputSchema: {
|
|
15
15
|
type: 'object',
|
|
16
16
|
properties: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-accounts.mjs","sourceRoot":"","sources":["../../src/tools/accounts/get-accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAY,mBAAmB,EAAE,MAAM,iCAAiC;AAK/E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"get-accounts.mjs","sourceRoot":"","sources":["../../src/tools/accounts/get-accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAY,mBAAmB,EAAE,MAAM,iCAAiC;AAK/E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,cAAc;IACxB,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,yCAAyC;IACtD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,OAAO,mBAAmB,CAAC,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AAC3D,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-chat.d.mts","sourceRoot":"","sources":["../../src/tools/chats/archive-chat.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB,MAAM,iCAAiC;OAExE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,aAAa,MAAM,qBAAqB;AAE/C,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"archive-chat.d.mts","sourceRoot":"","sources":["../../src/tools/chats/archive-chat.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB,MAAM,iCAAiC;OAExE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,aAAa,MAAM,qBAAqB;AAE/C,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAkBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,sEAI7F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAJoC,aAAa,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAM9F,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-chat.d.ts","sourceRoot":"","sources":["../../src/tools/chats/archive-chat.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB,MAAM,iCAAiC;OAExE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,aAAa,MAAM,qBAAqB;AAE/C,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"archive-chat.d.ts","sourceRoot":"","sources":["../../src/tools/chats/archive-chat.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB,MAAM,iCAAiC;OAExE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,aAAa,MAAM,qBAAqB;AAE/C,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAkBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,sEAI7F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAJoC,aAAa,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAM9F,wBAA2C"}
|
|
@@ -8,8 +8,8 @@ exports.metadata = {
|
|
|
8
8
|
operation: 'write',
|
|
9
9
|
tags: ['chats'],
|
|
10
10
|
httpMethod: 'post',
|
|
11
|
-
httpPath: '/
|
|
12
|
-
operationId: '
|
|
11
|
+
httpPath: '/v1/chats/{chatID}/archive',
|
|
12
|
+
operationId: 'archiveChat',
|
|
13
13
|
};
|
|
14
14
|
exports.tool = {
|
|
15
15
|
name: 'archive_chat',
|
|
@@ -19,7 +19,7 @@ exports.tool = {
|
|
|
19
19
|
properties: {
|
|
20
20
|
chatID: {
|
|
21
21
|
type: 'string',
|
|
22
|
-
description: '
|
|
22
|
+
description: 'Unique identifier of the chat.',
|
|
23
23
|
},
|
|
24
24
|
archived: {
|
|
25
25
|
type: 'boolean',
|
|
@@ -31,8 +31,9 @@ exports.tool = {
|
|
|
31
31
|
annotations: {},
|
|
32
32
|
};
|
|
33
33
|
const handler = async (client, args) => {
|
|
34
|
-
const body = args;
|
|
35
|
-
|
|
34
|
+
const { chatID, ...body } = args;
|
|
35
|
+
const response = await client.chats.archive(chatID, body).asResponse();
|
|
36
|
+
return (0, types_1.asTextContentResult)(await response.text());
|
|
36
37
|
};
|
|
37
38
|
exports.handler = handler;
|
|
38
39
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-chat.js","sourceRoot":"","sources":["../../src/tools/chats/archive-chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAgF;AAKnE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"archive-chat.js","sourceRoot":"","sources":["../../src/tools/chats/archive-chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAgF;AAKnE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,4BAA4B;IACtC,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,8BAA8B;IAC3C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gCAAgC;aAC9C;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,qCAAqC;aACnD;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IACvE,OAAO,IAAA,2BAAmB,EAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC;AAJW,QAAA,OAAO,WAIlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -5,8 +5,8 @@ export const metadata = {
|
|
|
5
5
|
operation: 'write',
|
|
6
6
|
tags: ['chats'],
|
|
7
7
|
httpMethod: 'post',
|
|
8
|
-
httpPath: '/
|
|
9
|
-
operationId: '
|
|
8
|
+
httpPath: '/v1/chats/{chatID}/archive',
|
|
9
|
+
operationId: 'archiveChat',
|
|
10
10
|
};
|
|
11
11
|
export const tool = {
|
|
12
12
|
name: 'archive_chat',
|
|
@@ -16,7 +16,7 @@ export const tool = {
|
|
|
16
16
|
properties: {
|
|
17
17
|
chatID: {
|
|
18
18
|
type: 'string',
|
|
19
|
-
description: '
|
|
19
|
+
description: 'Unique identifier of the chat.',
|
|
20
20
|
},
|
|
21
21
|
archived: {
|
|
22
22
|
type: 'boolean',
|
|
@@ -28,8 +28,9 @@ export const tool = {
|
|
|
28
28
|
annotations: {},
|
|
29
29
|
};
|
|
30
30
|
export const handler = async (client, args) => {
|
|
31
|
-
const body = args;
|
|
32
|
-
|
|
31
|
+
const { chatID, ...body } = args;
|
|
32
|
+
const response = await client.chats.archive(chatID, body).asResponse();
|
|
33
|
+
return asTextContentResult(await response.text());
|
|
33
34
|
};
|
|
34
35
|
export default { metadata, tool, handler };
|
|
35
36
|
//# sourceMappingURL=archive-chat.mjs.map
|