@beeper/desktop-mcp 0.1.3 → 0.1.5
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 -12
- 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/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.js +2 -2
- package/options.js.map +1 -1
- package/options.mjs +2 -2
- package/options.mjs.map +1 -1
- package/package.json +2 -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 +32 -10
- package/server.js.map +1 -1
- package/server.mjs +33 -11
- package/server.mjs.map +1 -1
- package/src/code-tool.ts +5 -3
- package/src/http.ts +35 -23
- package/src/index.ts +3 -3
- package/src/options.ts +2 -2
- package/src/server.ts +35 -11
- package/src/tools/app/{open-app.ts → open-in-app.ts} +10 -5
- package/src/tools/app/search.ts +41 -0
- package/src/tools/chats/get-chat.ts +1 -1
- package/src/tools/{reminders → chats/reminders}/clear-chat-reminder.ts +3 -3
- package/src/tools/{reminders → chats/reminders}/set-chat-reminder.ts +3 -3
- package/src/tools/chats/search-chats.ts +10 -7
- package/src/tools/index.ts +10 -10
- package/src/tools/messages/search-messages.ts +12 -21
- package/src/tools/messages/send-message.ts +1 -2
- package/tools/{messages/get-attachment.d.ts → app/open-in-app.d.mts} +1 -1
- package/tools/app/open-in-app.d.mts.map +1 -0
- package/tools/{messages/get-attachment.d.mts → app/open-in-app.d.ts} +1 -1
- package/tools/app/open-in-app.d.ts.map +1 -0
- package/tools/app/{open-app.js → open-in-app.js} +10 -6
- package/tools/app/open-in-app.js.map +1 -0
- package/tools/app/{open-app.mjs → open-in-app.mjs} +10 -6
- package/tools/app/open-in-app.mjs.map +1 -0
- package/tools/app/{open-app.d.ts → search.d.mts} +1 -1
- package/tools/app/search.d.mts.map +1 -0
- package/tools/app/{open-app.d.mts → search.d.ts} +1 -1
- package/tools/app/search.d.ts.map +1 -0
- package/tools/app/search.js +37 -0
- package/tools/app/search.js.map +1 -0
- package/tools/app/search.mjs +33 -0
- package/tools/app/search.mjs.map +1 -0
- package/tools/chats/get-chat.js +1 -1
- package/tools/chats/get-chat.js.map +1 -1
- package/tools/chats/get-chat.mjs +1 -1
- package/tools/chats/get-chat.mjs.map +1 -1
- package/tools/chats/reminders/clear-chat-reminder.d.mts.map +1 -0
- package/tools/chats/reminders/clear-chat-reminder.d.ts.map +1 -0
- package/tools/{reminders → chats/reminders}/clear-chat-reminder.js +3 -3
- package/tools/chats/reminders/clear-chat-reminder.js.map +1 -0
- package/tools/{reminders → chats/reminders}/clear-chat-reminder.mjs +3 -3
- package/tools/chats/reminders/clear-chat-reminder.mjs.map +1 -0
- package/tools/chats/reminders/set-chat-reminder.d.mts.map +1 -0
- package/tools/chats/reminders/set-chat-reminder.d.ts.map +1 -0
- package/tools/{reminders → chats/reminders}/set-chat-reminder.js +3 -3
- package/tools/chats/reminders/set-chat-reminder.js.map +1 -0
- package/tools/{reminders → chats/reminders}/set-chat-reminder.mjs +3 -3
- package/tools/chats/reminders/set-chat-reminder.mjs.map +1 -0
- 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 +9 -7
- package/tools/chats/search-chats.js.map +1 -1
- package/tools/chats/search-chats.mjs +9 -7
- package/tools/chats/search-chats.mjs.map +1 -1
- package/tools/index.js +10 -10
- package/tools/index.js.map +1 -1
- package/tools/index.mjs +10 -10
- package/tools/index.mjs.map +1 -1
- 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 +10 -21
- package/tools/messages/search-messages.js.map +1 -1
- package/tools/messages/search-messages.mjs +10 -21
- 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 +1 -1
- package/tools/messages/send-message.js.map +1 -1
- package/tools/messages/send-message.mjs +1 -1
- package/tools/messages/send-message.mjs.map +1 -1
- package/src/tools/messages/get-attachment.ts +0 -42
- package/tools/app/open-app.d.mts.map +0 -1
- package/tools/app/open-app.d.ts.map +0 -1
- package/tools/app/open-app.js.map +0 -1
- package/tools/app/open-app.mjs.map +0 -1
- package/tools/messages/get-attachment.d.mts.map +0 -1
- package/tools/messages/get-attachment.d.ts.map +0 -1
- package/tools/messages/get-attachment.js +0 -39
- package/tools/messages/get-attachment.js.map +0 -1
- package/tools/messages/get-attachment.mjs +0 -35
- package/tools/messages/get-attachment.mjs.map +0 -1
- package/tools/reminders/clear-chat-reminder.d.mts.map +0 -1
- package/tools/reminders/clear-chat-reminder.d.ts.map +0 -1
- package/tools/reminders/clear-chat-reminder.js.map +0 -1
- package/tools/reminders/clear-chat-reminder.mjs.map +0 -1
- package/tools/reminders/set-chat-reminder.d.mts.map +0 -1
- package/tools/reminders/set-chat-reminder.d.ts.map +0 -1
- package/tools/reminders/set-chat-reminder.js.map +0 -1
- package/tools/reminders/set-chat-reminder.mjs.map +0 -1
- /package/tools/{reminders → chats/reminders}/clear-chat-reminder.d.mts +0 -0
- /package/tools/{reminders → chats/reminders}/clear-chat-reminder.d.ts +0 -0
- /package/tools/{reminders → chats/reminders}/set-chat-reminder.d.mts +0 -0
- /package/tools/{reminders → chats/reminders}/set-chat-reminder.d.ts +0 -0
package/src/server.ts
CHANGED
|
@@ -5,8 +5,9 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
5
5
|
import { Endpoint, endpoints, HandlerFunction, query } from './tools';
|
|
6
6
|
import {
|
|
7
7
|
CallToolRequestSchema,
|
|
8
|
-
Implementation,
|
|
9
8
|
ListToolsRequestSchema,
|
|
9
|
+
SetLevelRequestSchema,
|
|
10
|
+
Implementation,
|
|
10
11
|
Tool,
|
|
11
12
|
} from '@modelcontextprotocol/sdk/types.js';
|
|
12
13
|
import { ClientOptions } from '@beeper/desktop-api';
|
|
@@ -32,12 +33,12 @@ export const newMcpServer = () =>
|
|
|
32
33
|
new McpServer(
|
|
33
34
|
{
|
|
34
35
|
name: 'beeper_desktop_api_api',
|
|
35
|
-
version: '0.1.
|
|
36
|
+
version: '0.1.5',
|
|
36
37
|
},
|
|
37
38
|
{
|
|
38
39
|
capabilities: { tools: {}, logging: {} },
|
|
39
40
|
instructions:
|
|
40
|
-
'
|
|
41
|
+
'Access to all chats and messages across networks using Beeper Desktop. Can be used to find, get, send, and manage messages and chats.',
|
|
41
42
|
},
|
|
42
43
|
);
|
|
43
44
|
|
|
@@ -59,7 +60,7 @@ export function initMcpServer(params: {
|
|
|
59
60
|
let providedEndpoints: Endpoint[] | null = null;
|
|
60
61
|
let endpointMap: Record<string, Endpoint> | null = null;
|
|
61
62
|
|
|
62
|
-
const initTools = (implementation?: Implementation) => {
|
|
63
|
+
const initTools = async (implementation?: Implementation) => {
|
|
63
64
|
if (implementation && (!mcpOptions.client || mcpOptions.client === 'infer')) {
|
|
64
65
|
mcpOptions.client =
|
|
65
66
|
implementation.name.toLowerCase().includes('claude') ? 'claude'
|
|
@@ -70,8 +71,8 @@ export function initMcpServer(params: {
|
|
|
70
71
|
...mcpOptions.capabilities,
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
|
-
providedEndpoints
|
|
74
|
-
endpointMap
|
|
74
|
+
providedEndpoints ??= await selectTools(endpoints, mcpOptions);
|
|
75
|
+
endpointMap ??= Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint]));
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
const logAtLevel =
|
|
@@ -89,7 +90,7 @@ export function initMcpServer(params: {
|
|
|
89
90
|
error: logAtLevel('error'),
|
|
90
91
|
};
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
let client = new BeeperDesktop({
|
|
93
94
|
logger,
|
|
94
95
|
...params.clientOptions,
|
|
95
96
|
defaultHeaders: {
|
|
@@ -100,7 +101,7 @@ export function initMcpServer(params: {
|
|
|
100
101
|
|
|
101
102
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
102
103
|
if (providedEndpoints === null) {
|
|
103
|
-
initTools(server.getClientVersion());
|
|
104
|
+
await initTools(server.getClientVersion());
|
|
104
105
|
}
|
|
105
106
|
return {
|
|
106
107
|
tools: providedEndpoints!.map((endpoint) => endpoint.tool),
|
|
@@ -109,7 +110,7 @@ export function initMcpServer(params: {
|
|
|
109
110
|
|
|
110
111
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
111
112
|
if (endpointMap === null) {
|
|
112
|
-
initTools(server.getClientVersion());
|
|
113
|
+
await initTools(server.getClientVersion());
|
|
113
114
|
}
|
|
114
115
|
const { name, arguments: args } = request.params;
|
|
115
116
|
const endpoint = endpointMap![name];
|
|
@@ -119,12 +120,35 @@ export function initMcpServer(params: {
|
|
|
119
120
|
|
|
120
121
|
return executeHandler(endpoint.tool, endpoint.handler, client, args, mcpOptions.capabilities);
|
|
121
122
|
});
|
|
123
|
+
|
|
124
|
+
server.setRequestHandler(SetLevelRequestSchema, async (request) => {
|
|
125
|
+
const { level } = request.params;
|
|
126
|
+
switch (level) {
|
|
127
|
+
case 'debug':
|
|
128
|
+
client = client.withOptions({ logLevel: 'debug' });
|
|
129
|
+
break;
|
|
130
|
+
case 'info':
|
|
131
|
+
client = client.withOptions({ logLevel: 'info' });
|
|
132
|
+
break;
|
|
133
|
+
case 'notice':
|
|
134
|
+
case 'warning':
|
|
135
|
+
client = client.withOptions({ logLevel: 'warn' });
|
|
136
|
+
break;
|
|
137
|
+
case 'error':
|
|
138
|
+
client = client.withOptions({ logLevel: 'error' });
|
|
139
|
+
break;
|
|
140
|
+
default:
|
|
141
|
+
client = client.withOptions({ logLevel: 'off' });
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
return {};
|
|
145
|
+
});
|
|
122
146
|
}
|
|
123
147
|
|
|
124
148
|
/**
|
|
125
149
|
* Selects the tools to include in the MCP Server based on the provided options.
|
|
126
150
|
*/
|
|
127
|
-
export function selectTools(endpoints: Endpoint[], options?: McpOptions): Endpoint[] {
|
|
151
|
+
export async function selectTools(endpoints: Endpoint[], options?: McpOptions): Promise<Endpoint[]> {
|
|
128
152
|
const filteredEndpoints = query(options?.filters ?? [], endpoints);
|
|
129
153
|
|
|
130
154
|
let includedTools = filteredEndpoints;
|
|
@@ -139,7 +163,7 @@ export function selectTools(endpoints: Endpoint[], options?: McpOptions): Endpoi
|
|
|
139
163
|
} else if (options?.includeDynamicTools) {
|
|
140
164
|
includedTools = dynamicTools(endpoints);
|
|
141
165
|
} else if (options?.includeCodeTools) {
|
|
142
|
-
includedTools = [codeTool()];
|
|
166
|
+
includedTools = [await codeTool()];
|
|
143
167
|
} else {
|
|
144
168
|
includedTools = endpoints;
|
|
145
169
|
}
|
|
@@ -15,8 +15,9 @@ export const metadata: Metadata = {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
|
-
name: '
|
|
19
|
-
description:
|
|
18
|
+
name: 'open_in_app',
|
|
19
|
+
description:
|
|
20
|
+
'Open 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.app.
|
|
49
|
+
return asTextContentResult(await client.app.open(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: 'app',
|
|
10
|
+
operation: 'read',
|
|
11
|
+
tags: ['app'],
|
|
12
|
+
httpMethod: 'get',
|
|
13
|
+
httpPath: '/v0/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.app.search(body));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default { metadata, tool, handler };
|
|
@@ -40,7 +40,7 @@ export const tool: Tool = {
|
|
|
40
40
|
|
|
41
41
|
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
42
42
|
const body = args as any;
|
|
43
|
-
return asTextContentResult(await client.chats.
|
|
43
|
+
return asTextContentResult(await client.chats.retrieve(body));
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export default { metadata, tool, handler };
|
|
@@ -6,9 +6,9 @@ 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: 'reminders',
|
|
9
|
+
resource: 'chats.reminders',
|
|
10
10
|
operation: 'write',
|
|
11
|
-
tags: ['
|
|
11
|
+
tags: ['chats'],
|
|
12
12
|
httpMethod: 'post',
|
|
13
13
|
httpPath: '/v0/clear-chat-reminder',
|
|
14
14
|
operationId: 'clear_chat_reminder',
|
|
@@ -33,7 +33,7 @@ export const tool: Tool = {
|
|
|
33
33
|
|
|
34
34
|
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
35
35
|
const body = args as any;
|
|
36
|
-
return asTextContentResult(await client.reminders.
|
|
36
|
+
return asTextContentResult(await client.chats.reminders.delete(body));
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export default { metadata, tool, handler };
|
|
@@ -6,9 +6,9 @@ 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: 'reminders',
|
|
9
|
+
resource: 'chats.reminders',
|
|
10
10
|
operation: 'write',
|
|
11
|
-
tags: ['
|
|
11
|
+
tags: ['chats'],
|
|
12
12
|
httpMethod: 'post',
|
|
13
13
|
httpPath: '/v0/set-chat-reminder',
|
|
14
14
|
operationId: 'set_chat_reminder',
|
|
@@ -47,7 +47,7 @@ export const tool: Tool = {
|
|
|
47
47
|
|
|
48
48
|
export const handler = async (client: BeeperDesktop, args: Record<string, unknown> | undefined) => {
|
|
49
49
|
const body = args as any;
|
|
50
|
-
return asTextContentResult(await client.reminders.
|
|
50
|
+
return asTextContentResult(await client.chats.reminders.create(body));
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export default { metadata, tool, handler };
|
|
@@ -16,7 +16,8 @@ export const metadata: Metadata = {
|
|
|
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,6 +26,7 @@ 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',
|
|
29
|
+
description: 'Beeper account ID this resource belongs to.',
|
|
28
30
|
},
|
|
29
31
|
},
|
|
30
32
|
cursor: {
|
|
@@ -64,21 +66,22 @@ export const tool: Tool = {
|
|
|
64
66
|
type: 'integer',
|
|
65
67
|
description: 'Set the maximum number of chats to retrieve. Valid range: 1-200, default is 50',
|
|
66
68
|
},
|
|
67
|
-
|
|
69
|
+
query: {
|
|
68
70
|
type: 'string',
|
|
69
71
|
description:
|
|
70
|
-
'
|
|
72
|
+
'Literal token search (non-semantic). Use single words users type (e.g., "dinner"). When multiple words provided, ALL must match. Case-insensitive.',
|
|
71
73
|
},
|
|
72
|
-
|
|
74
|
+
scope: {
|
|
73
75
|
type: 'string',
|
|
74
76
|
description:
|
|
75
|
-
|
|
77
|
+
"Search scope: 'titles' matches title + network; 'participants' matches participant names.",
|
|
78
|
+
enum: ['titles', 'participants'],
|
|
76
79
|
},
|
|
77
80
|
type: {
|
|
78
81
|
type: 'string',
|
|
79
82
|
description:
|
|
80
|
-
'Specify the type of chats to retrieve: use "single" for direct messages, "group" for group chats,
|
|
81
|
-
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'],
|
|
82
85
|
},
|
|
83
86
|
unreadOnly: {
|
|
84
87
|
type: 'boolean',
|
package/src/tools/index.ts
CHANGED
|
@@ -5,15 +5,15 @@ import { Metadata, Endpoint, HandlerFunction } from './types';
|
|
|
5
5
|
export { Metadata, Endpoint, HandlerFunction };
|
|
6
6
|
|
|
7
7
|
import get_accounts from './accounts/get-accounts';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import open_in_app from './app/open-in-app';
|
|
9
|
+
import search from './app/search';
|
|
10
10
|
import get_chat from './chats/get-chat';
|
|
11
|
+
import archive_chat from './chats/archive-chat';
|
|
11
12
|
import search_chats from './chats/search-chats';
|
|
12
|
-
import
|
|
13
|
+
import set_chat_reminder from './chats/reminders/set-chat-reminder';
|
|
14
|
+
import clear_chat_reminder from './chats/reminders/clear-chat-reminder';
|
|
13
15
|
import search_messages from './messages/search-messages';
|
|
14
16
|
import send_message from './messages/send-message';
|
|
15
|
-
import clear_chat_reminder from './reminders/clear-chat-reminder';
|
|
16
|
-
import set_chat_reminder from './reminders/set-chat-reminder';
|
|
17
17
|
|
|
18
18
|
export const endpoints: Endpoint[] = [];
|
|
19
19
|
|
|
@@ -22,15 +22,15 @@ function addEndpoint(endpoint: Endpoint) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
addEndpoint(get_accounts);
|
|
25
|
-
addEndpoint(
|
|
26
|
-
addEndpoint(
|
|
25
|
+
addEndpoint(open_in_app);
|
|
26
|
+
addEndpoint(search);
|
|
27
27
|
addEndpoint(get_chat);
|
|
28
|
+
addEndpoint(archive_chat);
|
|
28
29
|
addEndpoint(search_chats);
|
|
29
|
-
addEndpoint(
|
|
30
|
+
addEndpoint(set_chat_reminder);
|
|
31
|
+
addEndpoint(clear_chat_reminder);
|
|
30
32
|
addEndpoint(search_messages);
|
|
31
33
|
addEndpoint(send_message);
|
|
32
|
-
addEndpoint(clear_chat_reminder);
|
|
33
|
-
addEndpoint(set_chat_reminder);
|
|
34
34
|
|
|
35
35
|
export type Filter = {
|
|
36
36
|
type: 'resource' | 'operation' | 'tag' | 'tool';
|
|
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
|
|
|
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: {
|
|
@@ -26,6 +26,7 @@ export const tool: Tool = {
|
|
|
26
26
|
description: 'Limit search to specific Beeper account IDs (bridge instances).',
|
|
27
27
|
items: {
|
|
28
28
|
type: 'string',
|
|
29
|
+
description: 'Beeper account ID this resource belongs to.',
|
|
29
30
|
},
|
|
30
31
|
},
|
|
31
32
|
chatIDs: {
|
|
@@ -74,27 +75,17 @@ export const tool: Tool = {
|
|
|
74
75
|
},
|
|
75
76
|
limit: {
|
|
76
77
|
type: 'integer',
|
|
77
|
-
description:
|
|
78
|
-
|
|
79
|
-
onlyWithFile: {
|
|
80
|
-
type: 'boolean',
|
|
81
|
-
description: 'Only return messages that contain file attachments.',
|
|
82
|
-
},
|
|
83
|
-
onlyWithImage: {
|
|
84
|
-
type: 'boolean',
|
|
85
|
-
description: 'Only return messages that contain image attachments.',
|
|
86
|
-
},
|
|
87
|
-
onlyWithLink: {
|
|
88
|
-
type: 'boolean',
|
|
89
|
-
description: 'Only return messages that contain link attachments.',
|
|
90
|
-
},
|
|
91
|
-
onlyWithMedia: {
|
|
92
|
-
type: 'boolean',
|
|
93
|
-
description: 'Only return messages that contain any type of media attachment.',
|
|
78
|
+
description:
|
|
79
|
+
'Maximum number of messages to return (1–500). Defaults to 20. The current implementation caps each page at 20 items even if a higher limit is requested.',
|
|
94
80
|
},
|
|
95
|
-
|
|
96
|
-
type: '
|
|
97
|
-
description:
|
|
81
|
+
mediaTypes: {
|
|
82
|
+
type: 'array',
|
|
83
|
+
description:
|
|
84
|
+
"Filter messages by media types. Use ['any'] for any media type, or specify exact types like ['video', 'image']. Omit for no media filtering.",
|
|
85
|
+
items: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
enum: ['any', 'video', 'image', 'link', 'file'],
|
|
88
|
+
},
|
|
98
89
|
},
|
|
99
90
|
query: {
|
|
100
91
|
type: 'string',
|
|
@@ -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 (a.k.a. room or thread).',
|
|
28
27
|
},
|
|
29
28
|
replyToMessageID: {
|
|
30
29
|
type: 'string',
|
|
@@ -42,4 +42,4 @@ declare const _default: {
|
|
|
42
42
|
handler: (client: BeeperDesktop, args: Record<string, unknown> | undefined) => Promise<import("@beeper/desktop-mcp/tools/types").ToolCallResult>;
|
|
43
43
|
};
|
|
44
44
|
export default _default;
|
|
45
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=open-in-app.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-in-app.d.mts","sourceRoot":"","sources":["../../src/tools/app/open-in-app.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,IA4BlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,sEAG7F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,aAAa,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK9F,wBAA2C"}
|
|
@@ -42,4 +42,4 @@ declare const _default: {
|
|
|
42
42
|
handler: (client: BeeperDesktop, args: Record<string, unknown> | undefined) => Promise<import("@beeper/desktop-mcp/tools/types").ToolCallResult>;
|
|
43
43
|
};
|
|
44
44
|
export default _default;
|
|
45
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=open-in-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-in-app.d.ts","sourceRoot":"","sources":["../../src/tools/app/open-in-app.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,IA4BlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,sEAG7F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,aAAa,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK9F,wBAA2C"}
|
|
@@ -12,8 +12,8 @@ exports.metadata = {
|
|
|
12
12
|
operationId: 'open_app',
|
|
13
13
|
};
|
|
14
14
|
exports.tool = {
|
|
15
|
-
name: '
|
|
16
|
-
description: 'Open Beeper
|
|
15
|
+
name: 'open_in_app',
|
|
16
|
+
description: 'Open Beeper Desktop and optionally navigate to a specific chat, message, or pre-fill draft text and attachment.',
|
|
17
17
|
inputSchema: {
|
|
18
18
|
type: 'object',
|
|
19
19
|
properties: {
|
|
@@ -21,13 +21,17 @@ exports.tool = {
|
|
|
21
21
|
type: 'string',
|
|
22
22
|
description: 'Optional Beeper chat ID (or local chat ID) to focus after opening the app. If omitted, only opens/focuses the app.',
|
|
23
23
|
},
|
|
24
|
+
draftAttachmentPath: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Optional draft attachment path to populate in the message input field.',
|
|
27
|
+
},
|
|
24
28
|
draftText: {
|
|
25
29
|
type: 'string',
|
|
26
30
|
description: 'Optional draft text to populate in the message input field.',
|
|
27
31
|
},
|
|
28
|
-
|
|
32
|
+
messageID: {
|
|
29
33
|
type: 'string',
|
|
30
|
-
description: 'Optional message
|
|
34
|
+
description: 'Optional message ID. Jumps to that message in the chat when opening.',
|
|
31
35
|
},
|
|
32
36
|
},
|
|
33
37
|
required: [],
|
|
@@ -36,8 +40,8 @@ exports.tool = {
|
|
|
36
40
|
};
|
|
37
41
|
const handler = async (client, args) => {
|
|
38
42
|
const body = args;
|
|
39
|
-
return (0, types_1.asTextContentResult)(await client.app.
|
|
43
|
+
return (0, types_1.asTextContentResult)(await client.app.open(body));
|
|
40
44
|
};
|
|
41
45
|
exports.handler = handler;
|
|
42
46
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
43
|
-
//# sourceMappingURL=open-app.js.map
|
|
47
|
+
//# sourceMappingURL=open-in-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-in-app.js","sourceRoot":"","sources":["../../src/tools/app/open-in-app.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAgF;AAKnE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,KAAK,CAAC;IACb,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,cAAc;IACxB,WAAW,EAAE,UAAU;CACxB,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,iHAAiH;IACnH,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,oHAAoH;aACvH;YACD,mBAAmB,EAAE;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wEAAwE;aACtF;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6DAA6D;aAC3E;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sEAAsE;aACpF;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -9,8 +9,8 @@ export const metadata = {
|
|
|
9
9
|
operationId: 'open_app',
|
|
10
10
|
};
|
|
11
11
|
export const tool = {
|
|
12
|
-
name: '
|
|
13
|
-
description: 'Open Beeper
|
|
12
|
+
name: 'open_in_app',
|
|
13
|
+
description: 'Open Beeper Desktop and optionally navigate to a specific chat, message, or pre-fill draft text and attachment.',
|
|
14
14
|
inputSchema: {
|
|
15
15
|
type: 'object',
|
|
16
16
|
properties: {
|
|
@@ -18,13 +18,17 @@ export const tool = {
|
|
|
18
18
|
type: 'string',
|
|
19
19
|
description: 'Optional Beeper chat ID (or local chat ID) to focus after opening the app. If omitted, only opens/focuses the app.',
|
|
20
20
|
},
|
|
21
|
+
draftAttachmentPath: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'Optional draft attachment path to populate in the message input field.',
|
|
24
|
+
},
|
|
21
25
|
draftText: {
|
|
22
26
|
type: 'string',
|
|
23
27
|
description: 'Optional draft text to populate in the message input field.',
|
|
24
28
|
},
|
|
25
|
-
|
|
29
|
+
messageID: {
|
|
26
30
|
type: 'string',
|
|
27
|
-
description: 'Optional message
|
|
31
|
+
description: 'Optional message ID. Jumps to that message in the chat when opening.',
|
|
28
32
|
},
|
|
29
33
|
},
|
|
30
34
|
required: [],
|
|
@@ -33,7 +37,7 @@ export const tool = {
|
|
|
33
37
|
};
|
|
34
38
|
export const handler = async (client, args) => {
|
|
35
39
|
const body = args;
|
|
36
|
-
return asTextContentResult(await client.app.
|
|
40
|
+
return asTextContentResult(await client.app.open(body));
|
|
37
41
|
};
|
|
38
42
|
export default { metadata, tool, handler };
|
|
39
|
-
//# sourceMappingURL=open-app.mjs.map
|
|
43
|
+
//# sourceMappingURL=open-in-app.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-in-app.mjs","sourceRoot":"","sources":["../../src/tools/app/open-in-app.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAY,mBAAmB,EAAE,MAAM,iCAAiC;AAK/E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,KAAK,CAAC;IACb,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,cAAc;IACxB,WAAW,EAAE,UAAU;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,iHAAiH;IACnH,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,oHAAoH;aACvH;YACD,mBAAmB,EAAE;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wEAAwE;aACtF;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6DAA6D;aAC3E;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sEAAsE;aACpF;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,OAAO,mBAAmB,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -42,4 +42,4 @@ declare const _default: {
|
|
|
42
42
|
handler: (client: BeeperDesktop, args: Record<string, unknown> | undefined) => Promise<import("@beeper/desktop-mcp/tools/types").ToolCallResult>;
|
|
43
43
|
};
|
|
44
44
|
export default _default;
|
|
45
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=search.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.mts","sourceRoot":"","sources":["../../src/tools/app/search.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,IAiBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,sEAG7F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,aAAa,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK9F,wBAA2C"}
|
|
@@ -42,4 +42,4 @@ declare const _default: {
|
|
|
42
42
|
handler: (client: BeeperDesktop, args: Record<string, unknown> | undefined) => Promise<import("@beeper/desktop-mcp/tools/types").ToolCallResult>;
|
|
43
43
|
};
|
|
44
44
|
export default _default;
|
|
45
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/app/search.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,IAiBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,sEAG7F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,aAAa,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK9F,wBAA2C"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
+
const types_1 = require("@beeper/desktop-mcp/tools/types");
|
|
6
|
+
exports.metadata = {
|
|
7
|
+
resource: 'app',
|
|
8
|
+
operation: 'read',
|
|
9
|
+
tags: ['app'],
|
|
10
|
+
httpMethod: 'get',
|
|
11
|
+
httpPath: '/v0/search',
|
|
12
|
+
operationId: 'search',
|
|
13
|
+
};
|
|
14
|
+
exports.tool = {
|
|
15
|
+
name: 'search',
|
|
16
|
+
description: '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.',
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
query: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'User-typed search text. Literal word matching (NOT semantic).',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
required: ['query'],
|
|
26
|
+
},
|
|
27
|
+
annotations: {
|
|
28
|
+
readOnlyHint: true,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const handler = async (client, args) => {
|
|
32
|
+
const body = args;
|
|
33
|
+
return (0, types_1.asTextContentResult)(await client.app.search(body));
|
|
34
|
+
};
|
|
35
|
+
exports.handler = handler;
|
|
36
|
+
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
37
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/app/search.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAgF;AAKnE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,KAAK,CAAC;IACb,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,QAAQ;CACtB,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,sKAAsK;IACxK,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+DAA+D;aAC7E;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { asTextContentResult } from '@beeper/desktop-mcp/tools/types';
|
|
3
|
+
export const metadata = {
|
|
4
|
+
resource: 'app',
|
|
5
|
+
operation: 'read',
|
|
6
|
+
tags: ['app'],
|
|
7
|
+
httpMethod: 'get',
|
|
8
|
+
httpPath: '/v0/search',
|
|
9
|
+
operationId: 'search',
|
|
10
|
+
};
|
|
11
|
+
export const tool = {
|
|
12
|
+
name: 'search',
|
|
13
|
+
description: '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.',
|
|
14
|
+
inputSchema: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
query: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'User-typed search text. Literal word matching (NOT semantic).',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
required: ['query'],
|
|
23
|
+
},
|
|
24
|
+
annotations: {
|
|
25
|
+
readOnlyHint: true,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export const handler = async (client, args) => {
|
|
29
|
+
const body = args;
|
|
30
|
+
return asTextContentResult(await client.app.search(body));
|
|
31
|
+
};
|
|
32
|
+
export default { metadata, tool, handler };
|
|
33
|
+
//# sourceMappingURL=search.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.mjs","sourceRoot":"","sources":["../../src/tools/app/search.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAY,mBAAmB,EAAE,MAAM,iCAAiC;AAK/E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,KAAK,CAAC;IACb,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,QAAQ;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,sKAAsK;IACxK,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+DAA+D;aAC7E;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,OAAO,mBAAmB,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
package/tools/chats/get-chat.js
CHANGED
|
@@ -34,7 +34,7 @@ exports.tool = {
|
|
|
34
34
|
};
|
|
35
35
|
const handler = async (client, args) => {
|
|
36
36
|
const body = args;
|
|
37
|
-
return (0, types_1.asTextContentResult)(await client.chats.
|
|
37
|
+
return (0, types_1.asTextContentResult)(await client.chats.retrieve(body));
|
|
38
38
|
};
|
|
39
39
|
exports.handler = handler;
|
|
40
40
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|