agent-orchestrator-mcp-server 0.2.4 → 0.3.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.
Files changed (32) hide show
  1. package/README.md +125 -30
  2. package/build/index.js +4 -4
  3. package/package.json +1 -1
  4. package/shared/orchestrator-client/orchestrator-client.d.ts +128 -3
  5. package/shared/orchestrator-client/orchestrator-client.integration-mock.js +313 -1
  6. package/shared/orchestrator-client/orchestrator-client.js +205 -0
  7. package/shared/resources.js +9 -4
  8. package/shared/tools/action-health.d.ts +58 -0
  9. package/shared/tools/action-health.js +101 -0
  10. package/shared/tools/action-notification.d.ts +46 -0
  11. package/shared/tools/action-notification.js +99 -0
  12. package/shared/tools/action-session.d.ts +33 -9
  13. package/shared/tools/action-session.js +177 -15
  14. package/shared/tools/action-trigger.d.ts +114 -0
  15. package/shared/tools/action-trigger.js +177 -0
  16. package/shared/tools/get-notifications.d.ts +70 -0
  17. package/shared/tools/get-notifications.js +113 -0
  18. package/shared/tools/get-session.d.ts +8 -0
  19. package/shared/tools/get-session.js +21 -2
  20. package/shared/tools/get-system-health.d.ts +38 -0
  21. package/shared/tools/get-system-health.js +69 -0
  22. package/shared/tools/get-transcript-archive.d.ts +27 -0
  23. package/shared/tools/get-transcript-archive.js +64 -0
  24. package/shared/tools/manage-enqueued-messages.d.ts +94 -0
  25. package/shared/tools/manage-enqueued-messages.js +259 -0
  26. package/shared/tools/search-sessions.d.ts +3 -10
  27. package/shared/tools/search-sessions.js +10 -15
  28. package/shared/tools/search-triggers.d.ts +78 -0
  29. package/shared/tools/search-triggers.js +145 -0
  30. package/shared/tools.d.ts +7 -9
  31. package/shared/tools.js +105 -32
  32. package/shared/types.d.ts +162 -1
@@ -0,0 +1,27 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { z } from 'zod';
3
+ import type { IAgentOrchestratorClient } from '../orchestrator-client/orchestrator-client.js';
4
+ export declare const GetTranscriptArchiveSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
5
+ export declare function getTranscriptArchiveTool(_server: Server, clientFactory: () => IAgentOrchestratorClient): {
6
+ name: string;
7
+ description: string;
8
+ inputSchema: {
9
+ type: "object";
10
+ properties: {};
11
+ required: never[];
12
+ };
13
+ handler: (_args: unknown) => Promise<{
14
+ content: {
15
+ type: string;
16
+ text: string;
17
+ }[];
18
+ isError?: undefined;
19
+ } | {
20
+ content: {
21
+ type: string;
22
+ text: string;
23
+ }[];
24
+ isError: boolean;
25
+ }>;
26
+ };
27
+ //# sourceMappingURL=get-transcript-archive.d.ts.map
@@ -0,0 +1,64 @@
1
+ import { z } from 'zod';
2
+ export const GetTranscriptArchiveSchema = z.object({});
3
+ const TOOL_DESCRIPTION = `Get the download URL and curl command for the transcript archive zip file.
4
+
5
+ Returns the download URL, a ready-to-use curl command, and archive metadata (generation time, session count, file size). The archive is built incrementally every 10 minutes and contains all session transcripts.
6
+
7
+ **Use cases:**
8
+ - Download all session transcripts as a zip archive for backup or analysis
9
+ - Get archive metadata to check when it was last generated and how many sessions it contains`;
10
+ export function getTranscriptArchiveTool(_server, clientFactory) {
11
+ return {
12
+ name: 'get_transcript_archive',
13
+ description: TOOL_DESCRIPTION,
14
+ inputSchema: {
15
+ type: 'object',
16
+ properties: {},
17
+ required: [],
18
+ },
19
+ handler: async (_args) => {
20
+ try {
21
+ const client = clientFactory();
22
+ const status = await client.getTranscriptArchiveStatus();
23
+ const downloadInfo = client.getTranscriptArchiveDownloadUrl();
24
+ const lines = [
25
+ '## Transcript Archive',
26
+ '',
27
+ `- **Generated At:** ${status.generated_at}`,
28
+ `- **Session Count:** ${status.session_count}`,
29
+ `- **File Size:** ${formatFileSize(status.file_size_bytes)}`,
30
+ '',
31
+ '### Download',
32
+ '',
33
+ `**URL:** \`${downloadInfo.url}\``,
34
+ '',
35
+ 'To download, run:',
36
+ '```bash',
37
+ `curl -o /path/to/transcript-archive.zip -H "X-API-Key: ${downloadInfo.apiKey}" "${downloadInfo.url}"`,
38
+ '```',
39
+ ];
40
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
41
+ }
42
+ catch (error) {
43
+ return {
44
+ content: [
45
+ {
46
+ type: 'text',
47
+ text: `Error getting transcript archive: ${error instanceof Error ? error.message : 'Unknown error'}`,
48
+ },
49
+ ],
50
+ isError: true,
51
+ };
52
+ }
53
+ },
54
+ };
55
+ }
56
+ function formatFileSize(bytes) {
57
+ if (bytes < 1024)
58
+ return `${bytes} B`;
59
+ if (bytes < 1024 * 1024)
60
+ return `${(bytes / 1024).toFixed(1)} KB`;
61
+ if (bytes < 1024 * 1024 * 1024)
62
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
63
+ return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
64
+ }
@@ -0,0 +1,94 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { z } from 'zod';
3
+ import type { IAgentOrchestratorClient } from '../orchestrator-client/orchestrator-client.js';
4
+ export declare const ManageEnqueuedMessagesSchema: z.ZodObject<{
5
+ session_id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
6
+ action: z.ZodEnum<["list", "get", "create", "update", "delete", "reorder", "interrupt"]>;
7
+ message_id: z.ZodOptional<z.ZodNumber>;
8
+ content: z.ZodOptional<z.ZodString>;
9
+ stop_condition: z.ZodOptional<z.ZodString>;
10
+ position: z.ZodOptional<z.ZodNumber>;
11
+ page: z.ZodOptional<z.ZodNumber>;
12
+ per_page: z.ZodOptional<z.ZodNumber>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ session_id: string | number;
15
+ action: "list" | "get" | "create" | "update" | "delete" | "reorder" | "interrupt";
16
+ per_page?: number | undefined;
17
+ page?: number | undefined;
18
+ content?: string | undefined;
19
+ stop_condition?: string | undefined;
20
+ message_id?: number | undefined;
21
+ position?: number | undefined;
22
+ }, {
23
+ session_id: string | number;
24
+ action: "list" | "get" | "create" | "update" | "delete" | "reorder" | "interrupt";
25
+ per_page?: number | undefined;
26
+ page?: number | undefined;
27
+ content?: string | undefined;
28
+ stop_condition?: string | undefined;
29
+ message_id?: number | undefined;
30
+ position?: number | undefined;
31
+ }>;
32
+ export declare function manageEnqueuedMessagesTool(_server: Server, clientFactory: () => IAgentOrchestratorClient): {
33
+ name: string;
34
+ description: string;
35
+ inputSchema: {
36
+ type: "object";
37
+ properties: {
38
+ session_id: {
39
+ oneOf: {
40
+ type: string;
41
+ }[];
42
+ description: string;
43
+ };
44
+ action: {
45
+ type: string;
46
+ enum: readonly ["list", "get", "create", "update", "delete", "reorder", "interrupt"];
47
+ description: string;
48
+ };
49
+ message_id: {
50
+ type: string;
51
+ description: string;
52
+ };
53
+ content: {
54
+ type: string;
55
+ description: string;
56
+ };
57
+ stop_condition: {
58
+ type: string;
59
+ description: string;
60
+ };
61
+ position: {
62
+ type: string;
63
+ minimum: number;
64
+ description: string;
65
+ };
66
+ page: {
67
+ type: string;
68
+ minimum: number;
69
+ description: string;
70
+ };
71
+ per_page: {
72
+ type: string;
73
+ minimum: number;
74
+ maximum: number;
75
+ description: string;
76
+ };
77
+ };
78
+ required: string[];
79
+ };
80
+ handler: (args: unknown) => Promise<{
81
+ content: {
82
+ type: string;
83
+ text: string;
84
+ }[];
85
+ isError: boolean;
86
+ } | {
87
+ content: {
88
+ type: string;
89
+ text: string;
90
+ }[];
91
+ isError?: undefined;
92
+ }>;
93
+ };
94
+ //# sourceMappingURL=manage-enqueued-messages.d.ts.map
@@ -0,0 +1,259 @@
1
+ import { z } from 'zod';
2
+ const ACTION_ENUM = ['list', 'get', 'create', 'update', 'delete', 'reorder', 'interrupt'];
3
+ export const ManageEnqueuedMessagesSchema = z.object({
4
+ session_id: z.union([z.string(), z.number()]),
5
+ action: z.enum(ACTION_ENUM),
6
+ message_id: z.number().optional(),
7
+ content: z.string().optional(),
8
+ stop_condition: z.string().optional(),
9
+ position: z.number().min(1).optional(),
10
+ page: z.number().min(1).optional(),
11
+ per_page: z.number().min(1).max(100).optional(),
12
+ });
13
+ const TOOL_DESCRIPTION = `Manage the enqueued message queue for an agent session.
14
+
15
+ **Actions:**
16
+ - **list**: List all enqueued messages for a session (supports pagination)
17
+ - **get**: Get a specific enqueued message by ID
18
+ - **create**: Add a new message to the queue (requires "content")
19
+ - **update**: Update an existing message (requires "message_id")
20
+ - **delete**: Remove a message from the queue (requires "message_id")
21
+ - **reorder**: Change a message's position in the queue (requires "message_id" and "position")
22
+ - **interrupt**: Pause the session and send this message immediately (requires "message_id")
23
+
24
+ Enqueued messages are follow-up prompts queued to be sent to the agent in order.`;
25
+ export function manageEnqueuedMessagesTool(_server, clientFactory) {
26
+ return {
27
+ name: 'manage_enqueued_messages',
28
+ description: TOOL_DESCRIPTION,
29
+ inputSchema: {
30
+ type: 'object',
31
+ properties: {
32
+ session_id: {
33
+ oneOf: [{ type: 'string' }, { type: 'number' }],
34
+ description: 'Session ID (numeric) or slug (string).',
35
+ },
36
+ action: {
37
+ type: 'string',
38
+ enum: ACTION_ENUM,
39
+ description: 'Action to perform on enqueued messages.',
40
+ },
41
+ message_id: {
42
+ type: 'number',
43
+ description: 'Message ID. Required for get, update, delete, reorder, and interrupt.',
44
+ },
45
+ content: {
46
+ type: 'string',
47
+ description: 'Message content. Required for create. Optional for update.',
48
+ },
49
+ stop_condition: {
50
+ type: 'string',
51
+ description: 'Stop condition for this message. Optional for create and update.',
52
+ },
53
+ position: {
54
+ type: 'number',
55
+ minimum: 1,
56
+ description: 'New position in queue. Required for reorder.',
57
+ },
58
+ page: { type: 'number', minimum: 1, description: 'Page number for list. Default: 1' },
59
+ per_page: {
60
+ type: 'number',
61
+ minimum: 1,
62
+ maximum: 100,
63
+ description: 'Results per page for list. Default: 25',
64
+ },
65
+ },
66
+ required: ['session_id', 'action'],
67
+ },
68
+ handler: async (args) => {
69
+ try {
70
+ const validated = ManageEnqueuedMessagesSchema.parse(args);
71
+ const client = clientFactory();
72
+ const { session_id, action, message_id, content, stop_condition, position, page, per_page, } = validated;
73
+ let result;
74
+ switch (action) {
75
+ case 'list': {
76
+ const response = await client.listEnqueuedMessages(session_id, { page, per_page });
77
+ if (response.enqueued_messages.length === 0) {
78
+ result = '## Enqueued Messages\n\nNo enqueued messages found.';
79
+ }
80
+ else {
81
+ const lines = [
82
+ `## Enqueued Messages (${response.pagination.total_count} total, page ${response.pagination.page} of ${response.pagination.total_pages})`,
83
+ '',
84
+ ];
85
+ response.enqueued_messages.forEach((msg) => {
86
+ lines.push(`### Position ${msg.position} (ID: ${msg.id})`);
87
+ lines.push(`- **Status:** ${msg.status}`);
88
+ lines.push(`- **Content:** ${msg.content.substring(0, 200)}${msg.content.length > 200 ? '...' : ''}`);
89
+ if (msg.stop_condition)
90
+ lines.push(`- **Stop Condition:** ${msg.stop_condition}`);
91
+ lines.push('');
92
+ });
93
+ result = lines.join('\n');
94
+ }
95
+ break;
96
+ }
97
+ case 'get': {
98
+ if (!message_id) {
99
+ return {
100
+ content: [
101
+ { type: 'text', text: 'Error: "message_id" is required for the "get" action.' },
102
+ ],
103
+ isError: true,
104
+ };
105
+ }
106
+ const msg = await client.getEnqueuedMessage(session_id, message_id);
107
+ result = [
108
+ `## Enqueued Message #${msg.id}`,
109
+ '',
110
+ `- **Session ID:** ${msg.session_id}`,
111
+ `- **Position:** ${msg.position}`,
112
+ `- **Status:** ${msg.status}`,
113
+ `- **Content:** ${msg.content}`,
114
+ msg.stop_condition ? `- **Stop Condition:** ${msg.stop_condition}` : '',
115
+ `- **Created:** ${msg.created_at}`,
116
+ ]
117
+ .filter(Boolean)
118
+ .join('\n');
119
+ break;
120
+ }
121
+ case 'create': {
122
+ if (!content) {
123
+ return {
124
+ content: [
125
+ { type: 'text', text: 'Error: "content" is required for the "create" action.' },
126
+ ],
127
+ isError: true,
128
+ };
129
+ }
130
+ const msg = await client.createEnqueuedMessage(session_id, {
131
+ content,
132
+ stop_condition: stop_condition || undefined,
133
+ });
134
+ result = [
135
+ '## Message Enqueued',
136
+ '',
137
+ `- **ID:** ${msg.id}`,
138
+ `- **Position:** ${msg.position}`,
139
+ `- **Status:** ${msg.status}`,
140
+ `- **Content:** ${msg.content.substring(0, 200)}${msg.content.length > 200 ? '...' : ''}`,
141
+ ].join('\n');
142
+ break;
143
+ }
144
+ case 'update': {
145
+ if (!message_id) {
146
+ return {
147
+ content: [
148
+ {
149
+ type: 'text',
150
+ text: 'Error: "message_id" is required for the "update" action.',
151
+ },
152
+ ],
153
+ isError: true,
154
+ };
155
+ }
156
+ const msg = await client.updateEnqueuedMessage(session_id, message_id, {
157
+ content: content || undefined,
158
+ stop_condition: stop_condition || undefined,
159
+ });
160
+ result = [
161
+ '## Message Updated',
162
+ '',
163
+ `- **ID:** ${msg.id}`,
164
+ `- **Position:** ${msg.position}`,
165
+ `- **Content:** ${msg.content.substring(0, 200)}${msg.content.length > 200 ? '...' : ''}`,
166
+ ].join('\n');
167
+ break;
168
+ }
169
+ case 'delete': {
170
+ if (!message_id) {
171
+ return {
172
+ content: [
173
+ {
174
+ type: 'text',
175
+ text: 'Error: "message_id" is required for the "delete" action.',
176
+ },
177
+ ],
178
+ isError: true,
179
+ };
180
+ }
181
+ await client.deleteEnqueuedMessage(session_id, message_id);
182
+ result = `## Message Deleted\n\nEnqueued message ${message_id} has been removed from the queue.`;
183
+ break;
184
+ }
185
+ case 'reorder': {
186
+ if (!message_id) {
187
+ return {
188
+ content: [
189
+ {
190
+ type: 'text',
191
+ text: 'Error: "message_id" is required for the "reorder" action.',
192
+ },
193
+ ],
194
+ isError: true,
195
+ };
196
+ }
197
+ if (!position) {
198
+ return {
199
+ content: [
200
+ { type: 'text', text: 'Error: "position" is required for the "reorder" action.' },
201
+ ],
202
+ isError: true,
203
+ };
204
+ }
205
+ const msg = await client.reorderEnqueuedMessage(session_id, message_id, position);
206
+ result = [
207
+ '## Message Reordered',
208
+ '',
209
+ `- **ID:** ${msg.id}`,
210
+ `- **New Position:** ${msg.position}`,
211
+ ].join('\n');
212
+ break;
213
+ }
214
+ case 'interrupt': {
215
+ if (!message_id) {
216
+ return {
217
+ content: [
218
+ {
219
+ type: 'text',
220
+ text: 'Error: "message_id" is required for the "interrupt" action.',
221
+ },
222
+ ],
223
+ isError: true,
224
+ };
225
+ }
226
+ const response = await client.interruptEnqueuedMessage(session_id, message_id);
227
+ result = [
228
+ '## Message Sent as Interrupt',
229
+ '',
230
+ `- **Session ID:** ${response.session.id}`,
231
+ `- **Session Status:** ${response.session.status}`,
232
+ `- **Message:** ${response.message}`,
233
+ ].join('\n');
234
+ break;
235
+ }
236
+ default: {
237
+ const _exhaustiveCheck = action;
238
+ return {
239
+ content: [{ type: 'text', text: `Error: Unknown action "${_exhaustiveCheck}"` }],
240
+ isError: true,
241
+ };
242
+ }
243
+ }
244
+ return { content: [{ type: 'text', text: result }] };
245
+ }
246
+ catch (error) {
247
+ return {
248
+ content: [
249
+ {
250
+ type: 'text',
251
+ text: `Error managing enqueued messages: ${error instanceof Error ? error.message : 'Unknown error'}`,
252
+ },
253
+ ],
254
+ isError: true,
255
+ };
256
+ }
257
+ },
258
+ };
259
+ }
@@ -1,10 +1,9 @@
1
1
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
2
  import { z } from 'zod';
3
3
  import type { IAgentOrchestratorClient } from '../orchestrator-client/orchestrator-client.js';
4
- export declare const SearchSessionsSchema: z.ZodObject<{
4
+ export declare const QuickSearchSessionsSchema: z.ZodObject<{
5
5
  id: z.ZodOptional<z.ZodNumber>;
6
6
  query: z.ZodOptional<z.ZodString>;
7
- search_contents: z.ZodOptional<z.ZodBoolean>;
8
7
  status: z.ZodOptional<z.ZodEnum<["waiting", "running", "needs_input", "failed", "archived"]>>;
9
8
  agent_type: z.ZodOptional<z.ZodString>;
10
9
  show_archived: z.ZodOptional<z.ZodBoolean>;
@@ -16,7 +15,6 @@ export declare const SearchSessionsSchema: z.ZodObject<{
16
15
  agent_type?: string | undefined;
17
16
  show_archived?: boolean | undefined;
18
17
  page?: number | undefined;
19
- search_contents?: boolean | undefined;
20
18
  id?: number | undefined;
21
19
  query?: string | undefined;
22
20
  }, {
@@ -25,11 +23,10 @@ export declare const SearchSessionsSchema: z.ZodObject<{
25
23
  agent_type?: string | undefined;
26
24
  show_archived?: boolean | undefined;
27
25
  page?: number | undefined;
28
- search_contents?: boolean | undefined;
29
26
  id?: number | undefined;
30
27
  query?: string | undefined;
31
28
  }>;
32
- export declare function searchSessionsTool(_server: Server, clientFactory: () => IAgentOrchestratorClient): {
29
+ export declare function quickSearchSessionsTool(_server: Server, clientFactory: () => IAgentOrchestratorClient): {
33
30
  name: string;
34
31
  description: string;
35
32
  inputSchema: {
@@ -42,11 +39,7 @@ export declare function searchSessionsTool(_server: Server, clientFactory: () =>
42
39
  query: {
43
40
  type: string;
44
41
  maxLength: number;
45
- description: "Search query to find sessions. Searches across title, metadata, and custom_metadata. Leave empty to list all sessions.";
46
- };
47
- search_contents: {
48
- type: string;
49
- description: "Also search within transcript contents. May be slow for sessions with large transcripts. Default: false";
42
+ description: "Search query to find sessions. Matches against session title only — this is a simple title search, not a full-text or semantic search. Leave empty to list all sessions.";
50
43
  };
51
44
  status: {
52
45
  type: string;
@@ -1,18 +1,16 @@
1
1
  import { z } from 'zod';
2
2
  const PARAM_DESCRIPTIONS = {
3
3
  id: 'Get a specific session by ID. When provided, other filters are ignored.',
4
- query: 'Search query to find sessions. Searches across title, metadata, and custom_metadata. Leave empty to list all sessions.',
5
- search_contents: 'Also search within transcript contents. May be slow for sessions with large transcripts. Default: false',
4
+ query: 'Search query to find sessions. Matches against session title only — this is a simple title search, not a full-text or semantic search. Leave empty to list all sessions.',
6
5
  status: 'Filter results by status. Options: "waiting", "running", "needs_input", "failed", "archived"',
7
6
  agent_type: 'Filter results by agent type.',
8
7
  show_archived: 'Include archived sessions in results. Default: false',
9
8
  page: 'Page number for pagination. Default: 1',
10
9
  per_page: 'Number of results per page (1-100). Default: 25',
11
10
  };
12
- export const SearchSessionsSchema = z.object({
11
+ export const QuickSearchSessionsSchema = z.object({
13
12
  id: z.number().optional().describe(PARAM_DESCRIPTIONS.id),
14
13
  query: z.string().max(1000).optional().describe(PARAM_DESCRIPTIONS.query),
15
- search_contents: z.boolean().optional().describe(PARAM_DESCRIPTIONS.search_contents),
16
14
  status: z
17
15
  .enum(['waiting', 'running', 'needs_input', 'failed', 'archived'])
18
16
  .optional()
@@ -22,11 +20,13 @@ export const SearchSessionsSchema = z.object({
22
20
  page: z.number().min(1).optional().describe(PARAM_DESCRIPTIONS.page),
23
21
  per_page: z.number().min(1).max(100).optional().describe(PARAM_DESCRIPTIONS.per_page),
24
22
  });
25
- const TOOL_DESCRIPTION = `Search for agent sessions in the Agent Orchestrator.
23
+ const TOOL_DESCRIPTION = `Quick title-based search for agent sessions in the Agent Orchestrator.
24
+
25
+ **Important:** This tool only searches session titles. It is NOT a full-text or semantic search across session contents/transcripts. Use this when you roughly know the session title you're looking for.
26
26
 
27
27
  **Use cases:**
28
28
  - Find a specific session by ID (set id parameter)
29
- - Search sessions by keyword in title/prompt (set query parameter)
29
+ - Search sessions by title keyword (set query parameter)
30
30
  - List all sessions with optional status filter
31
31
  - Monitor sessions requiring attention (status: "needs_input")
32
32
 
@@ -66,9 +66,9 @@ function formatSession(session) {
66
66
  lines.push(`- **Updated:** ${session.updated_at}`);
67
67
  return lines.join('\n');
68
68
  }
69
- export function searchSessionsTool(_server, clientFactory) {
69
+ export function quickSearchSessionsTool(_server, clientFactory) {
70
70
  return {
71
- name: 'search_sessions',
71
+ name: 'quick_search_sessions',
72
72
  description: TOOL_DESCRIPTION,
73
73
  inputSchema: {
74
74
  type: 'object',
@@ -82,10 +82,6 @@ export function searchSessionsTool(_server, clientFactory) {
82
82
  maxLength: 1000,
83
83
  description: PARAM_DESCRIPTIONS.query,
84
84
  },
85
- search_contents: {
86
- type: 'boolean',
87
- description: PARAM_DESCRIPTIONS.search_contents,
88
- },
89
85
  status: {
90
86
  type: 'string',
91
87
  enum: ['waiting', 'running', 'needs_input', 'failed', 'archived'],
@@ -115,7 +111,7 @@ export function searchSessionsTool(_server, clientFactory) {
115
111
  },
116
112
  handler: async (args) => {
117
113
  try {
118
- const validatedArgs = SearchSessionsSchema.parse(args);
114
+ const validatedArgs = QuickSearchSessionsSchema.parse(args);
119
115
  const client = clientFactory();
120
116
  // If ID is provided, get that specific session
121
117
  if (validatedArgs.id !== undefined) {
@@ -133,9 +129,8 @@ export function searchSessionsTool(_server, clientFactory) {
133
129
  let sessions;
134
130
  let pagination;
135
131
  if (validatedArgs.query) {
136
- // Use search endpoint
132
+ // Use search endpoint (title-only search, no content search)
137
133
  const response = await client.searchSessions(validatedArgs.query, {
138
- search_contents: validatedArgs.search_contents,
139
134
  status: validatedArgs.status,
140
135
  agent_type: validatedArgs.agent_type,
141
136
  show_archived: validatedArgs.show_archived,
@@ -0,0 +1,78 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { z } from 'zod';
3
+ import type { IAgentOrchestratorClient } from '../orchestrator-client/orchestrator-client.js';
4
+ export declare const SearchTriggersSchema: z.ZodObject<{
5
+ id: z.ZodOptional<z.ZodNumber>;
6
+ trigger_type: z.ZodOptional<z.ZodEnum<["slack", "schedule"]>>;
7
+ status: z.ZodOptional<z.ZodEnum<["enabled", "disabled"]>>;
8
+ include_channels: z.ZodOptional<z.ZodBoolean>;
9
+ page: z.ZodOptional<z.ZodNumber>;
10
+ per_page: z.ZodOptional<z.ZodNumber>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ per_page?: number | undefined;
13
+ status?: "enabled" | "disabled" | undefined;
14
+ page?: number | undefined;
15
+ trigger_type?: "slack" | "schedule" | undefined;
16
+ id?: number | undefined;
17
+ include_channels?: boolean | undefined;
18
+ }, {
19
+ per_page?: number | undefined;
20
+ status?: "enabled" | "disabled" | undefined;
21
+ page?: number | undefined;
22
+ trigger_type?: "slack" | "schedule" | undefined;
23
+ id?: number | undefined;
24
+ include_channels?: boolean | undefined;
25
+ }>;
26
+ export declare function searchTriggersTool(_server: Server, clientFactory: () => IAgentOrchestratorClient): {
27
+ name: string;
28
+ description: string;
29
+ inputSchema: {
30
+ type: "object";
31
+ properties: {
32
+ id: {
33
+ type: string;
34
+ description: string;
35
+ };
36
+ trigger_type: {
37
+ type: string;
38
+ enum: string[];
39
+ description: string;
40
+ };
41
+ status: {
42
+ type: string;
43
+ enum: string[];
44
+ description: string;
45
+ };
46
+ include_channels: {
47
+ type: string;
48
+ description: string;
49
+ };
50
+ page: {
51
+ type: string;
52
+ minimum: number;
53
+ description: string;
54
+ };
55
+ per_page: {
56
+ type: string;
57
+ minimum: number;
58
+ maximum: number;
59
+ description: string;
60
+ };
61
+ };
62
+ required: never[];
63
+ };
64
+ handler: (args: unknown) => Promise<{
65
+ content: {
66
+ type: string;
67
+ text: string;
68
+ }[];
69
+ isError?: undefined;
70
+ } | {
71
+ content: {
72
+ type: string;
73
+ text: string;
74
+ }[];
75
+ isError: boolean;
76
+ }>;
77
+ };
78
+ //# sourceMappingURL=search-triggers.d.ts.map