@browserless.io/mcp 1.6.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 (81) hide show
  1. package/LICENSE +557 -0
  2. package/README.md +280 -0
  3. package/bin/cli.js +2 -0
  4. package/build/src/@types/types.d.ts +538 -0
  5. package/build/src/config.d.ts +3 -0
  6. package/build/src/config.js +42 -0
  7. package/build/src/index.d.ts +4 -0
  8. package/build/src/index.js +153 -0
  9. package/build/src/lib/account-resolver.d.ts +17 -0
  10. package/build/src/lib/account-resolver.js +78 -0
  11. package/build/src/lib/agent-client.d.ts +58 -0
  12. package/build/src/lib/agent-client.js +530 -0
  13. package/build/src/lib/agent-format.d.ts +35 -0
  14. package/build/src/lib/agent-format.js +155 -0
  15. package/build/src/lib/amplitude.d.ts +11 -0
  16. package/build/src/lib/amplitude.js +65 -0
  17. package/build/src/lib/analytics.d.ts +18 -0
  18. package/build/src/lib/analytics.js +79 -0
  19. package/build/src/lib/api-client.d.ts +17 -0
  20. package/build/src/lib/api-client.js +357 -0
  21. package/build/src/lib/bounded-event-store.d.ts +22 -0
  22. package/build/src/lib/bounded-event-store.js +69 -0
  23. package/build/src/lib/cache.d.ts +12 -0
  24. package/build/src/lib/cache.js +49 -0
  25. package/build/src/lib/define-tool.d.ts +71 -0
  26. package/build/src/lib/define-tool.js +71 -0
  27. package/build/src/lib/error-classifier.d.ts +4 -0
  28. package/build/src/lib/error-classifier.js +125 -0
  29. package/build/src/lib/redis-oauth-proxy.d.ts +13 -0
  30. package/build/src/lib/redis-oauth-proxy.js +214 -0
  31. package/build/src/lib/retry.d.ts +2 -0
  32. package/build/src/lib/retry.js +19 -0
  33. package/build/src/lib/schema-fields.d.ts +10 -0
  34. package/build/src/lib/schema-fields.js +27 -0
  35. package/build/src/lib/supabase-token-patch.d.ts +6 -0
  36. package/build/src/lib/supabase-token-patch.js +33 -0
  37. package/build/src/lib/utils.d.ts +27 -0
  38. package/build/src/lib/utils.js +67 -0
  39. package/build/src/prompts/extract-content.d.ts +2 -0
  40. package/build/src/prompts/extract-content.js +33 -0
  41. package/build/src/prompts/scrape-url.d.ts +2 -0
  42. package/build/src/prompts/scrape-url.js +36 -0
  43. package/build/src/resources/api-docs.d.ts +3 -0
  44. package/build/src/resources/api-docs.js +54 -0
  45. package/build/src/resources/status.d.ts +3 -0
  46. package/build/src/resources/status.js +30 -0
  47. package/build/src/skills/autonomous-login.md +95 -0
  48. package/build/src/skills/captchas.md +48 -0
  49. package/build/src/skills/cookie-consent.md +50 -0
  50. package/build/src/skills/dynamic-content.md +72 -0
  51. package/build/src/skills/index.d.ts +9 -0
  52. package/build/src/skills/index.js +221 -0
  53. package/build/src/skills/modals.md +56 -0
  54. package/build/src/skills/screenshots.md +53 -0
  55. package/build/src/skills/shadow-dom.md +64 -0
  56. package/build/src/skills/snapshot-misses.md +67 -0
  57. package/build/src/skills/system-prompt.d.ts +2 -0
  58. package/build/src/skills/system-prompt.js +128 -0
  59. package/build/src/skills/tabs.md +77 -0
  60. package/build/src/tools/agent.d.ts +15 -0
  61. package/build/src/tools/agent.js +299 -0
  62. package/build/src/tools/crawl.d.ts +75 -0
  63. package/build/src/tools/crawl.js +426 -0
  64. package/build/src/tools/download.d.ts +11 -0
  65. package/build/src/tools/download.js +92 -0
  66. package/build/src/tools/export.d.ts +28 -0
  67. package/build/src/tools/export.js +129 -0
  68. package/build/src/tools/function.d.ts +24 -0
  69. package/build/src/tools/function.js +144 -0
  70. package/build/src/tools/map.d.ts +23 -0
  71. package/build/src/tools/map.js +129 -0
  72. package/build/src/tools/performance.d.ts +25 -0
  73. package/build/src/tools/performance.js +103 -0
  74. package/build/src/tools/schemas.d.ts +466 -0
  75. package/build/src/tools/schemas.js +487 -0
  76. package/build/src/tools/search.d.ts +67 -0
  77. package/build/src/tools/search.js +184 -0
  78. package/build/src/tools/smartscraper.d.ts +42 -0
  79. package/build/src/tools/smartscraper.js +136 -0
  80. package/package.json +111 -0
  81. package/patches/mcp-proxy+6.4.0.patch +31 -0
@@ -0,0 +1,487 @@
1
+ import { z } from 'zod';
2
+ import { ProxyOptionsSchema } from '../lib/agent-client.js';
3
+ // NUL is the session-key separator (KEY_SEP) in agent-client.ts. Computed via
4
+ // fromCharCode so the literal control character never appears in source.
5
+ const NUL = String.fromCharCode(0);
6
+ export function profileField(whenLoaded, extra = '') {
7
+ const description = `Optional name of an authentication profile to hydrate into the browser ${whenLoaded}. ` +
8
+ "The profile's cookies, localStorage, and IndexedDB are restored into the session before the request runs. " +
9
+ 'The profile must already exist for the API token in use — create one with Browserless.saveProfile in a live agent session first.' +
10
+ extra;
11
+ return z
12
+ .string()
13
+ .trim()
14
+ .min(1)
15
+ .refine((v) => !v.includes(NUL), {
16
+ message: 'profile must not contain NUL characters',
17
+ })
18
+ .optional()
19
+ .describe(description);
20
+ }
21
+ const WaitUntilSchema = z.enum([
22
+ 'load',
23
+ 'domcontentloaded',
24
+ 'networkidle0',
25
+ 'networkidle2',
26
+ ]);
27
+ const GotoCommandSchema = z.object({
28
+ method: z.literal('goto'),
29
+ params: z.object({
30
+ url: z.string().describe('The URL to navigate to'),
31
+ waitUntil: WaitUntilSchema.optional().describe('When to consider navigation complete. Defaults to "domcontentloaded". Avoid networkidle0/networkidle2 unless explicitly needed — they hang on SPAs and dynamic sites.'),
32
+ timeout: z
33
+ .number()
34
+ .optional()
35
+ .describe('Navigation timeout in milliseconds'),
36
+ }),
37
+ });
38
+ const SnapshotCommandSchema = z.object({
39
+ method: z.literal('snapshot'),
40
+ params: z
41
+ .object({
42
+ maxElements: z
43
+ .number()
44
+ .int()
45
+ .positive()
46
+ .optional()
47
+ .describe('Maximum number of elements to return (default 500)'),
48
+ targetId: z
49
+ .string()
50
+ .optional()
51
+ .describe('Optional tab targetId to peek at without switching the active tab. ' +
52
+ 'Obtain via getTabs or a prior snapshot response. Omit to snapshot the active tab.'),
53
+ })
54
+ .optional()
55
+ .default({}),
56
+ });
57
+ const GetTabsCommandSchema = z.object({
58
+ method: z.literal('getTabs'),
59
+ params: z.object({}).optional().default({}),
60
+ });
61
+ const SwitchTabCommandSchema = z.object({
62
+ method: z.literal('switchTab'),
63
+ params: z.object({
64
+ targetId: z
65
+ .string()
66
+ .describe('The targetId of the tab to make active (from getTabs).'),
67
+ }),
68
+ });
69
+ const CreateTabCommandSchema = z.object({
70
+ method: z.literal('createTab'),
71
+ params: z
72
+ .object({
73
+ url: z
74
+ .string()
75
+ .optional()
76
+ .describe('URL to open in the new tab. Defaults to about:blank if omitted.'),
77
+ activate: z
78
+ .boolean()
79
+ .optional()
80
+ .describe('If true (default), switch to the new tab. If false, open it in the background ' +
81
+ 'and leave the current tab active.'),
82
+ waitUntil: WaitUntilSchema.optional().describe('When to consider navigation complete. Only applies when activate is true. Defaults to "domcontentloaded".'),
83
+ })
84
+ .optional()
85
+ .default({}),
86
+ });
87
+ const CloseTabCommandSchema = z.object({
88
+ method: z.literal('closeTab'),
89
+ params: z.object({
90
+ targetId: z.string().describe('The targetId of the tab to close.'),
91
+ }),
92
+ });
93
+ const BackCommandSchema = z.object({
94
+ method: z.literal('back'),
95
+ params: z
96
+ .object({
97
+ waitUntil: WaitUntilSchema.optional().describe('When to consider navigation complete. Defaults to "load".'),
98
+ })
99
+ .optional()
100
+ .default({}),
101
+ });
102
+ const ForwardCommandSchema = z.object({
103
+ method: z.literal('forward'),
104
+ params: z
105
+ .object({
106
+ waitUntil: WaitUntilSchema.optional().describe('When to consider navigation complete. Defaults to "load".'),
107
+ })
108
+ .optional()
109
+ .default({}),
110
+ });
111
+ const ReloadCommandSchema = z.object({
112
+ method: z.literal('reload'),
113
+ params: z
114
+ .object({
115
+ waitUntil: WaitUntilSchema.optional().describe('When to consider navigation complete. Defaults to "load".'),
116
+ })
117
+ .optional()
118
+ .default({}),
119
+ });
120
+ const ClickCommandSchema = z.object({
121
+ method: z.literal('click'),
122
+ params: z.object({
123
+ selector: z.string().describe('CSS selector of the element to click'),
124
+ }),
125
+ });
126
+ const TypeCommandSchema = z.object({
127
+ method: z.literal('type'),
128
+ params: z.object({
129
+ selector: z.string().describe('CSS selector of the input element'),
130
+ text: z.string().describe('Text to type into the element'),
131
+ }),
132
+ });
133
+ const SelectCommandSchema = z.object({
134
+ method: z.literal('select'),
135
+ params: z.object({
136
+ selector: z.string().describe('CSS selector of the select element'),
137
+ value: z.string().describe('Option value to select'),
138
+ }),
139
+ });
140
+ const CheckboxCommandSchema = z.object({
141
+ method: z.literal('checkbox'),
142
+ params: z.object({
143
+ selector: z.string().describe('CSS selector of the checkbox element'),
144
+ checked: z
145
+ .boolean()
146
+ .optional()
147
+ .describe('Desired checked state (default: toggle)'),
148
+ }),
149
+ });
150
+ const HoverCommandSchema = z.object({
151
+ method: z.literal('hover'),
152
+ params: z.object({
153
+ selector: z.string().describe('CSS selector of the element to hover over'),
154
+ }),
155
+ });
156
+ const ScrollCommandSchema = z.object({
157
+ method: z.literal('scroll'),
158
+ params: z
159
+ .object({
160
+ selector: z
161
+ .string()
162
+ .optional()
163
+ .describe('CSS selector of element to scroll (omit for page scroll)'),
164
+ direction: z
165
+ .enum(['up', 'down', 'left', 'right'])
166
+ .optional()
167
+ .describe('Scroll direction. Defaults to "down".'),
168
+ })
169
+ .optional()
170
+ .default({}),
171
+ });
172
+ const EvaluateCommandSchema = z.object({
173
+ method: z.literal('evaluate'),
174
+ params: z.object({
175
+ content: z
176
+ .string()
177
+ .describe('JavaScript code to execute (use IIFE syntax)'),
178
+ }),
179
+ });
180
+ const TextCommandSchema = z.object({
181
+ method: z.literal('text'),
182
+ params: z
183
+ .object({
184
+ selector: z
185
+ .string()
186
+ .optional()
187
+ .describe('CSS selector to extract text from'),
188
+ })
189
+ .optional()
190
+ .default({}),
191
+ });
192
+ const HtmlCommandSchema = z.object({
193
+ method: z.literal('html'),
194
+ params: z
195
+ .object({
196
+ selector: z.string().optional().describe('CSS selector to get HTML from'),
197
+ })
198
+ .optional()
199
+ .default({}),
200
+ });
201
+ const WaitForSelectorCommandSchema = z.object({
202
+ method: z.literal('waitForSelector'),
203
+ params: z.object({
204
+ selector: z.string().describe('CSS selector to wait for'),
205
+ timeout: z
206
+ .number()
207
+ .optional()
208
+ .describe('Timeout in milliseconds (recommend 5000-10000)'),
209
+ }),
210
+ });
211
+ const WaitForNavigationCommandSchema = z.object({
212
+ method: z.literal('waitForNavigation'),
213
+ params: z
214
+ .object({
215
+ timeout: z
216
+ .number()
217
+ .optional()
218
+ .describe('Timeout in milliseconds (default 30000)'),
219
+ })
220
+ .optional()
221
+ .default({}),
222
+ });
223
+ const WaitForTimeoutCommandSchema = z.object({
224
+ method: z.literal('waitForTimeout'),
225
+ params: z.object({
226
+ time: z
227
+ .number()
228
+ .describe('Time to wait in milliseconds (e.g., 3000 for 3 seconds)'),
229
+ }),
230
+ });
231
+ const WaitForRequestCommandSchema = z.object({
232
+ method: z.literal('waitForRequest'),
233
+ params: z.object({
234
+ url: z
235
+ .string()
236
+ .optional()
237
+ .describe('URL pattern to match (glob-style, e.g., "*api/results*")'),
238
+ method: z
239
+ .string()
240
+ .optional()
241
+ .describe('HTTP method to match (e.g., "GET", "POST")'),
242
+ timeout: z
243
+ .number()
244
+ .optional()
245
+ .describe('Timeout in milliseconds (default 30000)'),
246
+ }),
247
+ });
248
+ const WaitForResponseCommandSchema = z.object({
249
+ method: z.literal('waitForResponse'),
250
+ params: z.object({
251
+ url: z
252
+ .string()
253
+ .optional()
254
+ .describe('URL pattern to match (glob-style, e.g., "*api/results*")'),
255
+ statuses: z
256
+ .array(z.number())
257
+ .optional()
258
+ .describe('HTTP status codes to match (e.g., [200, 201])'),
259
+ timeout: z
260
+ .number()
261
+ .optional()
262
+ .describe('Timeout in milliseconds (default 30000)'),
263
+ }),
264
+ });
265
+ const LiveURLCommandSchema = z.object({
266
+ method: z.literal('liveURL'),
267
+ params: z
268
+ .object({
269
+ timeout: z
270
+ .number()
271
+ .optional()
272
+ .describe('How long the live URL stays active (ms)'),
273
+ interactable: z
274
+ .boolean()
275
+ .optional()
276
+ .describe('Allow interaction via the live URL'),
277
+ quality: z
278
+ .number()
279
+ .int()
280
+ .min(1)
281
+ .max(100)
282
+ .optional()
283
+ .describe('Image quality (1-100)'),
284
+ type: z
285
+ .enum(['jpeg', 'png'])
286
+ .optional()
287
+ .describe('Image format for the stream'),
288
+ resizable: z
289
+ .boolean()
290
+ .optional()
291
+ .describe('Allow resizing the browser viewport'),
292
+ })
293
+ .optional()
294
+ .default({}),
295
+ });
296
+ const ScreenshotTypeSchema = z.enum(['jpeg', 'png', 'webp']);
297
+ const ScreenshotClipSchema = z.object({
298
+ x: z.number().describe('X coordinate of the top-left corner, in CSS pixels'),
299
+ y: z.number().describe('Y coordinate of the top-left corner, in CSS pixels'),
300
+ width: z.number().min(1).describe('Width of the clip, in CSS pixels (>0)'),
301
+ height: z.number().min(1).describe('Height of the clip, in CSS pixels (>0)'),
302
+ scale: z
303
+ .number()
304
+ .positive()
305
+ .optional()
306
+ .describe('Scale factor of the clip (default 1, >0)'),
307
+ });
308
+ const ScreenshotCommandSchema = z.object({
309
+ method: z.literal('screenshot'),
310
+ params: z
311
+ .object({
312
+ type: ScreenshotTypeSchema.optional().describe('Image format. Default "png". Use "jpeg" for smaller payloads on large pages.'),
313
+ fullPage: z
314
+ .boolean()
315
+ .optional()
316
+ .describe('Capture the entire scrollable page (default false)'),
317
+ selector: z
318
+ .string()
319
+ .optional()
320
+ .describe('CSS selector of an element to screenshot. Mutually exclusive with fullPage/clip.'),
321
+ quality: z
322
+ .number()
323
+ .min(0)
324
+ .max(100)
325
+ .optional()
326
+ .describe('Image quality 0-100. Applies to jpeg/webp only.'),
327
+ omitBackground: z
328
+ .boolean()
329
+ .optional()
330
+ .describe('Hide default white background for transparent screenshots'),
331
+ clip: ScreenshotClipSchema.optional().describe('Region of the page to capture. Mutually exclusive with selector/fullPage.'),
332
+ waitForImages: z
333
+ .boolean()
334
+ .optional()
335
+ .describe('Wait for all images on the page to load before capturing'),
336
+ timeout: z
337
+ .number()
338
+ .optional()
339
+ .describe('Timeout in milliseconds (default 30000)'),
340
+ })
341
+ .optional()
342
+ .default({})
343
+ .superRefine((params, ctx) => {
344
+ const set = [
345
+ params.selector !== undefined ? 'selector' : null,
346
+ params.clip !== undefined ? 'clip' : null,
347
+ params.fullPage === true ? 'fullPage' : null,
348
+ ].filter((v) => v !== null);
349
+ if (set.length > 1) {
350
+ ctx.addIssue({
351
+ code: z.ZodIssueCode.custom,
352
+ message: `selector, clip, and fullPage are mutually exclusive (got: ${set.join(', ')})`,
353
+ });
354
+ }
355
+ }),
356
+ });
357
+ const CaptchaTypeSchema = z.enum([
358
+ 'cloudflare',
359
+ 'hcaptcha',
360
+ 'recaptcha',
361
+ 'recaptchaV3',
362
+ 'geetest',
363
+ 'normal',
364
+ 'friendlyCaptcha',
365
+ 'capy',
366
+ 'textCaptcha',
367
+ 'amazonWaf',
368
+ 'dataDome',
369
+ 'akamai',
370
+ 'lemin',
371
+ 'mtcaptcha',
372
+ 'slider',
373
+ ]);
374
+ const SolveCommandSchema = z.object({
375
+ method: z.literal('solve'),
376
+ params: z
377
+ .object({
378
+ type: CaptchaTypeSchema.optional().describe('Captcha type to solve. Omit to auto-detect.'),
379
+ timeout: z
380
+ .number()
381
+ .int()
382
+ .positive()
383
+ .optional()
384
+ .describe('How long to wait for the captcha to appear (ms). Default 30000. ' +
385
+ 'Does not bound the solver itself once a captcha is found.'),
386
+ wait: z
387
+ .boolean()
388
+ .optional()
389
+ .describe('Wait for the captcha to appear before solving (default true). ' +
390
+ 'Set false if you have already verified the widget is on screen.'),
391
+ })
392
+ .optional()
393
+ .default({}),
394
+ });
395
+ const CloseCommandSchema = z.object({
396
+ method: z.literal('close'),
397
+ params: z.object({}).optional().default({}),
398
+ });
399
+ // Fully-typed command variants, each keyed by a `method` literal so they can be
400
+ // dispatched by the discriminated union below.
401
+ const specificCommandSchemas = [
402
+ GotoCommandSchema,
403
+ BackCommandSchema,
404
+ ForwardCommandSchema,
405
+ ReloadCommandSchema,
406
+ SnapshotCommandSchema,
407
+ GetTabsCommandSchema,
408
+ SwitchTabCommandSchema,
409
+ CreateTabCommandSchema,
410
+ CloseTabCommandSchema,
411
+ ClickCommandSchema,
412
+ TypeCommandSchema,
413
+ SelectCommandSchema,
414
+ CheckboxCommandSchema,
415
+ HoverCommandSchema,
416
+ ScrollCommandSchema,
417
+ EvaluateCommandSchema,
418
+ TextCommandSchema,
419
+ HtmlCommandSchema,
420
+ WaitForSelectorCommandSchema,
421
+ WaitForNavigationCommandSchema,
422
+ WaitForTimeoutCommandSchema,
423
+ WaitForRequestCommandSchema,
424
+ WaitForResponseCommandSchema,
425
+ LiveURLCommandSchema,
426
+ SolveCommandSchema,
427
+ ScreenshotCommandSchema,
428
+ CloseCommandSchema,
429
+ ];
430
+ const KNOWN_METHODS = new Set(specificCommandSchemas.map((schema) => schema.shape.method.value));
431
+ // fallback for non typed bql methods
432
+ const GenericCommandSchema = z.object({
433
+ method: z
434
+ .string()
435
+ .refine((m) => !KNOWN_METHODS.has(m), {
436
+ message: 'method has a typed schema and is validated there, not here',
437
+ })
438
+ .describe('The BQL method name'),
439
+ params: z
440
+ .record(z.string(), z.unknown())
441
+ .optional()
442
+ .default({})
443
+ .describe('Parameters for the method'),
444
+ });
445
+ export const AgentCommandSchema = z.union([
446
+ z.discriminatedUnion('method', specificCommandSchemas),
447
+ GenericCommandSchema,
448
+ ]);
449
+ export const AgentParamsSchema = z.object({
450
+ method: z
451
+ .string()
452
+ .optional()
453
+ .default('')
454
+ .describe('The BQL method to execute (used for single-command calls). ' +
455
+ 'When using "commands" array, this field is ignored.'),
456
+ params: z
457
+ .record(z.string(), z.unknown())
458
+ .optional()
459
+ .default({})
460
+ .describe('Parameters for the method (used for single-command calls).'),
461
+ commands: z
462
+ .array(AgentCommandSchema)
463
+ .optional()
464
+ .describe('Optional: batch multiple commands in one call. When provided, "method" and "params" ' +
465
+ 'are ignored and commands are executed sequentially. Only the final result is returned. ' +
466
+ 'Use this to batch actions that share the same page state (e.g. filling a form: ' +
467
+ 'type email + type password + click submit). Do NOT batch across navigations.'),
468
+ proxy: ProxyOptionsSchema.optional().describe('Residential / external proxy config. Read once at session creation. ' +
469
+ 'Changing requires close() + a new session call.'),
470
+ profile: profileField('when the agent session connects', ' The profile is fixed for the lifetime of the agent session; ' +
471
+ 'passing a different profile value opens a separate browser session.'),
472
+ rationale: z
473
+ .string()
474
+ .optional()
475
+ .describe('A short user-facing reason for this call. HARD BUDGET: 50 characters. ' +
476
+ 'Surfaced live in interactive UIs as the progress label. Write it for ' +
477
+ 'a human watching, in present-continuous form ("Logging in", "Filling ' +
478
+ 'the search form", "Checking the time", "Closing the cookie banner"). ' +
479
+ 'If your first draft is longer than 50 chars, REWORD IT to fit — ' +
480
+ 'compress to the essence; do NOT just chop. Bad: "Read page title and ' +
481
+ 'body text to determine why snapshot is empty" (64). Good: "Diagnosing ' +
482
+ 'empty snapshot" (24). Bad: "Filling out a very detailed multi-field ' +
483
+ 'signup form" (51). Good: "Filling the signup form" (23). Never use ' +
484
+ 'jargon, raw method names ("evaluate", "click"), JS, full URLs, or ' +
485
+ 'credentials. Include exactly one per `browserless_agent` call, even ' +
486
+ 'when batching commands.'),
487
+ });
@@ -0,0 +1,67 @@
1
+ import { FastMCP } from 'fastmcp';
2
+ import { z } from 'zod';
3
+ import { AnalyticsHelper } from '../lib/analytics.js';
4
+ import type { McpConfig } from '../@types/types.js';
5
+ export declare const SearchSourceSchema: z.ZodEnum<{
6
+ web: "web";
7
+ news: "news";
8
+ images: "images";
9
+ }>;
10
+ export declare const SearchCategorySchema: z.ZodEnum<{
11
+ pdf: "pdf";
12
+ github: "github";
13
+ research: "research";
14
+ }>;
15
+ export declare const TimeBasedOptionsSchema: z.ZodEnum<{
16
+ day: "day";
17
+ week: "week";
18
+ month: "month";
19
+ year: "year";
20
+ }>;
21
+ export declare const SearchScrapeOptionsSchema: z.ZodObject<{
22
+ formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
23
+ screenshot: "screenshot";
24
+ markdown: "markdown";
25
+ links: "links";
26
+ html: "html";
27
+ }>>>;
28
+ onlyMainContent: z.ZodOptional<z.ZodBoolean>;
29
+ includeTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
+ excludeTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ }, z.core.$strip>;
32
+ export declare const SearchParamsSchema: z.ZodObject<{
33
+ query: z.ZodString;
34
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
+ lang: z.ZodDefault<z.ZodOptional<z.ZodString>>;
36
+ country: z.ZodOptional<z.ZodString>;
37
+ location: z.ZodOptional<z.ZodString>;
38
+ tbs: z.ZodOptional<z.ZodEnum<{
39
+ day: "day";
40
+ week: "week";
41
+ month: "month";
42
+ year: "year";
43
+ }>>;
44
+ sources: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
45
+ web: "web";
46
+ news: "news";
47
+ images: "images";
48
+ }>>>>;
49
+ categories: z.ZodOptional<z.ZodArray<z.ZodEnum<{
50
+ pdf: "pdf";
51
+ github: "github";
52
+ research: "research";
53
+ }>>>;
54
+ scrapeOptions: z.ZodOptional<z.ZodObject<{
55
+ formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
56
+ screenshot: "screenshot";
57
+ markdown: "markdown";
58
+ links: "links";
59
+ html: "html";
60
+ }>>>;
61
+ onlyMainContent: z.ZodOptional<z.ZodBoolean>;
62
+ includeTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
63
+ excludeTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
64
+ }, z.core.$strip>>;
65
+ timeout: z.ZodOptional<z.ZodNumber>;
66
+ }, z.core.$strip>;
67
+ export declare function registerSearchTool(server: FastMCP, config: McpConfig, analytics?: AnalyticsHelper): void;