@beeper/desktop-mcp 4.2.3 → 4.7.0
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/LICENSE +1 -1
- package/README.md +18 -199
- package/auth.d.mts +6 -0
- package/auth.d.mts.map +1 -0
- package/auth.d.ts +6 -0
- package/auth.d.ts.map +1 -0
- package/auth.js +37 -0
- package/auth.js.map +1 -0
- package/auth.mjs +32 -0
- package/auth.mjs.map +1 -0
- package/code-tool-types.d.mts +7 -7
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts +7 -7
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +103 -19
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +103 -19
- package/code-tool-worker.mjs.map +1 -1
- package/code-tool.d.mts +12 -3
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +12 -3
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +276 -95
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +273 -95
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +22 -9
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +22 -9
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +37 -6
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +37 -6
- package/docs-search-tool.mjs.map +1 -1
- package/http.d.mts +6 -9
- package/http.d.mts.map +1 -1
- package/http.d.ts +6 -9
- package/http.d.ts.map +1 -1
- package/http.js +81 -47
- package/http.js.map +1 -1
- package/http.mjs +80 -43
- package/http.mjs.map +1 -1
- package/index.js +19 -50
- package/index.js.map +1 -1
- package/index.mjs +19 -50
- package/index.mjs.map +1 -1
- package/instructions.d.mts +2 -0
- package/instructions.d.mts.map +1 -0
- package/instructions.d.ts +2 -0
- package/instructions.d.ts.map +1 -0
- package/instructions.js +48 -0
- package/instructions.js.map +1 -0
- package/instructions.mjs +45 -0
- package/instructions.mjs.map +1 -0
- package/logger.d.mts +7 -0
- package/logger.d.mts.map +1 -0
- package/logger.d.ts +7 -0
- package/logger.d.ts.map +1 -0
- package/logger.js +29 -0
- package/logger.js.map +1 -0
- package/logger.mjs +22 -0
- package/logger.mjs.map +1 -0
- package/methods.d.mts +10 -0
- package/methods.d.mts.map +1 -0
- package/methods.d.ts +10 -0
- package/methods.d.ts.map +1 -0
- package/methods.js +203 -0
- package/methods.js.map +1 -0
- package/methods.mjs +199 -0
- package/methods.mjs.map +1 -0
- package/options.d.mts +9 -9
- package/options.d.mts.map +1 -1
- package/options.d.ts +9 -9
- package/options.d.ts.map +1 -1
- package/options.js +54 -359
- package/options.js.map +1 -1
- package/options.mjs +54 -359
- package/options.mjs.map +1 -1
- package/package.json +68 -72
- package/server.d.mts +10 -16
- package/server.d.mts.map +1 -1
- package/server.d.ts +10 -16
- package/server.d.ts.map +1 -1
- package/server.js +82 -101
- package/server.js.map +1 -1
- package/server.mjs +81 -96
- package/server.mjs.map +1 -1
- package/src/auth.ts +42 -0
- package/src/code-tool-types.ts +8 -5
- package/src/code-tool-worker.ts +118 -34
- package/src/code-tool.ts +359 -118
- package/src/docs-search-tool.ts +59 -7
- package/src/http.ts +99 -50
- package/src/index.ts +22 -63
- package/src/instructions.ts +67 -0
- package/src/logger.ts +28 -0
- package/src/methods.ts +224 -0
- package/src/options.ts +72 -384
- package/src/server.ts +94 -117
- package/src/stdio.ts +6 -5
- package/src/{tools/types.ts → types.ts} +25 -5
- package/src/util.ts +25 -0
- package/stdio.d.mts +1 -1
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts +1 -1
- package/stdio.d.ts.map +1 -1
- package/stdio.js +5 -4
- package/stdio.js.map +1 -1
- package/stdio.mjs +5 -4
- package/stdio.mjs.map +1 -1
- package/{tools/types.d.mts → types.d.mts} +10 -2
- package/types.d.mts.map +1 -0
- package/{tools/types.d.ts → types.d.ts} +10 -2
- package/types.d.ts.map +1 -0
- package/{tools/types.js → types.js} +12 -0
- package/types.js.map +1 -0
- package/{tools/types.mjs → types.mjs} +11 -0
- package/types.mjs.map +1 -0
- package/util.d.mts +4 -0
- package/util.d.mts.map +1 -0
- package/util.d.ts +4 -0
- package/util.d.ts.map +1 -0
- package/util.js +30 -0
- package/util.js.map +1 -0
- package/util.mjs +24 -0
- package/util.mjs.map +1 -0
- package/compat.d.mts +0 -58
- package/compat.d.mts.map +0 -1
- package/compat.d.ts +0 -58
- package/compat.d.ts.map +0 -1
- package/compat.js +0 -387
- package/compat.js.map +0 -1
- package/compat.mjs +0 -378
- package/compat.mjs.map +0 -1
- package/dynamic-tools.d.mts +0 -12
- package/dynamic-tools.d.mts.map +0 -1
- package/dynamic-tools.d.ts +0 -12
- package/dynamic-tools.d.ts.map +0 -1
- package/dynamic-tools.js +0 -135
- package/dynamic-tools.js.map +0 -1
- package/dynamic-tools.mjs +0 -132
- package/dynamic-tools.mjs.map +0 -1
- package/filtering.d.mts +0 -2
- package/filtering.d.mts.map +0 -1
- package/filtering.d.ts +0 -2
- package/filtering.d.ts.map +0 -1
- package/filtering.js +0 -20
- package/filtering.js.map +0 -1
- package/filtering.mjs +0 -13
- package/filtering.mjs.map +0 -1
- package/handlers/get-accounts.d.mts +0 -3
- package/handlers/get-accounts.d.mts.map +0 -1
- package/handlers/get-accounts.d.ts +0 -3
- package/handlers/get-accounts.d.ts.map +0 -1
- package/handlers/get-accounts.js +0 -32
- package/handlers/get-accounts.js.map +0 -1
- package/handlers/get-accounts.mjs +0 -28
- package/handlers/get-accounts.mjs.map +0 -1
- package/handlers/get-chat.d.mts +0 -3
- package/handlers/get-chat.d.mts.map +0 -1
- package/handlers/get-chat.d.ts +0 -3
- package/handlers/get-chat.d.ts.map +0 -1
- package/handlers/get-chat.js +0 -20
- package/handlers/get-chat.js.map +0 -1
- package/handlers/get-chat.mjs +0 -16
- package/handlers/get-chat.mjs.map +0 -1
- package/handlers/index.d.mts +0 -3
- package/handlers/index.d.mts.map +0 -1
- package/handlers/index.d.ts +0 -3
- package/handlers/index.d.ts.map +0 -1
- package/handlers/index.js +0 -30
- package/handlers/index.js.map +0 -1
- package/handlers/index.mjs +0 -27
- package/handlers/index.mjs.map +0 -1
- package/handlers/list-chats.d.mts +0 -3
- package/handlers/list-chats.d.mts.map +0 -1
- package/handlers/list-chats.d.ts +0 -3
- package/handlers/list-chats.d.ts.map +0 -1
- package/handlers/list-chats.js +0 -46
- package/handlers/list-chats.js.map +0 -1
- package/handlers/list-chats.mjs +0 -42
- package/handlers/list-chats.mjs.map +0 -1
- package/handlers/list-messages.d.mts +0 -3
- package/handlers/list-messages.d.mts.map +0 -1
- package/handlers/list-messages.d.ts +0 -3
- package/handlers/list-messages.d.ts.map +0 -1
- package/handlers/list-messages.js +0 -34
- package/handlers/list-messages.js.map +0 -1
- package/handlers/list-messages.mjs +0 -30
- package/handlers/list-messages.mjs.map +0 -1
- package/handlers/open-app.d.mts +0 -3
- package/handlers/open-app.d.mts.map +0 -1
- package/handlers/open-app.d.ts +0 -3
- package/handlers/open-app.d.ts.map +0 -1
- package/handlers/open-app.js +0 -26
- package/handlers/open-app.js.map +0 -1
- package/handlers/open-app.mjs +0 -22
- package/handlers/open-app.mjs.map +0 -1
- package/handlers/search-chats.d.mts +0 -3
- package/handlers/search-chats.d.mts.map +0 -1
- package/handlers/search-chats.d.ts +0 -3
- package/handlers/search-chats.d.ts.map +0 -1
- package/handlers/search-chats.js +0 -38
- package/handlers/search-chats.js.map +0 -1
- package/handlers/search-chats.mjs +0 -34
- package/handlers/search-chats.mjs.map +0 -1
- package/handlers/search-messages.d.mts +0 -3
- package/handlers/search-messages.d.mts.map +0 -1
- package/handlers/search-messages.d.ts +0 -3
- package/handlers/search-messages.d.ts.map +0 -1
- package/handlers/search-messages.js +0 -11
- package/handlers/search-messages.js.map +0 -1
- package/handlers/search-messages.mjs +0 -7
- package/handlers/search-messages.mjs.map +0 -1
- package/handlers/search.d.mts +0 -3
- package/handlers/search.d.mts.map +0 -1
- package/handlers/search.d.ts +0 -3
- package/handlers/search.d.ts.map +0 -1
- package/handlers/search.js +0 -29
- package/handlers/search.js.map +0 -1
- package/handlers/search.mjs +0 -25
- package/handlers/search.mjs.map +0 -1
- package/handlers/send-message.d.mts +0 -3
- package/handlers/send-message.d.mts.map +0 -1
- package/handlers/send-message.d.ts +0 -3
- package/handlers/send-message.d.ts.map +0 -1
- package/handlers/send-message.js +0 -20
- package/handlers/send-message.js.map +0 -1
- package/handlers/send-message.mjs +0 -16
- package/handlers/send-message.mjs.map +0 -1
- package/handlers/utils.d.mts +0 -29
- package/handlers/utils.d.mts.map +0 -1
- package/handlers/utils.d.ts +0 -29
- package/handlers/utils.d.ts.map +0 -1
- package/handlers/utils.js +0 -296
- package/handlers/utils.js.map +0 -1
- package/handlers/utils.mjs +0 -282
- package/handlers/utils.mjs.map +0 -1
- package/headers.d.mts +0 -4
- package/headers.d.mts.map +0 -1
- package/headers.d.ts +0 -4
- package/headers.d.ts.map +0 -1
- package/headers.js +0 -22
- package/headers.js.map +0 -1
- package/headers.mjs +0 -18
- package/headers.mjs.map +0 -1
- package/src/compat.ts +0 -483
- package/src/dynamic-tools.ts +0 -159
- package/src/filtering.ts +0 -14
- package/src/handlers/get-accounts.ts +0 -28
- package/src/handlers/get-chat.ts +0 -18
- package/src/handlers/index.ts +0 -29
- package/src/handlers/list-chats.ts +0 -47
- package/src/handlers/list-messages.ts +0 -33
- package/src/handlers/open-app.ts +0 -20
- package/src/handlers/search-chats.ts +0 -39
- package/src/handlers/search-messages.ts +0 -8
- package/src/handlers/search.ts +0 -24
- package/src/handlers/send-message.ts +0 -17
- package/src/handlers/utils.ts +0 -381
- package/src/headers.ts +0 -23
- package/src/tools/accounts/get-accounts.ts +0 -34
- package/src/tools/chats/archive-chat.ts +0 -43
- package/src/tools/chats/get-chat.ts +0 -45
- package/src/tools/chats/reminders/clear-chat-reminder.ts +0 -41
- package/src/tools/chats/reminders/set-chat-reminder.ts +0 -54
- package/src/tools/chats/search-chats.ts +0 -104
- package/src/tools/index.ts +0 -92
- package/src/tools/messages/list-messages.ts +0 -51
- package/src/tools/messages/search-messages.ts +0 -123
- package/src/tools/messages/send-message.ts +0 -47
- package/src/tools/top-level/focus-app.ts +0 -52
- package/src/tools/top-level/search.ts +0 -41
- package/src/tools.ts +0 -1
- package/tools/accounts/get-accounts.d.mts +0 -45
- package/tools/accounts/get-accounts.d.mts.map +0 -1
- package/tools/accounts/get-accounts.d.ts +0 -45
- package/tools/accounts/get-accounts.d.ts.map +0 -1
- package/tools/accounts/get-accounts.js +0 -31
- package/tools/accounts/get-accounts.js.map +0 -1
- package/tools/accounts/get-accounts.mjs +0 -27
- package/tools/accounts/get-accounts.mjs.map +0 -1
- package/tools/chats/archive-chat.d.mts +0 -45
- package/tools/chats/archive-chat.d.mts.map +0 -1
- package/tools/chats/archive-chat.d.ts +0 -45
- package/tools/chats/archive-chat.d.ts.map +0 -1
- package/tools/chats/archive-chat.js +0 -40
- package/tools/chats/archive-chat.js.map +0 -1
- package/tools/chats/archive-chat.mjs +0 -36
- package/tools/chats/archive-chat.mjs.map +0 -1
- package/tools/chats/get-chat.d.mts +0 -45
- package/tools/chats/get-chat.d.mts.map +0 -1
- package/tools/chats/get-chat.d.ts +0 -45
- package/tools/chats/get-chat.d.ts.map +0 -1
- package/tools/chats/get-chat.js +0 -41
- package/tools/chats/get-chat.js.map +0 -1
- package/tools/chats/get-chat.mjs +0 -37
- package/tools/chats/get-chat.mjs.map +0 -1
- package/tools/chats/reminders/clear-chat-reminder.d.mts +0 -45
- package/tools/chats/reminders/clear-chat-reminder.d.mts.map +0 -1
- package/tools/chats/reminders/clear-chat-reminder.d.ts +0 -45
- package/tools/chats/reminders/clear-chat-reminder.d.ts.map +0 -1
- package/tools/chats/reminders/clear-chat-reminder.js +0 -38
- package/tools/chats/reminders/clear-chat-reminder.js.map +0 -1
- package/tools/chats/reminders/clear-chat-reminder.mjs +0 -34
- package/tools/chats/reminders/clear-chat-reminder.mjs.map +0 -1
- package/tools/chats/reminders/set-chat-reminder.d.mts +0 -45
- package/tools/chats/reminders/set-chat-reminder.d.mts.map +0 -1
- package/tools/chats/reminders/set-chat-reminder.d.ts +0 -45
- package/tools/chats/reminders/set-chat-reminder.d.ts.map +0 -1
- package/tools/chats/reminders/set-chat-reminder.js +0 -51
- package/tools/chats/reminders/set-chat-reminder.js.map +0 -1
- package/tools/chats/reminders/set-chat-reminder.mjs +0 -47
- package/tools/chats/reminders/set-chat-reminder.mjs.map +0 -1
- package/tools/chats/search-chats.d.mts +0 -45
- package/tools/chats/search-chats.d.mts.map +0 -1
- package/tools/chats/search-chats.d.ts +0 -45
- package/tools/chats/search-chats.d.ts.map +0 -1
- package/tools/chats/search-chats.js +0 -92
- package/tools/chats/search-chats.js.map +0 -1
- package/tools/chats/search-chats.mjs +0 -88
- package/tools/chats/search-chats.mjs.map +0 -1
- package/tools/index.d.mts +0 -10
- package/tools/index.d.mts.map +0 -1
- package/tools/index.d.ts +0 -10
- package/tools/index.d.ts.map +0 -1
- package/tools/index.js +0 -76
- package/tools/index.js.map +0 -1
- package/tools/index.mjs +0 -69
- package/tools/index.mjs.map +0 -1
- package/tools/messages/list-messages.d.mts +0 -45
- package/tools/messages/list-messages.d.mts.map +0 -1
- package/tools/messages/list-messages.d.ts +0 -45
- package/tools/messages/list-messages.d.ts.map +0 -1
- package/tools/messages/list-messages.js +0 -47
- package/tools/messages/list-messages.js.map +0 -1
- package/tools/messages/list-messages.mjs +0 -43
- package/tools/messages/list-messages.mjs.map +0 -1
- package/tools/messages/search-messages.d.mts +0 -45
- package/tools/messages/search-messages.d.mts.map +0 -1
- package/tools/messages/search-messages.d.ts +0 -45
- package/tools/messages/search-messages.d.ts.map +0 -1
- package/tools/messages/search-messages.js +0 -110
- package/tools/messages/search-messages.js.map +0 -1
- package/tools/messages/search-messages.mjs +0 -106
- package/tools/messages/search-messages.mjs.map +0 -1
- package/tools/messages/send-message.d.mts +0 -45
- package/tools/messages/send-message.d.mts.map +0 -1
- package/tools/messages/send-message.d.ts +0 -45
- package/tools/messages/send-message.d.ts.map +0 -1
- package/tools/messages/send-message.js +0 -43
- package/tools/messages/send-message.js.map +0 -1
- package/tools/messages/send-message.mjs +0 -39
- package/tools/messages/send-message.mjs.map +0 -1
- package/tools/top-level/focus-app.d.mts +0 -45
- package/tools/top-level/focus-app.d.mts.map +0 -1
- package/tools/top-level/focus-app.d.ts +0 -45
- package/tools/top-level/focus-app.d.ts.map +0 -1
- package/tools/top-level/focus-app.js +0 -47
- package/tools/top-level/focus-app.js.map +0 -1
- package/tools/top-level/focus-app.mjs +0 -43
- package/tools/top-level/focus-app.mjs.map +0 -1
- package/tools/top-level/search.d.mts +0 -45
- package/tools/top-level/search.d.mts.map +0 -1
- package/tools/top-level/search.d.ts +0 -45
- package/tools/top-level/search.d.ts.map +0 -1
- package/tools/top-level/search.js +0 -37
- package/tools/top-level/search.js.map +0 -1
- package/tools/top-level/search.mjs +0 -33
- package/tools/top-level/search.mjs.map +0 -1
- package/tools/types.d.mts.map +0 -1
- package/tools/types.d.ts.map +0 -1
- package/tools/types.js.map +0 -1
- package/tools/types.mjs.map +0 -1
- package/tools.d.mts +0 -2
- package/tools.d.mts.map +0 -1
- package/tools.d.ts +0 -2
- package/tools.d.ts.map +0 -1
- package/tools.js +0 -18
- package/tools.js.map +0 -1
- package/tools.mjs +0 -2
- package/tools.mjs.map +0 -1
|
@@ -1,34 +0,0 @@
|
|
|
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: 'accounts',
|
|
10
|
-
operation: 'read',
|
|
11
|
-
tags: ['accounts'],
|
|
12
|
-
httpMethod: 'get',
|
|
13
|
-
httpPath: '/v1/accounts',
|
|
14
|
-
operationId: 'getAccounts',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const tool: Tool = {
|
|
18
|
-
name: 'get_accounts',
|
|
19
|
-
description: 'List connected accounts on this device.',
|
|
20
|
-
inputSchema: {
|
|
21
|
-
type: 'object',
|
|
22
|
-
properties: {},
|
|
23
|
-
required: [],
|
|
24
|
-
},
|
|
25
|
-
annotations: {
|
|
26
|
-
readOnlyHint: true,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
31
|
-
return asTextContentResult(await client.accounts.list());
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export default { metadata, tool, handler };
|
|
@@ -1,43 +0,0 @@
|
|
|
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: 'chats',
|
|
10
|
-
operation: 'write',
|
|
11
|
-
tags: ['chats'],
|
|
12
|
-
httpMethod: 'post',
|
|
13
|
-
httpPath: '/v1/chats/{chatID}/archive',
|
|
14
|
-
operationId: 'archiveChat',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const tool: Tool = {
|
|
18
|
-
name: 'archive_chat',
|
|
19
|
-
description: 'Archive or unarchive a chat.',
|
|
20
|
-
inputSchema: {
|
|
21
|
-
type: 'object',
|
|
22
|
-
properties: {
|
|
23
|
-
chatID: {
|
|
24
|
-
type: 'string',
|
|
25
|
-
description: 'Unique identifier of the chat.',
|
|
26
|
-
},
|
|
27
|
-
archived: {
|
|
28
|
-
type: 'boolean',
|
|
29
|
-
description: 'True to archive, false to unarchive',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
required: ['chatID'],
|
|
33
|
-
},
|
|
34
|
-
annotations: {},
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
38
|
-
const { chatID, ...body } = args as any;
|
|
39
|
-
const response = await client.chats.archive(chatID, body).asResponse();
|
|
40
|
-
return asTextContentResult(await response.text());
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export default { metadata, tool, handler };
|
|
@@ -1,45 +0,0 @@
|
|
|
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: 'chats',
|
|
10
|
-
operation: 'read',
|
|
11
|
-
tags: ['chats'],
|
|
12
|
-
httpMethod: 'get',
|
|
13
|
-
httpPath: '/v1/chats/{chatID}',
|
|
14
|
-
operationId: 'getChat',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const tool: Tool = {
|
|
18
|
-
name: 'get_chat',
|
|
19
|
-
description: 'Get chat details: metadata, participants (limited), last activity.',
|
|
20
|
-
inputSchema: {
|
|
21
|
-
type: 'object',
|
|
22
|
-
properties: {
|
|
23
|
-
chatID: {
|
|
24
|
-
type: 'string',
|
|
25
|
-
description: 'Unique identifier of the chat.',
|
|
26
|
-
},
|
|
27
|
-
maxParticipantCount: {
|
|
28
|
-
type: 'integer',
|
|
29
|
-
description:
|
|
30
|
-
'Maximum number of participants to return. Use -1 for all; otherwise 0–500. Defaults to all (-1).',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
required: ['chatID'],
|
|
34
|
-
},
|
|
35
|
-
annotations: {
|
|
36
|
-
readOnlyHint: true,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
41
|
-
const { chatID, ...body } = args as any;
|
|
42
|
-
return asTextContentResult(await client.chats.retrieve(chatID, body));
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export default { metadata, tool, handler };
|
|
@@ -1,41 +0,0 @@
|
|
|
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: 'chats.reminders',
|
|
10
|
-
operation: 'write',
|
|
11
|
-
tags: ['chats'],
|
|
12
|
-
httpMethod: 'delete',
|
|
13
|
-
httpPath: '/v1/chats/{chatID}/reminders',
|
|
14
|
-
operationId: 'clearChatReminder',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const tool: Tool = {
|
|
18
|
-
name: 'clear_chat_reminder',
|
|
19
|
-
description: 'Clear a chat reminder.',
|
|
20
|
-
inputSchema: {
|
|
21
|
-
type: 'object',
|
|
22
|
-
properties: {
|
|
23
|
-
chatID: {
|
|
24
|
-
type: 'string',
|
|
25
|
-
description: 'Unique identifier of the chat.',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
required: ['chatID'],
|
|
29
|
-
},
|
|
30
|
-
annotations: {
|
|
31
|
-
idempotentHint: true,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
36
|
-
const { chatID, ...body } = args as any;
|
|
37
|
-
const response = await client.chats.reminders.delete(chatID).asResponse();
|
|
38
|
-
return asTextContentResult(await response.text());
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default { metadata, tool, handler };
|
|
@@ -1,54 +0,0 @@
|
|
|
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: 'chats.reminders',
|
|
10
|
-
operation: 'write',
|
|
11
|
-
tags: ['chats'],
|
|
12
|
-
httpMethod: 'post',
|
|
13
|
-
httpPath: '/v1/chats/{chatID}/reminders',
|
|
14
|
-
operationId: 'setChatReminder',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const tool: Tool = {
|
|
18
|
-
name: 'set_chat_reminder',
|
|
19
|
-
description: 'Set a reminder for a chat at a specific time.',
|
|
20
|
-
inputSchema: {
|
|
21
|
-
type: 'object',
|
|
22
|
-
properties: {
|
|
23
|
-
chatID: {
|
|
24
|
-
type: 'string',
|
|
25
|
-
description: 'Unique identifier of the chat.',
|
|
26
|
-
},
|
|
27
|
-
reminder: {
|
|
28
|
-
type: 'object',
|
|
29
|
-
description: 'Reminder configuration',
|
|
30
|
-
properties: {
|
|
31
|
-
remindAtMs: {
|
|
32
|
-
type: 'number',
|
|
33
|
-
description: 'Unix timestamp in milliseconds when reminder should trigger',
|
|
34
|
-
},
|
|
35
|
-
dismissOnIncomingMessage: {
|
|
36
|
-
type: 'boolean',
|
|
37
|
-
description: 'Cancel reminder if someone messages in the chat',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
required: ['remindAtMs'],
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
required: ['chatID', 'reminder'],
|
|
44
|
-
},
|
|
45
|
-
annotations: {},
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
49
|
-
const { chatID, ...body } = args as any;
|
|
50
|
-
const response = await client.chats.reminders.create(chatID, body).asResponse();
|
|
51
|
-
return asTextContentResult(await response.text());
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default { metadata, tool, handler };
|
|
@@ -1,104 +0,0 @@
|
|
|
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: 'chats',
|
|
10
|
-
operation: 'read',
|
|
11
|
-
tags: ['chats'],
|
|
12
|
-
httpMethod: 'get',
|
|
13
|
-
httpPath: '/v1/chats/search',
|
|
14
|
-
operationId: 'searchChats',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const tool: Tool = {
|
|
18
|
-
name: 'search_chats',
|
|
19
|
-
description:
|
|
20
|
-
"Search chats by title/network or participants using Beeper Desktop's renderer algorithm. Optional 'scope'.",
|
|
21
|
-
inputSchema: {
|
|
22
|
-
type: 'object',
|
|
23
|
-
properties: {
|
|
24
|
-
accountIDs: {
|
|
25
|
-
type: 'array',
|
|
26
|
-
description: 'Provide an array of account IDs to filter chats from specific messaging accounts only',
|
|
27
|
-
items: {
|
|
28
|
-
type: 'string',
|
|
29
|
-
description: 'Account ID this resource belongs to.',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
cursor: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
description: "Opaque pagination cursor; do not inspect. Use together with 'direction'.",
|
|
35
|
-
},
|
|
36
|
-
direction: {
|
|
37
|
-
type: 'string',
|
|
38
|
-
description:
|
|
39
|
-
"Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.",
|
|
40
|
-
enum: ['after', 'before'],
|
|
41
|
-
},
|
|
42
|
-
inbox: {
|
|
43
|
-
type: 'string',
|
|
44
|
-
description:
|
|
45
|
-
'Filter by inbox type: "primary" (non-archived, non-low-priority), "low-priority", or "archive". If not specified, shows all chats.',
|
|
46
|
-
enum: ['primary', 'low-priority', 'archive'],
|
|
47
|
-
},
|
|
48
|
-
includeMuted: {
|
|
49
|
-
type: 'boolean',
|
|
50
|
-
description:
|
|
51
|
-
'Include chats marked as Muted by the user, which are usually less important. Default: true. Set to false if the user wants a more refined search.',
|
|
52
|
-
},
|
|
53
|
-
lastActivityAfter: {
|
|
54
|
-
type: 'string',
|
|
55
|
-
description:
|
|
56
|
-
'Provide an ISO datetime string to only retrieve chats with last activity after this time',
|
|
57
|
-
format: 'date-time',
|
|
58
|
-
},
|
|
59
|
-
lastActivityBefore: {
|
|
60
|
-
type: 'string',
|
|
61
|
-
description:
|
|
62
|
-
'Provide an ISO datetime string to only retrieve chats with last activity before this time',
|
|
63
|
-
format: 'date-time',
|
|
64
|
-
},
|
|
65
|
-
limit: {
|
|
66
|
-
type: 'integer',
|
|
67
|
-
description: 'Set the maximum number of chats to retrieve. Valid range: 1-200, default is 50',
|
|
68
|
-
},
|
|
69
|
-
query: {
|
|
70
|
-
type: 'string',
|
|
71
|
-
description:
|
|
72
|
-
'Literal token search (non-semantic). Use single words users type (e.g., "dinner"). When multiple words provided, ALL must match. Case-insensitive.',
|
|
73
|
-
},
|
|
74
|
-
scope: {
|
|
75
|
-
type: 'string',
|
|
76
|
-
description:
|
|
77
|
-
"Search scope: 'titles' matches title + network; 'participants' matches participant names.",
|
|
78
|
-
enum: ['titles', 'participants'],
|
|
79
|
-
},
|
|
80
|
-
type: {
|
|
81
|
-
type: 'string',
|
|
82
|
-
description:
|
|
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'],
|
|
85
|
-
},
|
|
86
|
-
unreadOnly: {
|
|
87
|
-
type: 'boolean',
|
|
88
|
-
description: 'Set to true to only retrieve chats that have unread messages',
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
required: [],
|
|
92
|
-
},
|
|
93
|
-
annotations: {
|
|
94
|
-
readOnlyHint: true,
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
99
|
-
const body = args as any;
|
|
100
|
-
const response = await client.chats.search(body).asResponse();
|
|
101
|
-
return asTextContentResult(await response.json());
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export default { metadata, tool, handler };
|
package/src/tools/index.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { Metadata, Endpoint, HandlerFunction } from './types';
|
|
4
|
-
|
|
5
|
-
export { Metadata, Endpoint, HandlerFunction };
|
|
6
|
-
|
|
7
|
-
import focus_app from './top-level/focus-app';
|
|
8
|
-
import search from './top-level/search';
|
|
9
|
-
import get_accounts from './accounts/get-accounts';
|
|
10
|
-
import get_chat from './chats/get-chat';
|
|
11
|
-
import archive_chat from './chats/archive-chat';
|
|
12
|
-
import search_chats from './chats/search-chats';
|
|
13
|
-
import set_chat_reminder from './chats/reminders/set-chat-reminder';
|
|
14
|
-
import clear_chat_reminder from './chats/reminders/clear-chat-reminder';
|
|
15
|
-
import list_messages from './messages/list-messages';
|
|
16
|
-
import search_messages from './messages/search-messages';
|
|
17
|
-
import send_message from './messages/send-message';
|
|
18
|
-
import { mapEndpoint } from '../handlers';
|
|
19
|
-
|
|
20
|
-
export const endpoints: Endpoint[] = [];
|
|
21
|
-
|
|
22
|
-
function addEndpoint(endpoint: Endpoint) {
|
|
23
|
-
endpoints.push(mapEndpoint(endpoint));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
addEndpoint(focus_app);
|
|
27
|
-
addEndpoint(search);
|
|
28
|
-
addEndpoint(get_accounts);
|
|
29
|
-
addEndpoint(get_chat);
|
|
30
|
-
addEndpoint(archive_chat);
|
|
31
|
-
addEndpoint(search_chats);
|
|
32
|
-
addEndpoint(set_chat_reminder);
|
|
33
|
-
addEndpoint(clear_chat_reminder);
|
|
34
|
-
addEndpoint(list_messages);
|
|
35
|
-
addEndpoint(search_messages);
|
|
36
|
-
addEndpoint(send_message);
|
|
37
|
-
|
|
38
|
-
export type Filter = {
|
|
39
|
-
type: 'resource' | 'operation' | 'tag' | 'tool';
|
|
40
|
-
op: 'include' | 'exclude';
|
|
41
|
-
value: string;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export function query(filters: Filter[], endpoints: Endpoint[]): Endpoint[] {
|
|
45
|
-
const allExcludes = filters.length > 0 && filters.every((filter) => filter.op === 'exclude');
|
|
46
|
-
const unmatchedFilters = new Set(filters);
|
|
47
|
-
|
|
48
|
-
const filtered = endpoints.filter((endpoint: Endpoint) => {
|
|
49
|
-
let included = false || allExcludes;
|
|
50
|
-
|
|
51
|
-
for (const filter of filters) {
|
|
52
|
-
if (match(filter, endpoint)) {
|
|
53
|
-
unmatchedFilters.delete(filter);
|
|
54
|
-
included = filter.op === 'include';
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return included;
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// Check if any filters didn't match
|
|
62
|
-
const unmatched = Array.from(unmatchedFilters).filter((f) => f.type === 'tool' || f.type === 'resource');
|
|
63
|
-
if (unmatched.length > 0) {
|
|
64
|
-
throw new Error(
|
|
65
|
-
`The following filters did not match any endpoints: ${unmatched
|
|
66
|
-
.map((f) => `${f.type}=${f.value}`)
|
|
67
|
-
.join(', ')}`,
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return filtered;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function match({ type, value }: Filter, endpoint: Endpoint): boolean {
|
|
75
|
-
switch (type) {
|
|
76
|
-
case 'resource': {
|
|
77
|
-
const regexStr = '^' + normalizeResource(value).replace(/\*/g, '.*') + '$';
|
|
78
|
-
const regex = new RegExp(regexStr);
|
|
79
|
-
return regex.test(normalizeResource(endpoint.metadata.resource));
|
|
80
|
-
}
|
|
81
|
-
case 'operation':
|
|
82
|
-
return endpoint.metadata.operation === value;
|
|
83
|
-
case 'tag':
|
|
84
|
-
return endpoint.metadata.tags.includes(value);
|
|
85
|
-
case 'tool':
|
|
86
|
-
return endpoint.tool.name === value;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function normalizeResource(resource: string): string {
|
|
91
|
-
return resource.toLowerCase().replace(/[^a-z.*\-_]*/g, '');
|
|
92
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
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 };
|
|
@@ -1,123 +0,0 @@
|
|
|
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/messages/search',
|
|
14
|
-
operationId: 'searchMessages',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const tool: Tool = {
|
|
18
|
-
name: 'search_messages',
|
|
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- 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
|
-
inputSchema: {
|
|
22
|
-
type: 'object',
|
|
23
|
-
properties: {
|
|
24
|
-
accountIDs: {
|
|
25
|
-
type: 'array',
|
|
26
|
-
description: 'Limit search to specific account IDs.',
|
|
27
|
-
items: {
|
|
28
|
-
type: 'string',
|
|
29
|
-
description: 'Account ID this resource belongs to.',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
chatIDs: {
|
|
33
|
-
type: 'array',
|
|
34
|
-
description: 'Limit search to specific chat IDs.',
|
|
35
|
-
items: {
|
|
36
|
-
type: 'string',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
chatType: {
|
|
40
|
-
type: 'string',
|
|
41
|
-
description: "Filter by chat type: 'group' for group chats, 'single' for 1:1 chats.",
|
|
42
|
-
enum: ['group', 'single'],
|
|
43
|
-
},
|
|
44
|
-
cursor: {
|
|
45
|
-
type: 'string',
|
|
46
|
-
description: "Opaque pagination cursor; do not inspect. Use together with 'direction'.",
|
|
47
|
-
},
|
|
48
|
-
dateAfter: {
|
|
49
|
-
type: 'string',
|
|
50
|
-
description:
|
|
51
|
-
"Only include messages with timestamp strictly after this ISO 8601 datetime (e.g., '2024-07-01T00:00:00Z' or '2024-07-01T00:00:00+02:00').",
|
|
52
|
-
format: 'date-time',
|
|
53
|
-
},
|
|
54
|
-
dateBefore: {
|
|
55
|
-
type: 'string',
|
|
56
|
-
description:
|
|
57
|
-
"Only include messages with timestamp strictly before this ISO 8601 datetime (e.g., '2024-07-31T23:59:59Z' or '2024-07-31T23:59:59+02:00').",
|
|
58
|
-
format: 'date-time',
|
|
59
|
-
},
|
|
60
|
-
direction: {
|
|
61
|
-
type: 'string',
|
|
62
|
-
description:
|
|
63
|
-
"Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.",
|
|
64
|
-
enum: ['after', 'before'],
|
|
65
|
-
},
|
|
66
|
-
excludeLowPriority: {
|
|
67
|
-
type: 'boolean',
|
|
68
|
-
description:
|
|
69
|
-
'Exclude messages marked Low Priority by the user. Default: true. Set to false to include all.',
|
|
70
|
-
},
|
|
71
|
-
includeMuted: {
|
|
72
|
-
type: 'boolean',
|
|
73
|
-
description:
|
|
74
|
-
'Include messages in chats marked as Muted by the user, which are usually less important. Default: true. Set to false if the user wants a more refined search.',
|
|
75
|
-
},
|
|
76
|
-
limit: {
|
|
77
|
-
type: 'integer',
|
|
78
|
-
description: 'Maximum number of messages to return.',
|
|
79
|
-
},
|
|
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
|
-
},
|
|
88
|
-
},
|
|
89
|
-
query: {
|
|
90
|
-
type: 'string',
|
|
91
|
-
description:
|
|
92
|
-
'Literal word search (NOT semantic). Finds messages containing these EXACT words in any order. Use single words users actually type, not concepts or phrases. Example: use "dinner" not "dinner plans", use "sick" not "health issues". If omitted, returns results filtered only by other parameters.',
|
|
93
|
-
},
|
|
94
|
-
sender: {
|
|
95
|
-
anyOf: [
|
|
96
|
-
{
|
|
97
|
-
type: 'string',
|
|
98
|
-
description:
|
|
99
|
-
"Filter by sender: 'me' (messages sent by the authenticated user), 'others' (messages sent by others), or a specific user ID string (user.id).",
|
|
100
|
-
enum: ['me', 'others'],
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
type: 'string',
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
description:
|
|
107
|
-
"Filter by sender: 'me' (messages sent by the authenticated user), 'others' (messages sent by others), or a specific user ID string (user.id).",
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
required: [],
|
|
111
|
-
},
|
|
112
|
-
annotations: {
|
|
113
|
-
readOnlyHint: true,
|
|
114
|
-
},
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
118
|
-
const body = args as any;
|
|
119
|
-
const response = await client.messages.search(body).asResponse();
|
|
120
|
-
return asTextContentResult(await response.json());
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export default { metadata, tool, handler };
|
|
@@ -1,47 +0,0 @@
|
|
|
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: 'write',
|
|
11
|
-
tags: ['messages'],
|
|
12
|
-
httpMethod: 'post',
|
|
13
|
-
httpPath: '/v1/chats/{chatID}/messages',
|
|
14
|
-
operationId: 'sendMessage',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const tool: Tool = {
|
|
18
|
-
name: 'send_message',
|
|
19
|
-
description:
|
|
20
|
-
'Send a text message to a specific chat. Supports replying to existing messages. Returns the sent message ID and a deeplink to the chat',
|
|
21
|
-
inputSchema: {
|
|
22
|
-
type: 'object',
|
|
23
|
-
properties: {
|
|
24
|
-
chatID: {
|
|
25
|
-
type: 'string',
|
|
26
|
-
description: 'Unique identifier of the chat.',
|
|
27
|
-
},
|
|
28
|
-
replyToMessageID: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
description: 'Provide a message ID to send this as a reply to an existing message',
|
|
31
|
-
},
|
|
32
|
-
text: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
description: 'Text content of the message you want to send. You may use markdown.',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
required: ['chatID'],
|
|
38
|
-
},
|
|
39
|
-
annotations: {},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
43
|
-
const { chatID, ...body } = args as any;
|
|
44
|
-
return asTextContentResult(await client.messages.send(chatID, body));
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export default { metadata, tool, handler };
|