tideways-mcp-server 0.1.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 (83) hide show
  1. package/README.md +447 -0
  2. package/bin/cli.js +156 -0
  3. package/dist/config/index.d.ts +6 -0
  4. package/dist/config/index.d.ts.map +1 -0
  5. package/dist/config/index.js +55 -0
  6. package/dist/config/index.js.map +1 -0
  7. package/dist/index.d.ts +3 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +18 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/lib/errors.d.ts +22 -0
  12. package/dist/lib/errors.d.ts.map +1 -0
  13. package/dist/lib/errors.js +97 -0
  14. package/dist/lib/errors.js.map +1 -0
  15. package/dist/lib/logger.d.ts +12 -0
  16. package/dist/lib/logger.d.ts.map +1 -0
  17. package/dist/lib/logger.js +54 -0
  18. package/dist/lib/logger.js.map +1 -0
  19. package/dist/lib/tideways-client.d.ts +36 -0
  20. package/dist/lib/tideways-client.d.ts.map +1 -0
  21. package/dist/lib/tideways-client.js +203 -0
  22. package/dist/lib/tideways-client.js.map +1 -0
  23. package/dist/server.d.ts +10 -0
  24. package/dist/server.d.ts.map +1 -0
  25. package/dist/server.js +94 -0
  26. package/dist/server.js.map +1 -0
  27. package/dist/tools/definitions.d.ts +6 -0
  28. package/dist/tools/definitions.d.ts.map +1 -0
  29. package/dist/tools/definitions.js +158 -0
  30. package/dist/tools/definitions.js.map +1 -0
  31. package/dist/tools/handlers/historical-handler.d.ts +4 -0
  32. package/dist/tools/handlers/historical-handler.d.ts.map +1 -0
  33. package/dist/tools/handlers/historical-handler.js +12 -0
  34. package/dist/tools/handlers/historical-handler.js.map +1 -0
  35. package/dist/tools/handlers/issues-handler.d.ts +4 -0
  36. package/dist/tools/handlers/issues-handler.d.ts.map +1 -0
  37. package/dist/tools/handlers/issues-handler.js +11 -0
  38. package/dist/tools/handlers/issues-handler.js.map +1 -0
  39. package/dist/tools/handlers/performance-handler.d.ts +4 -0
  40. package/dist/tools/handlers/performance-handler.d.ts.map +1 -0
  41. package/dist/tools/handlers/performance-handler.js +11 -0
  42. package/dist/tools/handlers/performance-handler.js.map +1 -0
  43. package/dist/tools/handlers/performance-summary-handler.d.ts +4 -0
  44. package/dist/tools/handlers/performance-summary-handler.d.ts.map +1 -0
  45. package/dist/tools/handlers/performance-summary-handler.js +11 -0
  46. package/dist/tools/handlers/performance-summary-handler.js.map +1 -0
  47. package/dist/tools/handlers/traces-handler.d.ts +4 -0
  48. package/dist/tools/handlers/traces-handler.d.ts.map +1 -0
  49. package/dist/tools/handlers/traces-handler.js +30 -0
  50. package/dist/tools/handlers/traces-handler.js.map +1 -0
  51. package/dist/tools/registry.d.ts +3 -0
  52. package/dist/tools/registry.d.ts.map +1 -0
  53. package/dist/tools/registry.js +20 -0
  54. package/dist/tools/registry.js.map +1 -0
  55. package/dist/types/error.d.ts +7 -0
  56. package/dist/types/error.d.ts.map +1 -0
  57. package/dist/types/error.js +2 -0
  58. package/dist/types/error.js.map +1 -0
  59. package/dist/types/index.d.ts +6 -0
  60. package/dist/types/index.d.ts.map +1 -0
  61. package/dist/types/index.js +6 -0
  62. package/dist/types/index.js.map +1 -0
  63. package/dist/types/logging.d.ts +11 -0
  64. package/dist/types/logging.d.ts.map +1 -0
  65. package/dist/types/logging.js +2 -0
  66. package/dist/types/logging.js.map +1 -0
  67. package/dist/types/mcp.d.ts +32 -0
  68. package/dist/types/mcp.d.ts.map +1 -0
  69. package/dist/types/mcp.js +2 -0
  70. package/dist/types/mcp.js.map +1 -0
  71. package/dist/types/tideways-api.d.ts +151 -0
  72. package/dist/types/tideways-api.d.ts.map +1 -0
  73. package/dist/types/tideways-api.js +2 -0
  74. package/dist/types/tideways-api.js.map +1 -0
  75. package/dist/types/tideways-config.d.ts +15 -0
  76. package/dist/types/tideways-config.d.ts.map +1 -0
  77. package/dist/types/tideways-config.js +2 -0
  78. package/dist/types/tideways-config.js.map +1 -0
  79. package/dist/utils/date-utils.d.ts +4 -0
  80. package/dist/utils/date-utils.d.ts.map +1 -0
  81. package/dist/utils/date-utils.js +16 -0
  82. package/dist/utils/date-utils.js.map +1 -0
  83. package/package.json +86 -0
@@ -0,0 +1,158 @@
1
+ export const TRACE_CONFIG = {
2
+ MAX_DATE_RANGE_DAYS: 90,
3
+ };
4
+ export function getToolDefinitions() {
5
+ return [
6
+ {
7
+ name: 'get_performance_metrics',
8
+ description: 'Retrieve aggregate performance metrics and system-wide statistics in JSON format. Use for monitoring overall application health, trends, and high-level performance overview (use get_traces for detailed individual request analysis).',
9
+ inputSchema: {
10
+ type: 'object',
11
+ properties: {
12
+ ts: {
13
+ type: 'string',
14
+ description: 'End timestamp in Y-m-d H:i format (e.g., "2025-08-12 18:30"). Specifies the end time of the last minute to include in the query.',
15
+ },
16
+ m: {
17
+ type: 'number',
18
+ description: 'Number of minutes backward from timestamp to retrieve data (e.g., 60 for 1 hour, 1440 for 24 hours).',
19
+ minimum: 1,
20
+ },
21
+ env: {
22
+ type: 'string',
23
+ description: 'Filter by specific environment (production, staging, etc.)',
24
+ },
25
+ s: {
26
+ type: 'string',
27
+ description: 'Filter by specific service name',
28
+ },
29
+ },
30
+ required: [],
31
+ },
32
+ },
33
+ {
34
+ name: 'get_performance_summary',
35
+ description: 'Retrieve time-series performance summary data in 15-minute intervals in JSON format for trend analysis and historical comparison. Returns data aggregated in 15-minute time buckets showing requests, errors, and 95th percentile response times.',
36
+ inputSchema: {
37
+ type: 'object',
38
+ properties: {
39
+ s: {
40
+ type: 'string',
41
+ description: 'Service name to filter by (e.g., "web", "api", "worker"). Default: "web"',
42
+ },
43
+ },
44
+ required: [],
45
+ },
46
+ },
47
+ {
48
+ name: 'get_issues',
49
+ description: 'Retrieve and analyze recent errors, exceptions, and performance issues in JSON format for actionable insights',
50
+ inputSchema: {
51
+ type: 'object',
52
+ properties: {
53
+ issue_type: {
54
+ type: 'string',
55
+ enum: ['error', 'slowsql', 'deprecated', 'all'],
56
+ default: 'all',
57
+ description: 'Type of issues to retrieve (fixed enum values to match API)',
58
+ },
59
+ status: {
60
+ type: 'string',
61
+ enum: ['open', 'new', 'resolved', 'not_error', 'ignored', 'all'],
62
+ default: 'open',
63
+ description: 'Issue status filter (updated to match API statuses)',
64
+ },
65
+ page: {
66
+ type: 'number',
67
+ minimum: 1,
68
+ default: 1,
69
+ description: 'Page number for pagination (replaces limit)',
70
+ },
71
+ },
72
+ required: [],
73
+ },
74
+ },
75
+ {
76
+ name: 'get_historical_data',
77
+ description: 'Retrieve historical performance data in JSON format for a specific date with configurable granularity. Analyze daily, weekly, or monthly performance trends, transaction reports, and time-series metrics.',
78
+ inputSchema: {
79
+ type: 'object',
80
+ properties: {
81
+ date: {
82
+ type: 'string',
83
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
84
+ description: 'Date in YYYY-MM-DD format for the historical data',
85
+ },
86
+ granularity: {
87
+ type: 'string',
88
+ enum: ['day', 'week', 'month'],
89
+ default: 'day',
90
+ description: 'Granularity for data aggregation. Day shows hourly breakdown, week/month show daily breakdown.',
91
+ },
92
+ },
93
+ required: ['date'],
94
+ },
95
+ },
96
+ {
97
+ name: 'get_traces',
98
+ description: 'Analyze individual trace samples in JSON format for detailed bottleneck identification and performance debugging. Use for investigating specific slow requests, not system-wide statistics (use get_performance_metrics for aggregate data).',
99
+ inputSchema: {
100
+ type: 'object',
101
+ properties: {
102
+ env: {
103
+ type: 'string',
104
+ description: 'Environment name (e.g., "production", "staging")',
105
+ },
106
+ s: {
107
+ type: 'string',
108
+ description: 'Service name (e.g., "web", "api", "worker")',
109
+ },
110
+ transaction_name: {
111
+ type: 'string',
112
+ description: 'Filter by specific transaction/endpoint name',
113
+ },
114
+ has_callgraph: {
115
+ type: 'boolean',
116
+ description: 'Only return traces with detailed callgraph data',
117
+ },
118
+ search: {
119
+ type: 'string',
120
+ description: 'Word-based search on transaction_name, host, and URL text tokens. This is no fulltext search.',
121
+ },
122
+ min_date: {
123
+ type: 'string',
124
+ description: 'Minimal date for traces in YYYY-MM-DD HH:MM format (e.g., "2024-01-15 14:30"). Convert natural language like "1 hour ago" to this format. Requires max_date.',
125
+ },
126
+ max_date: {
127
+ type: 'string',
128
+ description: 'Maximal date for traces in YYYY-MM-DD HH:MM format (e.g., "2024-01-15 16:30"). Convert natural language like "now" to this format. Requires min_date.',
129
+ },
130
+ min_response_time_ms: {
131
+ type: 'number',
132
+ minimum: 0,
133
+ description: 'Minimum response time in milliseconds for filtering slow traces',
134
+ },
135
+ max_response_time_ms: {
136
+ type: 'number',
137
+ minimum: 0,
138
+ description: 'Maximum response time in milliseconds for filtering traces',
139
+ },
140
+ sort_by: {
141
+ type: 'string',
142
+ enum: ['response_time', 'date', 'memory'],
143
+ default: 'response_time',
144
+ description: 'Field to sort traces by',
145
+ },
146
+ sort_order: {
147
+ type: 'string',
148
+ enum: ['ASC', 'DESC'],
149
+ default: 'DESC',
150
+ description: 'Sort order (DESC = slowest/newest first)',
151
+ },
152
+ },
153
+ required: [],
154
+ },
155
+ },
156
+ ];
157
+ }
158
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,mBAAmB,EAAE,EAAE;CACf,CAAC;AAEX,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL;YACE,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EACT,yOAAyO;YAC3O,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,EAAE,EAAE;wBACF,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,kIAAkI;qBAChJ;oBACD,CAAC,EAAE;wBACD,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,sGAAsG;wBACnH,OAAO,EAAE,CAAC;qBACX;oBACD,GAAG,EAAE;wBACH,IAAI,EAAE,QAAQ;wBACd,WAAW,EA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C,OAAO,EAAE,eAAe;wBACxB,WAAW,EAAE,yBAAyB;qBACvC;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;wBACrB,OAAO,EAAE,MAAM;wBACf,WAAW,EAAE,0CAA0C;qBACxD;iBACF;gBACD,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { TidewaysClient } from '../../lib/tideways-client.js';
2
+ import { GetHistoricalDataParams } from '../../types/index.js';
3
+ export declare function handleGetHistoricalData(client: TidewaysClient, params: GetHistoricalDataParams): Promise<string>;
4
+ //# sourceMappingURL=historical-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"historical-handler.d.ts","sourceRoot":"","sources":["../../../src/tools/handlers/historical-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAQjB"}
@@ -0,0 +1,12 @@
1
+ import { ErrorHandler } from '../../lib/errors.js';
2
+ export async function handleGetHistoricalData(client, params) {
3
+ try {
4
+ const { date, granularity = 'day' } = params;
5
+ const historicalData = await client.getHistoricalData(date, granularity);
6
+ return JSON.stringify(historicalData, null, 2);
7
+ }
8
+ catch (error) {
9
+ throw ErrorHandler.handleApiError(error);
10
+ }
11
+ }
12
+ //# sourceMappingURL=historical-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"historical-handler.js","sourceRoot":"","sources":["../../../src/tools/handlers/historical-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,MAAsB,EACtB,MAA+B;IAE/B,IAAI,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC7C,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACzE,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACjD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { TidewaysClient } from '../../lib/tideways-client.js';
2
+ import { GetIssuesParams } from '../../types/index.js';
3
+ export declare function handleGetIssues(client: TidewaysClient, params: GetIssuesParams): Promise<string>;
4
+ //# sourceMappingURL=issues-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues-handler.d.ts","sourceRoot":"","sources":["../../../src/tools/handlers/issues-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,wBAAsB,eAAe,CACnC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,MAAM,CAAC,CAOjB"}
@@ -0,0 +1,11 @@
1
+ import { ErrorHandler } from '../../lib/errors.js';
2
+ export async function handleGetIssues(client, params) {
3
+ try {
4
+ const issuesData = await client.getIssues(params);
5
+ return JSON.stringify(issuesData, null, 2);
6
+ }
7
+ catch (error) {
8
+ throw ErrorHandler.handleApiError(error);
9
+ }
10
+ }
11
+ //# sourceMappingURL=issues-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues-handler.js","sourceRoot":"","sources":["../../../src/tools/handlers/issues-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAsB,EACtB,MAAuB;IAEvB,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { TidewaysClient } from '../../lib/tideways-client.js';
2
+ import { GetPerformanceMetricsParams } from '../../types/index.js';
3
+ export declare function handleGetPerformanceMetrics(client: TidewaysClient, params: GetPerformanceMetricsParams): Promise<string>;
4
+ //# sourceMappingURL=performance-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance-handler.d.ts","sourceRoot":"","sources":["../../../src/tools/handlers/performance-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,MAAM,CAAC,CAOjB"}
@@ -0,0 +1,11 @@
1
+ import { ErrorHandler } from '../../lib/errors.js';
2
+ export async function handleGetPerformanceMetrics(client, params) {
3
+ try {
4
+ const performanceData = await client.getPerformanceMetrics(params);
5
+ return JSON.stringify(performanceData, null, 2);
6
+ }
7
+ catch (error) {
8
+ throw ErrorHandler.handleApiError(error);
9
+ }
10
+ }
11
+ //# sourceMappingURL=performance-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance-handler.js","sourceRoot":"","sources":["../../../src/tools/handlers/performance-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,MAAsB,EACtB,MAAmC;IAEnC,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAClD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { TidewaysClient } from '../../lib/tideways-client.js';
2
+ import { GetPerformanceSummaryParams } from '../../types/index.js';
3
+ export declare function handleGetPerformanceSummary(client: TidewaysClient, params: GetPerformanceSummaryParams): Promise<string>;
4
+ //# sourceMappingURL=performance-summary-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance-summary-handler.d.ts","sourceRoot":"","sources":["../../../src/tools/handlers/performance-summary-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,MAAM,CAAC,CAOjB"}
@@ -0,0 +1,11 @@
1
+ import { ErrorHandler } from '../../lib/errors.js';
2
+ export async function handleGetPerformanceSummary(client, params) {
3
+ try {
4
+ const summaryData = await client.getPerformanceSummary(params);
5
+ return JSON.stringify(summaryData, null, 2);
6
+ }
7
+ catch (error) {
8
+ throw ErrorHandler.handleApiError(error);
9
+ }
10
+ }
11
+ //# sourceMappingURL=performance-summary-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance-summary-handler.js","sourceRoot":"","sources":["../../../src/tools/handlers/performance-summary-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,MAAsB,EACtB,MAAmC;IAEnC,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { TidewaysClient } from '../../lib/tideways-client.js';
2
+ import { GetTracesParams } from '../../types/index.js';
3
+ export declare function handleGetTraces(client: TidewaysClient, params: GetTracesParams): Promise<string>;
4
+ //# sourceMappingURL=traces-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traces-handler.d.ts","sourceRoot":"","sources":["../../../src/tools/handlers/traces-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,wBAAsB,eAAe,CACnC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,MAAM,CAAC,CA8BjB"}
@@ -0,0 +1,30 @@
1
+ import { ErrorHandler } from '../../lib/errors.js';
2
+ import { addDefaultDateRange } from '../../utils/date-utils.js';
3
+ import { TRACE_CONFIG } from '../definitions.js';
4
+ export async function handleGetTraces(client, params) {
5
+ try {
6
+ const paramsWithDefaults = addDefaultDateRange(params);
7
+ if (paramsWithDefaults.min_date && paramsWithDefaults.max_date) {
8
+ const minDate = new Date(paramsWithDefaults.min_date);
9
+ const maxDate = new Date(paramsWithDefaults.max_date);
10
+ if (minDate >= maxDate) {
11
+ throw ErrorHandler.handleValidationError('min_date must be earlier than max_date');
12
+ }
13
+ const daysDiff = (maxDate.getTime() - minDate.getTime()) / (1000 * 60 * 60 * 24);
14
+ if (daysDiff > TRACE_CONFIG.MAX_DATE_RANGE_DAYS) {
15
+ throw ErrorHandler.handleValidationError(`Date range cannot exceed ${TRACE_CONFIG.MAX_DATE_RANGE_DAYS} days`);
16
+ }
17
+ }
18
+ if (paramsWithDefaults.min_response_time_ms && paramsWithDefaults.max_response_time_ms) {
19
+ if (paramsWithDefaults.min_response_time_ms >= paramsWithDefaults.max_response_time_ms) {
20
+ throw ErrorHandler.handleValidationError('min_response_time_ms must be less than max_response_time_ms');
21
+ }
22
+ }
23
+ const tracesData = await client.getTraces(paramsWithDefaults);
24
+ return JSON.stringify(tracesData, null, 2);
25
+ }
26
+ catch (error) {
27
+ throw ErrorHandler.handleApiError(error);
28
+ }
29
+ }
30
+ //# sourceMappingURL=traces-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traces-handler.js","sourceRoot":"","sources":["../../../src/tools/handlers/traces-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAsB,EACtB,MAAuB;IAEvB,IAAI,CAAC;QACH,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAEvD,IAAI,kBAAkB,CAAC,QAAQ,IAAI,kBAAkB,CAAC,QAAQ,EAAE,CAAC;YAC/D,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YACtD,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YAEtD,IAAI,OAAO,IAAI,OAAO,EAAE,CAAC;gBACvB,MAAM,YAAY,CAAC,qBAAqB,CAAC,wCAAwC,CAAC,CAAC;YACrF,CAAC;YAED,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;YACjF,IAAI,QAAQ,GAAG,YAAY,CAAC,mBAAmB,EAAE,CAAC;gBAChD,MAAM,YAAY,CAAC,qBAAqB,CAAC,4BAA4B,YAAY,CAAC,mBAAmB,OAAO,CAAC,CAAC;YAChH,CAAC;QACH,CAAC;QAED,IAAI,kBAAkB,CAAC,oBAAoB,IAAI,kBAAkB,CAAC,oBAAoB,EAAE,CAAC;YACvF,IAAI,kBAAkB,CAAC,oBAAoB,IAAI,kBAAkB,CAAC,oBAAoB,EAAE,CAAC;gBACvF,MAAM,YAAY,CAAC,qBAAqB,CAAC,6DAA6D,CAAC,CAAC;YAC1G,CAAC;QACH,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QAE9D,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { TidewaysClient } from '../lib/tideways-client.js';
2
+ export declare function executeTool(toolName: string, params: any, client: TidewaysClient): Promise<string>;
3
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAgC3D,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,GAAG,EACX,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,MAAM,CAAC,CAQjB"}
@@ -0,0 +1,20 @@
1
+ import { handleGetPerformanceMetrics } from './handlers/performance-handler.js';
2
+ import { handleGetPerformanceSummary } from './handlers/performance-summary-handler.js';
3
+ import { handleGetIssues } from './handlers/issues-handler.js';
4
+ import { handleGetTraces } from './handlers/traces-handler.js';
5
+ import { handleGetHistoricalData } from './handlers/historical-handler.js';
6
+ const TOOL_HANDLERS = {
7
+ get_performance_metrics: (client, params) => handleGetPerformanceMetrics(client, params),
8
+ get_performance_summary: (client, params) => handleGetPerformanceSummary(client, params),
9
+ get_issues: (client, params) => handleGetIssues(client, params),
10
+ get_traces: (client, params) => handleGetTraces(client, params),
11
+ get_historical_data: (client, params) => handleGetHistoricalData(client, params),
12
+ };
13
+ export async function executeTool(toolName, params, client) {
14
+ const handler = TOOL_HANDLERS[toolName];
15
+ if (!handler) {
16
+ throw new Error(`Unknown tool: ${toolName}`);
17
+ }
18
+ return handler(client, params);
19
+ }
20
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAU3E,MAAM,aAAa,GAAgC;IACjD,uBAAuB,EAAE,CAAC,MAAsB,EAAE,MAAmC,EAAE,EAAE,CACvF,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC;IAE7C,uBAAuB,EAAE,CAAC,MAAsB,EAAE,MAAmC,EAAE,EAAE,CACvF,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC;IAE7C,UAAU,EAAE,CAAC,MAAsB,EAAE,MAAuB,EAAE,EAAE,CAC9D,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC;IAEjC,UAAU,EAAE,CAAC,MAAsB,EAAE,MAAuB,EAAE,EAAE,CAC9D,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC;IAEjC,mBAAmB,EAAE,CAAC,MAAsB,EAAE,MAA+B,EAAE,EAAE,CAC/E,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC;CAC1C,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,QAAgB,EAChB,MAAW,EACX,MAAsB;IAEtB,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;IAExC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,iBAAiB,QAAQ,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export type ErrorCategory = 'rate_limit' | 'auth' | 'network' | 'api' | 'validation' | 'unknown';
2
+ export interface TidewaysError extends Error {
3
+ category: ErrorCategory;
4
+ statusCode?: number;
5
+ retryAfter?: number;
6
+ }
7
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/types/error.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,YAAY,GAAG,SAAS,CAAC;AAEjG,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,QAAQ,EAAE,aAAa,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/types/error.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export * from './mcp.js';
2
+ export * from './tideways-api.js';
3
+ export * from './tideways-config.js';
4
+ export * from './error.js';
5
+ export * from './logging.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './mcp.js';
2
+ export * from './tideways-api.js';
3
+ export * from './tideways-config.js';
4
+ export * from './error.js';
5
+ export * from './logging.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,11 @@
1
+ export interface LogContext {
2
+ [key: string]: any;
3
+ }
4
+ export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
5
+ export interface Logger {
6
+ debug(message: string, context?: LogContext): void;
7
+ info(message: string, context?: LogContext): void;
8
+ warn(message: string, context?: LogContext): void;
9
+ error(message: string, error?: Error, context?: LogContext): void;
10
+ }
11
+ //# sourceMappingURL=logging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/types/logging.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACnD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAClD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAClD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CACnE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=logging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging.js","sourceRoot":"","sources":["../../src/types/logging.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ export interface GetPerformanceMetricsParams {
2
+ ts?: string;
3
+ m?: number;
4
+ env?: string;
5
+ s?: string;
6
+ }
7
+ export interface GetPerformanceSummaryParams {
8
+ s?: string;
9
+ }
10
+ export interface GetIssuesParams {
11
+ issue_type?: 'error' | 'slowsql' | 'deprecated' | 'all';
12
+ status?: 'open' | 'new' | 'resolved' | 'not_error' | 'ignored' | 'all';
13
+ page?: number;
14
+ }
15
+ export interface GetHistoricalDataParams {
16
+ date: string;
17
+ granularity?: 'day' | 'week' | 'month';
18
+ }
19
+ export interface GetTracesParams {
20
+ env?: string;
21
+ s?: string;
22
+ transaction_name?: string;
23
+ has_callgraph?: boolean;
24
+ search?: string;
25
+ min_date?: string;
26
+ max_date?: string;
27
+ min_response_time_ms?: number;
28
+ max_response_time_ms?: number;
29
+ sort_by?: 'response_time' | 'date' | 'memory';
30
+ sort_order?: 'ASC' | 'DESC';
31
+ }
32
+ //# sourceMappingURL=mcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/types/mcp.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,2BAA2B;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,2BAA2B;IAC1C,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,YAAY,GAAG,KAAK,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,KAAK,CAAC;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC9C,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=mcp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/types/mcp.ts"],"names":[],"mappings":""}
@@ -0,0 +1,151 @@
1
+ export interface TidewaysPerformanceData {
2
+ timestamp: string;
3
+ summary: {
4
+ total_requests: number;
5
+ error_rate_percent: number;
6
+ response_time_average: number;
7
+ response_time_p95: number;
8
+ };
9
+ transactions: Array<{
10
+ name: string;
11
+ requests: number;
12
+ response_time_average: number;
13
+ error_rate: number;
14
+ }>;
15
+ downstream: {
16
+ sql?: {
17
+ average: number;
18
+ };
19
+ redis?: {
20
+ average: number;
21
+ };
22
+ http?: {
23
+ average: number;
24
+ };
25
+ };
26
+ }
27
+ export interface TidewaysPerformanceSummaryData {
28
+ summary: {
29
+ by_time: Record<string, {
30
+ requests: number;
31
+ errors: number;
32
+ percentile_95p: number;
33
+ }>;
34
+ criteria: {
35
+ service: string;
36
+ environment: string;
37
+ start: string;
38
+ end: string;
39
+ };
40
+ };
41
+ }
42
+ export interface TidewaysIssue {
43
+ id: string;
44
+ exceptionType: string;
45
+ lastMessage: string;
46
+ occurrences: number;
47
+ lastOccurred: string;
48
+ source: string;
49
+ environments: string[];
50
+ transactions: string[];
51
+ status: string;
52
+ firstOccurred?: string;
53
+ context?: Record<string, any>;
54
+ lastStackTrace?: Array<{
55
+ file: string;
56
+ function?: string;
57
+ line: number;
58
+ }>;
59
+ }
60
+ export interface TidewaysIssuesResponse {
61
+ issues: TidewaysIssue[];
62
+ criteria: {
63
+ page: number;
64
+ status: string;
65
+ environment?: string;
66
+ organization: string;
67
+ application: string;
68
+ range?: {
69
+ startDate: string;
70
+ endDate: string;
71
+ minutes: number;
72
+ };
73
+ service?: string;
74
+ };
75
+ }
76
+ export interface TidewaysTrace {
77
+ id: string;
78
+ transaction_name: string;
79
+ environment: string;
80
+ date: string;
81
+ response_time_ms: number;
82
+ memory_kb?: number;
83
+ has_callgraph: boolean;
84
+ server: string;
85
+ service: string;
86
+ bottlenecks: string[];
87
+ layers: TraceLayer[];
88
+ http?: {
89
+ status_code: number;
90
+ url: string;
91
+ method: string;
92
+ };
93
+ error_type?: string;
94
+ _links: {
95
+ html_url: string;
96
+ };
97
+ }
98
+ export interface TraceLayer {
99
+ name: string;
100
+ perc: number;
101
+ latency_sum_ms: number;
102
+ count: number;
103
+ }
104
+ export interface TidewaysTracesResponse {
105
+ traces: TidewaysTrace[];
106
+ }
107
+ export interface TidewaysHistoryResponse {
108
+ _links: {
109
+ self: {
110
+ href: string;
111
+ };
112
+ next?: {
113
+ href: string;
114
+ };
115
+ previous?: {
116
+ href: string;
117
+ };
118
+ chart: Array<{
119
+ href: string;
120
+ type: 'image/svg+xml' | 'image/png';
121
+ }>;
122
+ };
123
+ date_range: {
124
+ start: string;
125
+ end: string;
126
+ granularity: 'day' | 'week' | 'month';
127
+ };
128
+ report: {
129
+ response_time_p95: number;
130
+ total_requests: number;
131
+ error_rate_percent: number;
132
+ };
133
+ history: {
134
+ by_time: Record<string, {
135
+ requests: number;
136
+ errors: number;
137
+ percentile_95p: number;
138
+ }>;
139
+ };
140
+ transaction_report: HistoryTransactionReport[];
141
+ }
142
+ export interface HistoryTransactionReport {
143
+ name: string;
144
+ response_time_p95: number;
145
+ response_time_worst: number;
146
+ response_time_average: number;
147
+ total_requests: number;
148
+ memory_max: number;
149
+ impact_percent: number;
150
+ }
151
+ //# sourceMappingURL=tideways-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tideways-api.d.ts","sourceRoot":"","sources":["../../src/types/tideways-api.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,cAAc,EAAE,MAAM,CAAC;QACvB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,iBA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