@recapt/mcp 0.0.18-beta → 0.0.20-beta

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 (98) hide show
  1. package/dist/cli/index.d.ts +0 -11
  2. package/dist/cli/index.js +1059 -21
  3. package/dist/index.d.ts +0 -18
  4. package/dist/index.js +3205 -247
  5. package/dist/tools/catalog/anthropicToolCatalog.json +1306 -0
  6. package/dist/tools/catalog/toolCatalog.json +4078 -382
  7. package/package.json +10 -3
  8. package/skills/self-improvement.md +388 -222
  9. package/templates/self-improvement-full.md +91 -0
  10. package/templates/{self-improvement.md → self-improvement-lite.md} +13 -9
  11. package/dist/api/client.d.ts +0 -14
  12. package/dist/api/client.js +0 -67
  13. package/dist/cli/commands/setup-self-improvement-gh.d.ts +0 -7
  14. package/dist/cli/commands/setup-self-improvement-gh.js +0 -310
  15. package/dist/cli/commands/setup.d.ts +0 -7
  16. package/dist/cli/commands/setup.js +0 -173
  17. package/dist/cli/commands/skill.d.ts +0 -24
  18. package/dist/cli/commands/skill.js +0 -264
  19. package/dist/cli/utils/ide-config.d.ts +0 -31
  20. package/dist/cli/utils/ide-config.js +0 -294
  21. package/dist/cli/utils/prompts.d.ts +0 -22
  22. package/dist/cli/utils/prompts.js +0 -71
  23. package/dist/tools/analyzeFlow.d.ts +0 -7
  24. package/dist/tools/analyzeFlow.js +0 -68
  25. package/dist/tools/analyzeFunnel.d.ts +0 -7
  26. package/dist/tools/analyzeFunnel.js +0 -63
  27. package/dist/tools/catalog/callTool.d.ts +0 -22
  28. package/dist/tools/catalog/callTool.js +0 -92
  29. package/dist/tools/catalog/index.d.ts +0 -11
  30. package/dist/tools/catalog/index.js +0 -11
  31. package/dist/tools/catalog/searchTools.d.ts +0 -22
  32. package/dist/tools/catalog/searchTools.js +0 -194
  33. package/dist/tools/compareCohorts.d.ts +0 -6
  34. package/dist/tools/compareCohorts.js +0 -84
  35. package/dist/tools/comparePeriods.d.ts +0 -6
  36. package/dist/tools/comparePeriods.js +0 -54
  37. package/dist/tools/detectDrift.d.ts +0 -6
  38. package/dist/tools/detectDrift.js +0 -55
  39. package/dist/tools/detectRegressions.d.ts +0 -6
  40. package/dist/tools/detectRegressions.js +0 -63
  41. package/dist/tools/diagnostic.d.ts +0 -6
  42. package/dist/tools/diagnostic.js +0 -109
  43. package/dist/tools/discoverPersonas.d.ts +0 -6
  44. package/dist/tools/discoverPersonas.js +0 -50
  45. package/dist/tools/getActionableIssues.d.ts +0 -7
  46. package/dist/tools/getActionableIssues.js +0 -55
  47. package/dist/tools/getAnomalies.d.ts +0 -6
  48. package/dist/tools/getAnomalies.js +0 -53
  49. package/dist/tools/getConsoleErrors.d.ts +0 -6
  50. package/dist/tools/getConsoleErrors.js +0 -61
  51. package/dist/tools/getDeadClicks.d.ts +0 -6
  52. package/dist/tools/getDeadClicks.js +0 -42
  53. package/dist/tools/getDomains.d.ts +0 -6
  54. package/dist/tools/getDomains.js +0 -34
  55. package/dist/tools/getElementFriction.d.ts +0 -6
  56. package/dist/tools/getElementFriction.js +0 -45
  57. package/dist/tools/getFlowFriction.d.ts +0 -7
  58. package/dist/tools/getFlowFriction.js +0 -57
  59. package/dist/tools/getFormFriction.d.ts +0 -6
  60. package/dist/tools/getFormFriction.js +0 -42
  61. package/dist/tools/getIssues.d.ts +0 -6
  62. package/dist/tools/getIssues.js +0 -82
  63. package/dist/tools/getJourneyPatterns.d.ts +0 -7
  64. package/dist/tools/getJourneyPatterns.js +0 -50
  65. package/dist/tools/getPageMetrics.d.ts +0 -6
  66. package/dist/tools/getPageMetrics.js +0 -47
  67. package/dist/tools/getPageTrends.d.ts +0 -6
  68. package/dist/tools/getPageTrends.js +0 -46
  69. package/dist/tools/getSessionDetails.d.ts +0 -6
  70. package/dist/tools/getSessionDetails.js +0 -70
  71. package/dist/tools/getSessionPages.d.ts +0 -7
  72. package/dist/tools/getSessionPages.js +0 -74
  73. package/dist/tools/getUxHealthReport.d.ts +0 -7
  74. package/dist/tools/getUxHealthReport.js +0 -50
  75. package/dist/tools/improvementRun.d.ts +0 -6
  76. package/dist/tools/improvementRun.js +0 -315
  77. package/dist/tools/knowledge.d.ts +0 -6
  78. package/dist/tools/knowledge.js +0 -186
  79. package/dist/tools/listPages.d.ts +0 -6
  80. package/dist/tools/listPages.js +0 -50
  81. package/dist/tools/listSessions.d.ts +0 -7
  82. package/dist/tools/listSessions.js +0 -67
  83. package/dist/tools/memory.d.ts +0 -7
  84. package/dist/tools/memory.js +0 -119
  85. package/dist/tools/predictOutcomes.d.ts +0 -6
  86. package/dist/tools/predictOutcomes.js +0 -66
  87. package/dist/tools/remediation.d.ts +0 -6
  88. package/dist/tools/remediation.js +0 -223
  89. package/dist/tools/scanSite.d.ts +0 -6
  90. package/dist/tools/scanSite.js +0 -51
  91. package/dist/tools/searchSessions.d.ts +0 -6
  92. package/dist/tools/searchSessions.js +0 -51
  93. package/dist/tools/triage.d.ts +0 -6
  94. package/dist/tools/triage.js +0 -114
  95. package/dist/tools/triageSessions.d.ts +0 -8
  96. package/dist/tools/triageSessions.js +0 -197
  97. package/dist/tools/upgradeOptions.d.ts +0 -7
  98. package/dist/tools/upgradeOptions.js +0 -67
@@ -0,0 +1,1306 @@
1
+ [
2
+ {
3
+ "name": "get_page_metrics",
4
+ "description": "Get aggregated behavioral metrics for a page. Returns frustration, confusion, confidence, energy scores, and health score. If page_path is omitted, returns metrics for all pages.",
5
+ "input_schema": {
6
+ "type": "object",
7
+ "properties": {
8
+ "page_path": {
9
+ "description": "Page path to get metrics for (e.g., /checkout). Omit to get all pages.",
10
+ "type": "string"
11
+ },
12
+ "days": {
13
+ "description": "Number of days to look back (default: 7)",
14
+ "type": "number"
15
+ }
16
+ },
17
+ "required": []
18
+ }
19
+ },
20
+ {
21
+ "name": "get_element_friction",
22
+ "description": "Get per-element friction data for a page. Shows which elements cause user frustration, with click counts and dominant frustration signals.",
23
+ "input_schema": {
24
+ "type": "object",
25
+ "properties": {
26
+ "page_path": {
27
+ "description": "Page path to analyze (e.g., /checkout)",
28
+ "type": "string"
29
+ },
30
+ "selector_filter": {
31
+ "description": "Optional: filter elements by selector substring",
32
+ "type": "string"
33
+ }
34
+ },
35
+ "required": [
36
+ "page_path"
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "name": "get_page_trends",
42
+ "description": "Get daily behavioral trends for a page. Shows how frustration, confusion, and confidence change over time.",
43
+ "input_schema": {
44
+ "type": "object",
45
+ "properties": {
46
+ "page_path": {
47
+ "description": "Page path to analyze (e.g., /checkout)",
48
+ "type": "string"
49
+ },
50
+ "days": {
51
+ "description": "Number of days to look back (default: 14)",
52
+ "type": "number"
53
+ }
54
+ },
55
+ "required": [
56
+ "page_path"
57
+ ]
58
+ }
59
+ },
60
+ {
61
+ "name": "get_dead_clicks",
62
+ "description": "Find buttons and links that users click but nothing happens (dead clicks). These are interactive elements where the click produced no visible DOM change. Use this to identify BROKEN or UNRESPONSIVE UI elements that frustrate users.",
63
+ "input_schema": {
64
+ "type": "object",
65
+ "properties": {
66
+ "page_path": {
67
+ "description": "Page path to check for dead clicks (required)",
68
+ "type": "string"
69
+ }
70
+ },
71
+ "required": [
72
+ "page_path"
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "name": "get_console_errors",
78
+ "description": "Query JavaScript console errors and warnings from user sessions. Use this when you suspect page unresponsiveness, broken buttons, or rendering issues. Returns the most common errors grouped by message, with session impact counts.",
79
+ "input_schema": {
80
+ "type": "object",
81
+ "properties": {
82
+ "page_path": {
83
+ "description": "Filter errors to a specific page path",
84
+ "type": "string"
85
+ },
86
+ "session_id": {
87
+ "description": "Filter errors to a specific session",
88
+ "type": "string"
89
+ },
90
+ "severity": {
91
+ "description": "Filter by severity: error (default), warn, or all",
92
+ "type": "string"
93
+ },
94
+ "limit": {
95
+ "description": "Max log documents to scan (default 200)",
96
+ "type": "number"
97
+ }
98
+ },
99
+ "required": []
100
+ }
101
+ },
102
+ {
103
+ "name": "get_form_friction",
104
+ "description": "Analyze which form fields cause friction on a page. Returns per-field metrics including dwell time, correction rate, and abandonment rate. Use this to identify problematic form fields in checkout, signup, or other forms.",
105
+ "input_schema": {
106
+ "type": "object",
107
+ "properties": {
108
+ "page_path": {
109
+ "description": "Page path containing the form to analyze (required)",
110
+ "type": "string"
111
+ }
112
+ },
113
+ "required": [
114
+ "page_path"
115
+ ]
116
+ }
117
+ },
118
+ {
119
+ "name": "list_pages",
120
+ "description": "List all tracked pages with basic metrics. Returns page paths sorted by session count with frustration and health grade. Use this to discover what pages are being tracked before diving into specific pages.",
121
+ "input_schema": {
122
+ "type": "object",
123
+ "properties": {
124
+ "days": {
125
+ "description": "Number of days to look back (default 7)",
126
+ "type": "number"
127
+ },
128
+ "limit": {
129
+ "description": "Maximum number of pages to return (default 50)",
130
+ "type": "number"
131
+ }
132
+ },
133
+ "required": []
134
+ }
135
+ },
136
+ {
137
+ "name": "scan_site",
138
+ "description": "One-shot site health scan. Lists all pages and computes aggregate metrics for the top-N pages (default 10) sorted by session count. Returns a ranked table with frustration and health grade per page.",
139
+ "input_schema": {
140
+ "type": "object",
141
+ "properties": {
142
+ "top_n": {
143
+ "description": "Number of top pages to analyze (default 10)",
144
+ "type": "number"
145
+ },
146
+ "offset": {
147
+ "description": "Skip first N pages for pagination (default 0)",
148
+ "type": "number"
149
+ }
150
+ },
151
+ "required": []
152
+ }
153
+ },
154
+ {
155
+ "name": "get_ux_health_report",
156
+ "description": "Get a comprehensive UX health report combining page metrics, issues, and anomalies. Returns overall health score, per-page breakdown, active issues, and frustration spikes.",
157
+ "input_schema": {
158
+ "type": "object",
159
+ "properties": {
160
+ "page_path": {
161
+ "description": "Focus on a specific page (omit for site-wide report)",
162
+ "type": "string"
163
+ },
164
+ "days": {
165
+ "description": "Number of days to analyze (default: 7)",
166
+ "type": "number"
167
+ }
168
+ },
169
+ "required": []
170
+ }
171
+ },
172
+ {
173
+ "name": "analyze_flow",
174
+ "description": "Analyze user navigation flows between pages. Returns paths with steps, behavioral metrics (frustration, confusion), success rates, and bottlenecks.",
175
+ "input_schema": {
176
+ "type": "object",
177
+ "properties": {
178
+ "start_page": {
179
+ "description": "Starting page path (e.g., /pricing)",
180
+ "type": "string"
181
+ },
182
+ "end_page": {
183
+ "description": "Ending page path (e.g., /checkout)",
184
+ "type": "string"
185
+ },
186
+ "days": {
187
+ "description": "Number of days to analyze (default: 7)",
188
+ "type": "number"
189
+ }
190
+ },
191
+ "required": []
192
+ }
193
+ },
194
+ {
195
+ "name": "analyze_funnel",
196
+ "description": "Analyze a conversion funnel through a sequence of pages. Returns per-step metrics (entered, converted, dropped, dwell time, frustration, confusion) and dropoff analysis.",
197
+ "input_schema": {
198
+ "type": "object",
199
+ "properties": {
200
+ "steps": {
201
+ "description": "Ordered page paths forming the funnel",
202
+ "type": "array",
203
+ "items": {
204
+ "type": "string"
205
+ }
206
+ },
207
+ "days": {
208
+ "description": "Number of days to analyze (default: 7)",
209
+ "type": "number"
210
+ }
211
+ },
212
+ "required": [
213
+ "steps"
214
+ ]
215
+ }
216
+ },
217
+ {
218
+ "name": "get_flow_friction",
219
+ "description": "Discover user flows with behavioral metrics. Returns navigation transitions with frustration, confusion, and health scores for each page in the flow.",
220
+ "input_schema": {
221
+ "type": "object",
222
+ "properties": {
223
+ "page_path": {
224
+ "description": "Focus on flows involving this page",
225
+ "type": "string"
226
+ },
227
+ "days": {
228
+ "description": "Number of days to analyze (default: 7)",
229
+ "type": "number"
230
+ },
231
+ "limit": {
232
+ "description": "Maximum number of flows to return (default: 10)",
233
+ "type": "number"
234
+ }
235
+ },
236
+ "required": []
237
+ }
238
+ },
239
+ {
240
+ "name": "get_journey_patterns",
241
+ "description": "Discover navigation patterns across sessions. Returns top page transitions, backtrack hotspots (pages users return to), and dropoff pages (where sessions end).",
242
+ "input_schema": {
243
+ "type": "object",
244
+ "properties": {
245
+ "page_path": {
246
+ "description": "Filter to transitions involving this page",
247
+ "type": "string"
248
+ },
249
+ "days": {
250
+ "description": "Number of days to analyze (default: 7)",
251
+ "type": "number"
252
+ }
253
+ },
254
+ "required": []
255
+ }
256
+ },
257
+ {
258
+ "name": "get_issues",
259
+ "description": "Get detected UX issues. Issues are automatically detected from session recordings and include rage clicks, dead clicks, form issues, and behavioral anomalies.",
260
+ "input_schema": {
261
+ "type": "object",
262
+ "properties": {
263
+ "page_path": {
264
+ "description": "Filter issues to a specific page path",
265
+ "type": "string"
266
+ },
267
+ "category": {
268
+ "description": "Filter by issue category",
269
+ "type": "string"
270
+ },
271
+ "severity": {
272
+ "description": "Filter by severity level",
273
+ "type": "string"
274
+ },
275
+ "status": {
276
+ "description": "Filter by status (default: active)",
277
+ "type": "string"
278
+ },
279
+ "limit": {
280
+ "description": "Maximum number of issues to return (default: 20)",
281
+ "type": "number"
282
+ }
283
+ },
284
+ "required": []
285
+ }
286
+ },
287
+ {
288
+ "name": "get_actionable_issues",
289
+ "description": "Get UX issues with element context. Returns detected issues along with the most affected elements on each page.",
290
+ "input_schema": {
291
+ "type": "object",
292
+ "properties": {
293
+ "page_path": {
294
+ "description": "Filter to a specific page path",
295
+ "type": "string"
296
+ },
297
+ "severity": {
298
+ "description": "Minimum severity level to include",
299
+ "type": "string"
300
+ },
301
+ "limit": {
302
+ "description": "Maximum number of issues to return (default: 10)",
303
+ "type": "number"
304
+ }
305
+ },
306
+ "required": []
307
+ }
308
+ },
309
+ {
310
+ "name": "get_anomalies",
311
+ "description": "Detect anomalous sessions and frustration spikes. Finds sessions that deviate from normal behavior patterns.",
312
+ "input_schema": {
313
+ "type": "object",
314
+ "properties": {
315
+ "threshold": {
316
+ "description": "Anomaly threshold (0-1, default: 0.35)",
317
+ "type": "number"
318
+ },
319
+ "days": {
320
+ "description": "Days to analyze for frustration spikes (default: 7)",
321
+ "type": "number"
322
+ },
323
+ "page_path": {
324
+ "description": "Optional: filter to a specific page",
325
+ "type": "string"
326
+ }
327
+ },
328
+ "required": []
329
+ }
330
+ },
331
+ {
332
+ "name": "detect_regressions",
333
+ "description": "Detect behavioral regressions by comparing recent data against rolling 7-day baselines. By default analyzes top 50 pages by traffic. Use sort_by='low_traffic' to check low-traffic pages that might otherwise be missed. Use offset/limit to paginate through all pages. Returns pages where frustration, confusion, or rage click rate have deviated significantly.",
334
+ "input_schema": {
335
+ "type": "object",
336
+ "properties": {
337
+ "window_hours": {
338
+ "description": "How many recent hours to compare against baseline (default 24)",
339
+ "type": "number"
340
+ },
341
+ "limit": {
342
+ "description": "Number of pages to check per request (default 50, max 100)",
343
+ "type": "number"
344
+ },
345
+ "offset": {
346
+ "description": "Skip this many pages for pagination (default 0)",
347
+ "type": "number"
348
+ },
349
+ "sort_by": {
350
+ "description": "Sort order: 'traffic' (default, high-traffic first) or 'low_traffic' (check overlooked pages)",
351
+ "type": "string"
352
+ }
353
+ },
354
+ "required": []
355
+ }
356
+ },
357
+ {
358
+ "name": "detect_drift",
359
+ "description": "Detect behavioral drift over time by analyzing how user behavior patterns change. Splits data into time windows and measures centroid shift between consecutive periods.",
360
+ "input_schema": {
361
+ "type": "object",
362
+ "properties": {
363
+ "page_path": {
364
+ "description": "Scope drift detection to a specific page",
365
+ "type": "string"
366
+ },
367
+ "days": {
368
+ "description": "Number of days to analyze (default 30)",
369
+ "type": "number"
370
+ },
371
+ "window_size": {
372
+ "description": "Size of each time window in days (default 7)",
373
+ "type": "number"
374
+ }
375
+ },
376
+ "required": []
377
+ }
378
+ },
379
+ {
380
+ "name": "compare_cohorts",
381
+ "description": "Compare two user cohorts side by side. Each cohort is defined by filter criteria: device, outcome, pattern, has_friction, has_rage_clicks, or page_path.",
382
+ "input_schema": {
383
+ "type": "object",
384
+ "properties": {
385
+ "cohort_a": {
386
+ "description": "Filters for cohort A",
387
+ "type": "object"
388
+ },
389
+ "cohort_b": {
390
+ "description": "Filters for cohort B",
391
+ "type": "object"
392
+ },
393
+ "cohort_a_label": {
394
+ "description": "Human label for cohort A",
395
+ "type": "string"
396
+ },
397
+ "cohort_b_label": {
398
+ "description": "Human label for cohort B",
399
+ "type": "string"
400
+ },
401
+ "page_path": {
402
+ "description": "Scope comparison to a specific page",
403
+ "type": "string"
404
+ },
405
+ "date_from": {
406
+ "description": "Start date (ISO format)",
407
+ "type": "string"
408
+ },
409
+ "date_to": {
410
+ "description": "End date (ISO format)",
411
+ "type": "string"
412
+ }
413
+ },
414
+ "required": [
415
+ "cohort_a",
416
+ "cohort_b"
417
+ ]
418
+ }
419
+ },
420
+ {
421
+ "name": "compare_periods",
422
+ "description": "Compare behavioral metrics between two time periods for a specific page. Returns metrics for each period and the deltas between them.",
423
+ "input_schema": {
424
+ "type": "object",
425
+ "properties": {
426
+ "page_path": {
427
+ "description": "Page path to compare",
428
+ "type": "string"
429
+ },
430
+ "period_a": {
431
+ "description": "First time period with from and to dates",
432
+ "type": "object"
433
+ },
434
+ "period_b": {
435
+ "description": "Second time period with from and to dates",
436
+ "type": "object"
437
+ }
438
+ },
439
+ "required": [
440
+ "page_path",
441
+ "period_a",
442
+ "period_b"
443
+ ]
444
+ }
445
+ },
446
+ {
447
+ "name": "discover_personas",
448
+ "description": "Discover behavioral personas - groups of users who behave similarly. Returns rich profiles with descriptions, risk factors, and recommended interventions.",
449
+ "input_schema": {
450
+ "type": "object",
451
+ "properties": {
452
+ "page_path": {
453
+ "description": "Scope persona discovery to a specific page",
454
+ "type": "string"
455
+ },
456
+ "num_personas": {
457
+ "description": "Number of personas to discover (default 4, max 8)",
458
+ "type": "number"
459
+ }
460
+ },
461
+ "required": []
462
+ }
463
+ },
464
+ {
465
+ "name": "search_sessions",
466
+ "description": "Search sessions by natural language query. Examples: frustrated users on checkout, rage clicks on pricing page, confused users who abandoned cart.",
467
+ "input_schema": {
468
+ "type": "object",
469
+ "properties": {
470
+ "query": {
471
+ "description": "Natural language search query",
472
+ "type": "string"
473
+ },
474
+ "page_path": {
475
+ "description": "Optional: filter to a specific page path",
476
+ "type": "string"
477
+ },
478
+ "limit": {
479
+ "description": "Maximum number of sessions to return (default: 10)",
480
+ "type": "number"
481
+ }
482
+ },
483
+ "required": [
484
+ "query"
485
+ ]
486
+ }
487
+ },
488
+ {
489
+ "name": "list_sessions",
490
+ "description": "List and filter recorded sessions. Returns session metadata including status, duration, device, browser, and domains.",
491
+ "input_schema": {
492
+ "type": "object",
493
+ "properties": {
494
+ "domain": {
495
+ "description": "Filter by domain name",
496
+ "type": "string"
497
+ },
498
+ "status": {
499
+ "description": "Filter by session status",
500
+ "type": "string"
501
+ },
502
+ "device": {
503
+ "description": "Filter by device type",
504
+ "type": "string"
505
+ },
506
+ "days": {
507
+ "description": "Number of days to look back (default: 7)",
508
+ "type": "number"
509
+ },
510
+ "limit": {
511
+ "description": "Maximum sessions to return (default: 20)",
512
+ "type": "number"
513
+ }
514
+ },
515
+ "required": []
516
+ }
517
+ },
518
+ {
519
+ "name": "get_session_details",
520
+ "description": "Get behavioral timeline for one or more sessions. Shows how frustration, confusion, and confidence evolved over time.",
521
+ "input_schema": {
522
+ "type": "object",
523
+ "properties": {
524
+ "session_id": {
525
+ "description": "Single session ID to get details for",
526
+ "type": "string"
527
+ },
528
+ "session_ids": {
529
+ "description": "Array of session IDs to get details for (max 20)",
530
+ "type": "array",
531
+ "items": {
532
+ "type": "string"
533
+ }
534
+ }
535
+ },
536
+ "required": []
537
+ }
538
+ },
539
+ {
540
+ "name": "predict_outcomes",
541
+ "description": "Predict session outcomes based on early behavioral signals. Returns predicted outcome (COMPLETED, STRUGGLED, BLOCKED, DISENGAGED) with confidence.",
542
+ "input_schema": {
543
+ "type": "object",
544
+ "properties": {
545
+ "session_id": {
546
+ "description": "Session ID to analyze",
547
+ "type": "string"
548
+ },
549
+ "behavioral_features": {
550
+ "description": "Behavioral features to use for prediction",
551
+ "type": "object"
552
+ }
553
+ },
554
+ "required": []
555
+ }
556
+ },
557
+ {
558
+ "name": "investigate_issue",
559
+ "description": "Deep-dive into a specific issue. Returns affected sessions, element friction data, related console errors, similar issues, and page context.",
560
+ "input_schema": {
561
+ "type": "object",
562
+ "properties": {
563
+ "issue_id": {
564
+ "description": "The ID of the issue to investigate",
565
+ "type": "string"
566
+ },
567
+ "days": {
568
+ "description": "Number of days to look back (default: 7)",
569
+ "type": "number"
570
+ }
571
+ },
572
+ "required": [
573
+ "issue_id"
574
+ ]
575
+ }
576
+ },
577
+ {
578
+ "name": "validate_issue",
579
+ "description": "Check if an issue is still actively occurring. Returns staleness info and recommendation (investigate, dismiss_stale, or monitor).",
580
+ "input_schema": {
581
+ "type": "object",
582
+ "properties": {
583
+ "issue_id": {
584
+ "description": "The ID of the issue to validate",
585
+ "type": "string"
586
+ },
587
+ "lookback_days": {
588
+ "description": "Number of days to look back (default: 3)",
589
+ "type": "number"
590
+ }
591
+ },
592
+ "required": [
593
+ "issue_id"
594
+ ]
595
+ }
596
+ },
597
+ {
598
+ "name": "dismiss_issue",
599
+ "description": "Dismiss an issue as a false positive. Creates site knowledge to prevent re-flagging.",
600
+ "input_schema": {
601
+ "type": "object",
602
+ "properties": {
603
+ "issue_id": {
604
+ "description": "The ID of the issue to dismiss",
605
+ "type": "string"
606
+ },
607
+ "reason": {
608
+ "description": "Reason for dismissal",
609
+ "type": "string"
610
+ },
611
+ "explanation": {
612
+ "description": "Detailed explanation",
613
+ "type": "string"
614
+ },
615
+ "create_knowledge": {
616
+ "description": "Whether to create site knowledge entry (default: true)",
617
+ "type": "boolean"
618
+ }
619
+ },
620
+ "required": [
621
+ "issue_id",
622
+ "reason",
623
+ "explanation"
624
+ ]
625
+ }
626
+ },
627
+ {
628
+ "name": "mark_intended_behavior",
629
+ "description": "Mark an issue as intended behavior. Creates site knowledge to prevent re-flagging.",
630
+ "input_schema": {
631
+ "type": "object",
632
+ "properties": {
633
+ "issue_id": {
634
+ "description": "The ID of the issue to mark as intended",
635
+ "type": "string"
636
+ },
637
+ "explanation": {
638
+ "description": "Explanation of why this behavior is intended",
639
+ "type": "string"
640
+ }
641
+ },
642
+ "required": [
643
+ "issue_id",
644
+ "explanation"
645
+ ]
646
+ }
647
+ },
648
+ {
649
+ "name": "get_issue_history",
650
+ "description": "Get the full history of an issue including status changes, remediation attempts, and outcomes.",
651
+ "input_schema": {
652
+ "type": "object",
653
+ "properties": {
654
+ "issue_id": {
655
+ "description": "The ID of the issue to get history for",
656
+ "type": "string"
657
+ }
658
+ },
659
+ "required": [
660
+ "issue_id"
661
+ ]
662
+ }
663
+ },
664
+ {
665
+ "name": "propose_fix",
666
+ "description": "Propose a fix for an issue. Creates a remediation record with baseline metrics for later evaluation.",
667
+ "input_schema": {
668
+ "type": "object",
669
+ "properties": {
670
+ "issue_id": {
671
+ "description": "The ID of the issue to fix",
672
+ "type": "string"
673
+ },
674
+ "diagnosis": {
675
+ "description": "Detailed analysis of the root cause",
676
+ "type": "string"
677
+ },
678
+ "proposed_fix": {
679
+ "description": "Description of the proposed fix",
680
+ "type": "string"
681
+ },
682
+ "code_snippet": {
683
+ "description": "Suggested code changes",
684
+ "type": "string"
685
+ },
686
+ "affected_files": {
687
+ "description": "List of files to modify",
688
+ "type": "array",
689
+ "items": {
690
+ "type": "string"
691
+ }
692
+ },
693
+ "confidence": {
694
+ "description": "Confidence level (0-1)",
695
+ "type": "number"
696
+ }
697
+ },
698
+ "required": [
699
+ "issue_id",
700
+ "diagnosis",
701
+ "proposed_fix",
702
+ "confidence"
703
+ ]
704
+ }
705
+ },
706
+ {
707
+ "name": "list_pending_fixes",
708
+ "description": "List all proposed fixes awaiting deployment.",
709
+ "input_schema": {
710
+ "type": "object",
711
+ "properties": {},
712
+ "required": []
713
+ }
714
+ },
715
+ {
716
+ "name": "list_remediations",
717
+ "description": "List remediation records with optional filters.",
718
+ "input_schema": {
719
+ "type": "object",
720
+ "properties": {
721
+ "status": {
722
+ "description": "Filter by remediation status",
723
+ "type": "string"
724
+ },
725
+ "issue_id": {
726
+ "description": "Filter by issue ID",
727
+ "type": "string"
728
+ },
729
+ "page_path": {
730
+ "description": "Filter by page path",
731
+ "type": "string"
732
+ },
733
+ "limit": {
734
+ "description": "Maximum number of results (default: 20)",
735
+ "type": "number"
736
+ }
737
+ },
738
+ "required": []
739
+ }
740
+ },
741
+ {
742
+ "name": "confirm_deployment",
743
+ "description": "Confirm that a proposed fix has been deployed to production. Starts the evaluation timer.",
744
+ "input_schema": {
745
+ "type": "object",
746
+ "properties": {
747
+ "remediation_id": {
748
+ "description": "The ID of the remediation to mark as deployed",
749
+ "type": "string"
750
+ }
751
+ },
752
+ "required": [
753
+ "remediation_id"
754
+ ]
755
+ }
756
+ },
757
+ {
758
+ "name": "evaluate_fix",
759
+ "description": "Evaluate if a deployed fix improved metrics. Compares post-deployment metrics to baseline.",
760
+ "input_schema": {
761
+ "type": "object",
762
+ "properties": {
763
+ "remediation_id": {
764
+ "description": "The ID of the remediation to evaluate",
765
+ "type": "string"
766
+ },
767
+ "min_hours": {
768
+ "description": "Minimum hours since deployment (default: 24)",
769
+ "type": "number"
770
+ }
771
+ },
772
+ "required": [
773
+ "remediation_id"
774
+ ]
775
+ }
776
+ },
777
+ {
778
+ "name": "get_fix_history",
779
+ "description": "Get the full remediation history for an issue. Shows all fix attempts, their outcomes, and current status.",
780
+ "input_schema": {
781
+ "type": "object",
782
+ "properties": {
783
+ "issue_id": {
784
+ "description": "The ID of the issue to get fix history for",
785
+ "type": "string"
786
+ }
787
+ },
788
+ "required": [
789
+ "issue_id"
790
+ ]
791
+ }
792
+ },
793
+ {
794
+ "name": "get_site_knowledge",
795
+ "description": "Retrieve site-specific learnings including known false positives, intended behaviors, and successful fix patterns.",
796
+ "input_schema": {
797
+ "type": "object",
798
+ "properties": {
799
+ "category": {
800
+ "description": "Filter by category: false_positive, intended_behavior, fix_pattern, or context",
801
+ "type": "string"
802
+ },
803
+ "page_path": {
804
+ "description": "Filter by page path",
805
+ "type": "string"
806
+ },
807
+ "issue_category": {
808
+ "description": "Filter by issue category: code_error, dead_click, rage_click, ux_friction, performance, form_issue, behavioral_anomaly, or structural_issue",
809
+ "type": "string"
810
+ },
811
+ "limit": {
812
+ "description": "Maximum number of entries (default: 50)",
813
+ "type": "number"
814
+ }
815
+ },
816
+ "required": []
817
+ }
818
+ },
819
+ {
820
+ "name": "add_site_knowledge",
821
+ "description": "Store a site-specific learning. Use to record false positives, intended behaviors, successful fix patterns, or important context.",
822
+ "input_schema": {
823
+ "type": "object",
824
+ "properties": {
825
+ "category": {
826
+ "description": "Category: false_positive, intended_behavior, fix_pattern, or context",
827
+ "type": "string"
828
+ },
829
+ "subject": {
830
+ "description": "Unique identifier/title",
831
+ "type": "string"
832
+ },
833
+ "content": {
834
+ "description": "Detailed description",
835
+ "type": "string"
836
+ },
837
+ "page_path": {
838
+ "description": "Associated page path",
839
+ "type": "string"
840
+ },
841
+ "element_selector": {
842
+ "description": "Associated element selector",
843
+ "type": "string"
844
+ },
845
+ "issue_category": {
846
+ "description": "Issue category: code_error, dead_click, rage_click, ux_friction, performance, form_issue, behavioral_anomaly, or structural_issue",
847
+ "type": "string"
848
+ }
849
+ },
850
+ "required": [
851
+ "category",
852
+ "subject",
853
+ "content"
854
+ ]
855
+ }
856
+ },
857
+ {
858
+ "name": "delete_site_knowledge",
859
+ "description": "Delete a site knowledge entry.",
860
+ "input_schema": {
861
+ "type": "object",
862
+ "properties": {
863
+ "knowledge_id": {
864
+ "description": "The ID of the knowledge entry to delete",
865
+ "type": "string"
866
+ }
867
+ },
868
+ "required": [
869
+ "knowledge_id"
870
+ ]
871
+ }
872
+ },
873
+ {
874
+ "name": "get_similar_fixes",
875
+ "description": "Find past fixes for similar issues. Returns successful and failed remediation attempts for issues with the same category, page, or element.",
876
+ "input_schema": {
877
+ "type": "object",
878
+ "properties": {
879
+ "issue_id": {
880
+ "description": "The ID of the issue to find similar fixes for",
881
+ "type": "string"
882
+ },
883
+ "limit": {
884
+ "description": "Maximum number of similar fixes (default: 5)",
885
+ "type": "number"
886
+ }
887
+ },
888
+ "required": [
889
+ "issue_id"
890
+ ]
891
+ }
892
+ },
893
+ {
894
+ "name": "start_improvement_run",
895
+ "description": "ONLY use during the self-improvement workflow. Register the start of a self-improvement workflow run. Call this at the beginning of an improvement session to track the run and its outcomes. Returns a run ID to use for subsequent updates. Do NOT call this tool for ad-hoc fixes or single issue investigations.",
896
+ "input_schema": {
897
+ "type": "object",
898
+ "properties": {
899
+ "trigger_type": {
900
+ "description": "What triggered this improvement run: github_actions, cron, manual, or api",
901
+ "type": "string"
902
+ },
903
+ "trigger_metadata": {
904
+ "description": "Additional metadata about the trigger (e.g., GitHub run ID, branch, actor)",
905
+ "type": "object"
906
+ },
907
+ "phases": {
908
+ "description": "Initial phases to track (e.g., diagnose, investigate, fix)",
909
+ "type": "array",
910
+ "items": {
911
+ "type": "string"
912
+ }
913
+ }
914
+ },
915
+ "required": [
916
+ "trigger_type"
917
+ ]
918
+ }
919
+ },
920
+ {
921
+ "name": "update_improvement_run",
922
+ "description": "ONLY use during the self-improvement workflow. Update an improvement run's status, phases, summary, or diagnostic data. Use to track progress through the workflow phases and record final outcomes. Do NOT call this tool outside of an active improvement run.",
923
+ "input_schema": {
924
+ "type": "object",
925
+ "properties": {
926
+ "run_id": {
927
+ "description": "The ID of the improvement run to update",
928
+ "type": "string"
929
+ },
930
+ "status": {
931
+ "description": "New status: running, completed, failed, or cancelled",
932
+ "type": "string"
933
+ },
934
+ "phases": {
935
+ "description": "Updated phases array",
936
+ "type": "array",
937
+ "items": {
938
+ "type": "string"
939
+ }
940
+ },
941
+ "summary": {
942
+ "description": "Updated summary counts (issuesFound, issuesFixed, etc.)",
943
+ "type": "object"
944
+ },
945
+ "diagnostic": {
946
+ "description": "Diagnostic data from run_full_diagnostic: healthScore (0-100), totalSessions, pagesAnalyzed, summary (1-2 sentence description)",
947
+ "type": "object"
948
+ },
949
+ "completed_at": {
950
+ "description": "ISO timestamp when the run completed",
951
+ "type": "string"
952
+ },
953
+ "duration_ms": {
954
+ "description": "Total duration of the run in milliseconds",
955
+ "type": "number"
956
+ }
957
+ },
958
+ "required": [
959
+ "run_id"
960
+ ]
961
+ }
962
+ },
963
+ {
964
+ "name": "record_improvement_action",
965
+ "description": "ONLY use during the self-improvement workflow. Record an action taken during an improvement run. Use to track what was done for each issue: code fixes, deferrals, dismissals, etc. This creates a detailed audit trail visible in the UI. Do NOT call this tool for ad-hoc fixes or single issue investigations.",
966
+ "input_schema": {
967
+ "type": "object",
968
+ "properties": {
969
+ "run_id": {
970
+ "description": "The ID of the improvement run",
971
+ "type": "string"
972
+ },
973
+ "issue_id": {
974
+ "description": "The ID of the issue this action relates to",
975
+ "type": "string"
976
+ },
977
+ "action_type": {
978
+ "description": "Type of action: code_fix, needs_more_data, dismissed, marked_intended, knowledge_added",
979
+ "type": "string"
980
+ },
981
+ "hypothesis": {
982
+ "description": "AI's reasoning for this action",
983
+ "type": "string"
984
+ },
985
+ "expected_improvement": {
986
+ "description": "What improvement is expected from this action",
987
+ "type": "string"
988
+ },
989
+ "code_changes": {
990
+ "description": "Code changes made (for code_fix actions). Each item: { file: string, startLine: number, linesAdded: number, linesRemoved: number, diff: string }. CRITICAL: The diff field MUST contain actual unified diff format (like git diff output) with @@ hunk headers, - for removed lines, + for added lines. NOT a description of what changed.",
991
+ "type": "array",
992
+ "items": {
993
+ "type": "string"
994
+ }
995
+ },
996
+ "deferral_reason": {
997
+ "description": "Why the issue was deferred (required for needs_more_data actions)",
998
+ "type": "string"
999
+ },
1000
+ "dismissal_reason": {
1001
+ "description": "Why the issue was dismissed (required for dismissed/marked_intended actions)",
1002
+ "type": "string"
1003
+ },
1004
+ "pr_url": {
1005
+ "description": "GitHub PR URL if a PR was created",
1006
+ "type": "string"
1007
+ },
1008
+ "pr_number": {
1009
+ "description": "GitHub PR number",
1010
+ "type": "number"
1011
+ },
1012
+ "remediation_id": {
1013
+ "description": "ID of the associated remediation record (if any)",
1014
+ "type": "string"
1015
+ }
1016
+ },
1017
+ "required": [
1018
+ "run_id",
1019
+ "action_type",
1020
+ "hypothesis",
1021
+ "expected_improvement"
1022
+ ]
1023
+ }
1024
+ },
1025
+ {
1026
+ "name": "update_improvement_action",
1027
+ "description": "Update an existing improvement run action with PR information. Use this after a PR has been created to link it to the action. This is especially useful in GitHub Actions workflows where the PR is created after the action is recorded.",
1028
+ "input_schema": {
1029
+ "type": "object",
1030
+ "properties": {
1031
+ "run_id": {
1032
+ "description": "The ID of the improvement run",
1033
+ "type": "string"
1034
+ },
1035
+ "action_id": {
1036
+ "description": "The ID of the action to update",
1037
+ "type": "string"
1038
+ },
1039
+ "pr_url": {
1040
+ "description": "GitHub PR URL to link to this action",
1041
+ "type": "string"
1042
+ },
1043
+ "pr_number": {
1044
+ "description": "GitHub PR number to link to this action",
1045
+ "type": "number"
1046
+ }
1047
+ },
1048
+ "required": [
1049
+ "run_id",
1050
+ "action_id"
1051
+ ]
1052
+ }
1053
+ },
1054
+ {
1055
+ "name": "get_improvement_run",
1056
+ "description": "Get details of a specific improvement run including all actions taken. Use to review what happened during a run. Can be called anytime to inspect past runs.",
1057
+ "input_schema": {
1058
+ "type": "object",
1059
+ "properties": {
1060
+ "run_id": {
1061
+ "description": "The ID of the improvement run to retrieve",
1062
+ "type": "string"
1063
+ }
1064
+ },
1065
+ "required": [
1066
+ "run_id"
1067
+ ]
1068
+ }
1069
+ },
1070
+ {
1071
+ "name": "list_improvement_runs",
1072
+ "description": "List recent improvement runs with optional filters. Use to review past runs and their outcomes. Can be called anytime to inspect run history.",
1073
+ "input_schema": {
1074
+ "type": "object",
1075
+ "properties": {
1076
+ "status": {
1077
+ "description": "Filter by run status: running, completed, failed, cancelled",
1078
+ "type": "string"
1079
+ },
1080
+ "trigger_type": {
1081
+ "description": "Filter by trigger type: github_actions, cron, manual, api",
1082
+ "type": "string"
1083
+ },
1084
+ "limit": {
1085
+ "description": "Maximum number of results (default: 20)",
1086
+ "type": "number"
1087
+ },
1088
+ "offset": {
1089
+ "description": "Offset for pagination",
1090
+ "type": "number"
1091
+ }
1092
+ },
1093
+ "required": []
1094
+ }
1095
+ },
1096
+ {
1097
+ "name": "create_proposal",
1098
+ "description": "Create a fix proposal for audit mode. Proposals are suggestions that developers review and implement manually. Use this in audit mode instead of propose_fix when you cannot make code changes directly. Before creating, check list_proposals to avoid duplicates.",
1099
+ "input_schema": {
1100
+ "type": "object",
1101
+ "properties": {
1102
+ "issue_id": {
1103
+ "description": "The ID of the related issue (if any)",
1104
+ "type": "string"
1105
+ },
1106
+ "improvement_run_id": {
1107
+ "description": "The ID of the improvement run creating this proposal",
1108
+ "type": "string"
1109
+ },
1110
+ "title": {
1111
+ "description": "Short title describing the proposed fix",
1112
+ "type": "string"
1113
+ },
1114
+ "diagnosis": {
1115
+ "description": "Detailed analysis of the root cause of the issue",
1116
+ "type": "string"
1117
+ },
1118
+ "proposed_fix": {
1119
+ "description": "Description of the proposed fix and how it addresses the root cause",
1120
+ "type": "string"
1121
+ },
1122
+ "affected_files": {
1123
+ "description": "List of files that likely need to be modified",
1124
+ "type": "array",
1125
+ "items": {
1126
+ "type": "string"
1127
+ }
1128
+ },
1129
+ "confidence": {
1130
+ "description": "Confidence level in the fix (0-1)",
1131
+ "type": "number"
1132
+ },
1133
+ "page_path": {
1134
+ "description": "The page path where the issue occurs",
1135
+ "type": "string"
1136
+ },
1137
+ "element_selector": {
1138
+ "description": "CSS selector of the affected element (if applicable)",
1139
+ "type": "string"
1140
+ },
1141
+ "category": {
1142
+ "description": "Category of the issue: code_error, dead_click, rage_click, ux_friction, performance, form_issue, behavioral_anomaly, or structural_issue",
1143
+ "type": "string"
1144
+ },
1145
+ "severity": {
1146
+ "description": "Severity of the issue: critical, high, medium, low, or info",
1147
+ "type": "string"
1148
+ }
1149
+ },
1150
+ "required": [
1151
+ "title",
1152
+ "diagnosis",
1153
+ "proposed_fix",
1154
+ "confidence",
1155
+ "page_path",
1156
+ "category",
1157
+ "severity"
1158
+ ]
1159
+ }
1160
+ },
1161
+ {
1162
+ "name": "list_proposals",
1163
+ "description": "List proposals with optional filters. Use to check for existing proposals before creating new ones, review pending proposals, or filter by page/category/severity.",
1164
+ "input_schema": {
1165
+ "type": "object",
1166
+ "properties": {
1167
+ "status": {
1168
+ "description": "Filter by single status: pending, resolved, dismissed, evaluating, succeeded, or failed",
1169
+ "type": "string"
1170
+ },
1171
+ "statuses": {
1172
+ "description": "Filter by multiple statuses",
1173
+ "type": "array",
1174
+ "items": {
1175
+ "type": "string"
1176
+ }
1177
+ },
1178
+ "issue_id": {
1179
+ "description": "Filter by related issue ID",
1180
+ "type": "string"
1181
+ },
1182
+ "page_path": {
1183
+ "description": "Filter by page path",
1184
+ "type": "string"
1185
+ },
1186
+ "category": {
1187
+ "description": "Filter by issue category",
1188
+ "type": "string"
1189
+ },
1190
+ "severity": {
1191
+ "description": "Filter by issue severity",
1192
+ "type": "string"
1193
+ },
1194
+ "limit": {
1195
+ "description": "Maximum number of results (default: 20)",
1196
+ "type": "number"
1197
+ }
1198
+ },
1199
+ "required": []
1200
+ }
1201
+ },
1202
+ {
1203
+ "name": "get_proposal",
1204
+ "description": "Get details of a specific proposal by ID. Use to review the full diagnosis and proposed fix before implementing.",
1205
+ "input_schema": {
1206
+ "type": "object",
1207
+ "properties": {
1208
+ "proposal_id": {
1209
+ "description": "The ID of the proposal to retrieve",
1210
+ "type": "string"
1211
+ }
1212
+ },
1213
+ "required": [
1214
+ "proposal_id"
1215
+ ]
1216
+ }
1217
+ },
1218
+ {
1219
+ "name": "resolve_proposal",
1220
+ "description": "Mark a proposal as resolved after implementing the fix. This captures baseline metrics for later evaluation. Call this after you have implemented the proposed fix in code.",
1221
+ "input_schema": {
1222
+ "type": "object",
1223
+ "properties": {
1224
+ "proposal_id": {
1225
+ "description": "The ID of the proposal to mark as resolved",
1226
+ "type": "string"
1227
+ },
1228
+ "member_id": {
1229
+ "description": "The ID of the member who resolved it (optional)",
1230
+ "type": "string"
1231
+ }
1232
+ },
1233
+ "required": [
1234
+ "proposal_id"
1235
+ ]
1236
+ }
1237
+ },
1238
+ {
1239
+ "name": "dismiss_proposal",
1240
+ "description": "Dismiss a proposal that won't be implemented. Use when the proposal is not applicable, the issue is intended behavior, or a different approach is preferred.",
1241
+ "input_schema": {
1242
+ "type": "object",
1243
+ "properties": {
1244
+ "proposal_id": {
1245
+ "description": "The ID of the proposal to dismiss",
1246
+ "type": "string"
1247
+ },
1248
+ "reason": {
1249
+ "description": "Explanation of why the proposal is being dismissed",
1250
+ "type": "string"
1251
+ },
1252
+ "member_id": {
1253
+ "description": "The ID of the member who dismissed it (optional)",
1254
+ "type": "string"
1255
+ }
1256
+ },
1257
+ "required": [
1258
+ "proposal_id",
1259
+ "reason"
1260
+ ]
1261
+ }
1262
+ },
1263
+ {
1264
+ "name": "evaluate_proposal",
1265
+ "description": "Evaluate if a resolved proposal improved metrics. Compares post-resolution metrics to baseline. Returns success/partial/failed outcome with detailed verdict. Wait at least 24 hours after resolution for reliable results.",
1266
+ "input_schema": {
1267
+ "type": "object",
1268
+ "properties": {
1269
+ "proposal_id": {
1270
+ "description": "The ID of the proposal to evaluate",
1271
+ "type": "string"
1272
+ },
1273
+ "min_hours": {
1274
+ "description": "Minimum hours since resolution required (default: 24)",
1275
+ "type": "number"
1276
+ }
1277
+ },
1278
+ "required": [
1279
+ "proposal_id"
1280
+ ]
1281
+ }
1282
+ },
1283
+ {
1284
+ "name": "list_pending_proposals",
1285
+ "description": "List all pending proposals awaiting review. Use to see what fix suggestions are available for implementation.",
1286
+ "input_schema": {
1287
+ "type": "object",
1288
+ "properties": {},
1289
+ "required": []
1290
+ }
1291
+ },
1292
+ {
1293
+ "name": "list_proposals_for_evaluation",
1294
+ "description": "List resolved proposals that are ready for evaluation (24+ hours since resolution). Use during audit runs to check outcomes of previously resolved proposals.",
1295
+ "input_schema": {
1296
+ "type": "object",
1297
+ "properties": {
1298
+ "min_hours": {
1299
+ "description": "Minimum hours since resolution (default: 24)",
1300
+ "type": "number"
1301
+ }
1302
+ },
1303
+ "required": []
1304
+ }
1305
+ }
1306
+ ]