@beeper/desktop-mcp 0.1.4 → 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.
Files changed (88) hide show
  1. package/README.md +4 -9
  2. package/code-tool.d.mts +1 -1
  3. package/code-tool.d.mts.map +1 -1
  4. package/code-tool.d.ts +1 -1
  5. package/code-tool.d.ts.map +1 -1
  6. package/code-tool.js +40 -6
  7. package/code-tool.js.map +1 -1
  8. package/code-tool.mjs +4 -3
  9. package/code-tool.mjs.map +1 -1
  10. package/http.d.mts +5 -1
  11. package/http.d.mts.map +1 -1
  12. package/http.d.ts +5 -1
  13. package/http.d.ts.map +1 -1
  14. package/http.js +7 -9
  15. package/http.js.map +1 -1
  16. package/http.mjs +7 -9
  17. package/http.mjs.map +1 -1
  18. package/index.js +3 -3
  19. package/index.js.map +1 -1
  20. package/index.mjs +3 -3
  21. package/index.mjs.map +1 -1
  22. package/options.js +2 -2
  23. package/options.js.map +1 -1
  24. package/options.mjs +2 -2
  25. package/options.mjs.map +1 -1
  26. package/package.json +2 -2
  27. package/server.d.mts +1 -1
  28. package/server.d.mts.map +1 -1
  29. package/server.d.ts +1 -1
  30. package/server.d.ts.map +1 -1
  31. package/server.js +32 -10
  32. package/server.js.map +1 -1
  33. package/server.mjs +33 -11
  34. package/server.mjs.map +1 -1
  35. package/src/code-tool.ts +5 -3
  36. package/src/http.ts +35 -23
  37. package/src/index.ts +3 -3
  38. package/src/options.ts +2 -2
  39. package/src/server.ts +35 -11
  40. package/src/tools/app/open-in-app.ts +8 -3
  41. package/src/tools/app/search.ts +41 -0
  42. package/src/tools/chats/search-chats.ts +9 -7
  43. package/src/tools/index.ts +2 -2
  44. package/src/tools/messages/search-messages.ts +11 -21
  45. package/src/tools/messages/send-message.ts +1 -2
  46. package/tools/app/open-in-app.d.mts.map +1 -1
  47. package/tools/app/open-in-app.d.ts.map +1 -1
  48. package/tools/app/open-in-app.js +7 -3
  49. package/tools/app/open-in-app.js.map +1 -1
  50. package/tools/app/open-in-app.mjs +7 -3
  51. package/tools/app/open-in-app.mjs.map +1 -1
  52. package/tools/{messages/attachments/download-attachment.d.ts → app/search.d.mts} +1 -1
  53. package/tools/app/search.d.mts.map +1 -0
  54. package/tools/{messages/attachments/download-attachment.d.mts → app/search.d.ts} +1 -1
  55. package/tools/app/search.d.ts.map +1 -0
  56. package/tools/app/search.js +37 -0
  57. package/tools/app/search.js.map +1 -0
  58. package/tools/app/search.mjs +33 -0
  59. package/tools/app/search.mjs.map +1 -0
  60. package/tools/chats/search-chats.d.mts.map +1 -1
  61. package/tools/chats/search-chats.d.ts.map +1 -1
  62. package/tools/chats/search-chats.js +8 -7
  63. package/tools/chats/search-chats.js.map +1 -1
  64. package/tools/chats/search-chats.mjs +8 -7
  65. package/tools/chats/search-chats.mjs.map +1 -1
  66. package/tools/index.js +2 -2
  67. package/tools/index.js.map +1 -1
  68. package/tools/index.mjs +2 -2
  69. package/tools/index.mjs.map +1 -1
  70. package/tools/messages/search-messages.d.mts.map +1 -1
  71. package/tools/messages/search-messages.d.ts.map +1 -1
  72. package/tools/messages/search-messages.js +9 -21
  73. package/tools/messages/search-messages.js.map +1 -1
  74. package/tools/messages/search-messages.mjs +9 -21
  75. package/tools/messages/search-messages.mjs.map +1 -1
  76. package/tools/messages/send-message.d.mts.map +1 -1
  77. package/tools/messages/send-message.d.ts.map +1 -1
  78. package/tools/messages/send-message.js +1 -1
  79. package/tools/messages/send-message.js.map +1 -1
  80. package/tools/messages/send-message.mjs +1 -1
  81. package/tools/messages/send-message.mjs.map +1 -1
  82. package/src/tools/messages/attachments/download-attachment.ts +0 -42
  83. package/tools/messages/attachments/download-attachment.d.mts.map +0 -1
  84. package/tools/messages/attachments/download-attachment.d.ts.map +0 -1
  85. package/tools/messages/attachments/download-attachment.js +0 -39
  86. package/tools/messages/attachments/download-attachment.js.map +0 -1
  87. package/tools/messages/attachments/download-attachment.mjs +0 -35
  88. package/tools/messages/attachments/download-attachment.mjs.map +0 -1
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.4',
36
+ version: '0.1.5',
36
37
  },
37
38
  {
38
39
  capabilities: { tools: {}, logging: {} },
39
40
  instructions:
40
- 'This MCP server provides access to your Beeper Desktop messages and chats. Use the search and find tools to locate messages and conversations, then use send_message to respond.',
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 = selectTools(endpoints, mcpOptions);
74
- endpointMap = Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint]));
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
- const client = new BeeperDesktop({
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
  }
@@ -16,7 +16,8 @@ export const metadata: Metadata = {
16
16
 
17
17
  export const tool: Tool = {
18
18
  name: 'open_in_app',
19
- description: 'Open Beeper, optionally focusing a chat or message, or pre-filling a draft.',
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
- messageSortKey: {
37
+ messageID: {
33
38
  type: 'string',
34
- description: 'Optional message sort key. Jumps to that message in the chat when opening.',
39
+ description: 'Optional message ID. Jumps to that message in the chat when opening.',
35
40
  },
36
41
  },
37
42
  required: [],
@@ -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 };
@@ -16,7 +16,8 @@ export const metadata: Metadata = {
16
16
 
17
17
  export const tool: Tool = {
18
18
  name: 'search_chats',
19
- description: 'Search chats by inbox, type, unread status, or text. Paginates.',
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: {
@@ -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
- participantQuery: {
69
+ query: {
69
70
  type: 'string',
70
71
  description:
71
- 'Search string to filter chats by participant names. When multiple words provided, ALL words must match. Searches in username, displayName, and fullName fields.',
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
- query: {
74
+ scope: {
74
75
  type: 'string',
75
76
  description:
76
- 'Search string to filter chats by title. When multiple words provided, ALL words must match. Matches are case-insensitive substrings.',
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, "channel" for channels, or "any" to get all types',
82
- enum: ['single', 'group', 'channel', 'any'],
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',
@@ -6,6 +6,7 @@ export { Metadata, Endpoint, HandlerFunction };
6
6
 
7
7
  import get_accounts from './accounts/get-accounts';
8
8
  import open_in_app from './app/open-in-app';
9
+ import search from './app/search';
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';
@@ -13,7 +14,6 @@ import set_chat_reminder from './chats/reminders/set-chat-reminder';
13
14
  import clear_chat_reminder from './chats/reminders/clear-chat-reminder';
14
15
  import search_messages from './messages/search-messages';
15
16
  import send_message from './messages/send-message';
16
- import download_attachment from './messages/attachments/download-attachment';
17
17
 
18
18
  export const endpoints: Endpoint[] = [];
19
19
 
@@ -23,6 +23,7 @@ function addEndpoint(endpoint: Endpoint) {
23
23
 
24
24
  addEndpoint(get_accounts);
25
25
  addEndpoint(open_in_app);
26
+ addEndpoint(search);
26
27
  addEndpoint(get_chat);
27
28
  addEndpoint(archive_chat);
28
29
  addEndpoint(search_chats);
@@ -30,7 +31,6 @@ addEndpoint(set_chat_reminder);
30
31
  addEndpoint(clear_chat_reminder);
31
32
  addEndpoint(search_messages);
32
33
  addEndpoint(send_message);
33
- addEndpoint(download_attachment);
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- Media filters: Use onlyWithMedia for any media, or specific filters like onlyWithVideo, onlyWithImage, onlyWithLink, onlyWithFile for specific types.\n- Pagination: use \'oldestCursor\' + direction=\'before\' for older; \'newestCursor\' + direction=\'after\' for newer.\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 participantQuery in find-chats)\nReturns: matching messages and referenced chats.',
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: {
@@ -75,27 +75,17 @@ export const tool: Tool = {
75
75
  },
76
76
  limit: {
77
77
  type: 'integer',
78
- description: 'Maximum number of messages to return (1–500). Defaults to 50.',
79
- },
80
- onlyWithFile: {
81
- type: 'boolean',
82
- description: 'Only return messages that contain file attachments.',
83
- },
84
- onlyWithImage: {
85
- type: 'boolean',
86
- description: 'Only return messages that contain image attachments.',
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.',
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.',
95
80
  },
96
- onlyWithVideo: {
97
- type: 'boolean',
98
- description: 'Only return messages that contain video attachments.',
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
+ },
99
89
  },
100
90
  query: {
101
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',
@@ -1 +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,IAuBlB,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"}
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"}
@@ -1 +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,IAuBlB,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"}
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"}
@@ -13,7 +13,7 @@ exports.metadata = {
13
13
  };
14
14
  exports.tool = {
15
15
  name: 'open_in_app',
16
- description: 'Open Beeper, optionally focusing a chat or message, or pre-filling a draft.',
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
- messageSortKey: {
32
+ messageID: {
29
33
  type: 'string',
30
- description: 'Optional message sort key. Jumps to that message in the chat when opening.',
34
+ description: 'Optional message ID. Jumps to that message in the chat when opening.',
31
35
  },
32
36
  },
33
37
  required: [],
@@ -1 +1 @@
1
- {"version":3,"file":"open-in-app.js","sourceRoot":"","sources":["../../src/tools/app/open-in-app.ts"],"names":[],"mappings":";AAAA,sFAAs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E,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"}
@@ -10,7 +10,7 @@ export const metadata = {
10
10
  };
11
11
  export const tool = {
12
12
  name: 'open_in_app',
13
- description: 'Open Beeper, optionally focusing a chat or message, or pre-filling a draft.',
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
- messageSortKey: {
29
+ messageID: {
26
30
  type: 'string',
27
- description: 'Optional message sort key. Jumps to that message in the chat when opening.',
31
+ description: 'Optional message ID. Jumps to that message in the chat when opening.',
28
32
  },
29
33
  },
30
34
  required: [],
@@ -1 +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,EAAE,6EAA6E;IAC1F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,oHAAoH;aACvH;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6DAA6D;aAC3E;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4EAA4E;aAC1F;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;IAC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AC,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=download-attachment.d.ts.map
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=download-attachment.d.mts.map
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"search-chats.d.mts","sourceRoot":"","sources":["../../src/tools/chats/search-chats.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,IA6ElB,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
+ {"version":3,"file":"search-chats.d.mts","sourceRoot":"","sources":["../../src/tools/chats/search-chats.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,IA+ElB,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":"search-chats.d.ts","sourceRoot":"","sources":["../../src/tools/chats/search-chats.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,IA6ElB,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
+ {"version":3,"file":"search-chats.d.ts","sourceRoot":"","sources":["../../src/tools/chats/search-chats.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,IA+ElB,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"}
@@ -13,7 +13,7 @@ exports.metadata = {
13
13
  };
14
14
  exports.tool = {
15
15
  name: 'search_chats',
16
- description: 'Search chats by inbox, type, unread status, or text. Paginates.',
16
+ description: "Search chats by title/network or participants using Beeper Desktop's renderer algorithm. Optional 'scope'.",
17
17
  inputSchema: {
18
18
  type: 'object',
19
19
  properties: {
@@ -57,18 +57,19 @@ exports.tool = {
57
57
  type: 'integer',
58
58
  description: 'Set the maximum number of chats to retrieve. Valid range: 1-200, default is 50',
59
59
  },
60
- participantQuery: {
60
+ query: {
61
61
  type: 'string',
62
- description: 'Search string to filter chats by participant names. When multiple words provided, ALL words must match. Searches in username, displayName, and fullName fields.',
62
+ description: 'Literal token search (non-semantic). Use single words users type (e.g., "dinner"). When multiple words provided, ALL must match. Case-insensitive.',
63
63
  },
64
- query: {
64
+ scope: {
65
65
  type: 'string',
66
- description: 'Search string to filter chats by title. When multiple words provided, ALL words must match. Matches are case-insensitive substrings.',
66
+ description: "Search scope: 'titles' matches title + network; 'participants' matches participant names.",
67
+ enum: ['titles', 'participants'],
67
68
  },
68
69
  type: {
69
70
  type: 'string',
70
- description: 'Specify the type of chats to retrieve: use "single" for direct messages, "group" for group chats, "channel" for channels, or "any" to get all types',
71
- enum: ['single', 'group', 'channel', 'any'],
71
+ description: 'Specify the type of chats to retrieve: use "single" for direct messages, "group" for group chats, or "any" to get all types',
72
+ enum: ['single', 'group', 'any'],
72
73
  },
73
74
  unreadOnly: {
74
75
  type: 'boolean',
@@ -1 +1 @@
1
- {"version":3,"file":"search-chats.js","sourceRoot":"","sources":["../../src/tools/chats/search-chats.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAgF;AAKnE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,kBAAkB;IAC5B,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,iEAAiE;IAC9E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,uFAAuF;gBACpG,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6CAA6C;iBAC3D;aACF;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kFAAkF;aAChG;YACD,SAAS,EAAE;gBACT,IA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EAAP,eAAO,EAAE,CAAC"}
@@ -10,7 +10,7 @@ export const metadata = {
10
10
  };
11
11
  export const tool = {
12
12
  name: 'search_chats',
13
- description: 'Search chats by inbox, type, unread status, or text. Paginates.',
13
+ description: "Search chats by title/network or participants using Beeper Desktop's renderer algorithm. Optional 'scope'.",
14
14
  inputSchema: {
15
15
  type: 'object',
16
16
  properties: {
@@ -54,18 +54,19 @@ export const tool = {
54
54
  type: 'integer',
55
55
  description: 'Set the maximum number of chats to retrieve. Valid range: 1-200, default is 50',
56
56
  },
57
- participantQuery: {
57
+ query: {
58
58
  type: 'string',
59
- description: 'Search string to filter chats by participant names. When multiple words provided, ALL words must match. Searches in username, displayName, and fullName fields.',
59
+ description: 'Literal token search (non-semantic). Use single words users type (e.g., "dinner"). When multiple words provided, ALL must match. Case-insensitive.',
60
60
  },
61
- query: {
61
+ scope: {
62
62
  type: 'string',
63
- description: 'Search string to filter chats by title. When multiple words provided, ALL words must match. Matches are case-insensitive substrings.',
63
+ description: "Search scope: 'titles' matches title + network; 'participants' matches participant names.",
64
+ enum: ['titles', 'participants'],
64
65
  },
65
66
  type: {
66
67
  type: 'string',
67
- description: 'Specify the type of chats to retrieve: use "single" for direct messages, "group" for group chats, "channel" for channels, or "any" to get all types',
68
- enum: ['single', 'group', 'channel', 'any'],
68
+ description: 'Specify the type of chats to retrieve: use "single" for direct messages, "group" for group chats, or "any" to get all types',
69
+ enum: ['single', 'group', 'any'],
69
70
  },
70
71
  unreadOnly: {
71
72
  type: 'boolean',
@@ -1 +1 @@
1
- {"version":3,"file":"search-chats.mjs","sourceRoot":"","sources":["../../src/tools/chats/search-chats.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAY,mBAAmB,EAAE,MAAM,iCAAiC;AAK/E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,UAAU,EAAE,KAAK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