@reaudit/mcp-server 1.0.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.
- package/LICENSE +33 -0
- package/README.md +399 -0
- package/dist/auth/oauth-client.d.ts +43 -0
- package/dist/auth/oauth-client.d.ts.map +1 -0
- package/dist/auth/oauth-client.js +340 -0
- package/dist/auth/oauth-client.js.map +1 -0
- package/dist/auth/token-store.d.ts +41 -0
- package/dist/auth/token-store.d.ts.map +1 -0
- package/dist/auth/token-store.js +176 -0
- package/dist/auth/token-store.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +480 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/api-client.d.ts +970 -0
- package/dist/lib/api-client.d.ts.map +1 -0
- package/dist/lib/api-client.js +441 -0
- package/dist/lib/api-client.js.map +1 -0
- package/dist/lib/confirmation.d.ts +92 -0
- package/dist/lib/confirmation.d.ts.map +1 -0
- package/dist/lib/confirmation.js +224 -0
- package/dist/lib/confirmation.js.map +1 -0
- package/dist/lib/error-handler.d.ts +57 -0
- package/dist/lib/error-handler.d.ts.map +1 -0
- package/dist/lib/error-handler.js +235 -0
- package/dist/lib/error-handler.js.map +1 -0
- package/dist/lib/offline-mode.d.ts +107 -0
- package/dist/lib/offline-mode.d.ts.map +1 -0
- package/dist/lib/offline-mode.js +356 -0
- package/dist/lib/offline-mode.js.map +1 -0
- package/dist/lib/progress-tracker.d.ts +87 -0
- package/dist/lib/progress-tracker.d.ts.map +1 -0
- package/dist/lib/progress-tracker.js +238 -0
- package/dist/lib/progress-tracker.js.map +1 -0
- package/dist/prompts/index.d.ts +24 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +305 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/index.d.ts +44 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +125 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/tools/account.d.ts +25 -0
- package/dist/tools/account.d.ts.map +1 -0
- package/dist/tools/account.js +69 -0
- package/dist/tools/account.js.map +1 -0
- package/dist/tools/action-grids.d.ts +414 -0
- package/dist/tools/action-grids.d.ts.map +1 -0
- package/dist/tools/action-grids.js +271 -0
- package/dist/tools/action-grids.js.map +1 -0
- package/dist/tools/analytics-query.d.ts +126 -0
- package/dist/tools/analytics-query.d.ts.map +1 -0
- package/dist/tools/analytics-query.js +106 -0
- package/dist/tools/analytics-query.js.map +1 -0
- package/dist/tools/analytics.d.ts +57 -0
- package/dist/tools/analytics.d.ts.map +1 -0
- package/dist/tools/analytics.js +122 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/audits.d.ts +123 -0
- package/dist/tools/audits.d.ts.map +1 -0
- package/dist/tools/audits.js +226 -0
- package/dist/tools/audits.js.map +1 -0
- package/dist/tools/calendar.d.ts +57 -0
- package/dist/tools/calendar.d.ts.map +1 -0
- package/dist/tools/calendar.js +109 -0
- package/dist/tools/calendar.js.map +1 -0
- package/dist/tools/content-generation.d.ts +211 -0
- package/dist/tools/content-generation.d.ts.map +1 -0
- package/dist/tools/content-generation.js +363 -0
- package/dist/tools/content-generation.js.map +1 -0
- package/dist/tools/content.d.ts +92 -0
- package/dist/tools/content.d.ts.map +1 -0
- package/dist/tools/content.js +130 -0
- package/dist/tools/content.js.map +1 -0
- package/dist/tools/indexing.d.ts +132 -0
- package/dist/tools/indexing.d.ts.map +1 -0
- package/dist/tools/indexing.js +190 -0
- package/dist/tools/indexing.js.map +1 -0
- package/dist/tools/optimization.d.ts +70 -0
- package/dist/tools/optimization.d.ts.map +1 -0
- package/dist/tools/optimization.js +106 -0
- package/dist/tools/optimization.js.map +1 -0
- package/dist/tools/projects.d.ts +67 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +113 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/prompts.d.ts +306 -0
- package/dist/tools/prompts.d.ts.map +1 -0
- package/dist/tools/prompts.js +378 -0
- package/dist/tools/prompts.js.map +1 -0
- package/dist/tools/publishing.d.ts +135 -0
- package/dist/tools/publishing.d.ts.map +1 -0
- package/dist/tools/publishing.js +209 -0
- package/dist/tools/publishing.js.map +1 -0
- package/dist/tools/reports.d.ts +252 -0
- package/dist/tools/reports.d.ts.map +1 -0
- package/dist/tools/reports.js +183 -0
- package/dist/tools/reports.js.map +1 -0
- package/dist/tools/social.d.ts +224 -0
- package/dist/tools/social.d.ts.map +1 -0
- package/dist/tools/social.js +291 -0
- package/dist/tools/social.js.map +1 -0
- package/dist/tools/sources.d.ts +221 -0
- package/dist/tools/sources.d.ts.map +1 -0
- package/dist/tools/sources.js +308 -0
- package/dist/tools/sources.js.map +1 -0
- package/dist/tools/strategy.d.ts +345 -0
- package/dist/tools/strategy.d.ts.map +1 -0
- package/dist/tools/strategy.js +392 -0
- package/dist/tools/strategy.js.map +1 -0
- package/dist/tools/usage.d.ts +101 -0
- package/dist/tools/usage.d.ts.map +1 -0
- package/dist/tools/usage.js +184 -0
- package/dist/tools/usage.js.map +1 -0
- package/dist/tools/visibility.d.ts +95 -0
- package/dist/tools/visibility.d.ts.map +1 -0
- package/dist/tools/visibility.js +163 -0
- package/dist/tools/visibility.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Publishing Tools
|
|
4
|
+
*
|
|
5
|
+
* MCP tools for publishing content to WordPress, React/webhooks, and other platforms.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.publishingTools = exports.publishToReactSchema = exports.listReactConnectionsSchema = exports.publishToWordPressSchema = exports.listWordPressConnectionsSchema = void 0;
|
|
9
|
+
exports.listWordPressConnections = listWordPressConnections;
|
|
10
|
+
exports.publishToWordPress = publishToWordPress;
|
|
11
|
+
exports.listReactConnections = listReactConnections;
|
|
12
|
+
exports.publishToReact = publishToReact;
|
|
13
|
+
const zod_1 = require("zod");
|
|
14
|
+
// ============ WordPress Schemas ============
|
|
15
|
+
exports.listWordPressConnectionsSchema = zod_1.z.object({});
|
|
16
|
+
exports.publishToWordPressSchema = zod_1.z.object({
|
|
17
|
+
contentId: zod_1.z.string().describe('The ID of the content to publish'),
|
|
18
|
+
connectionId: zod_1.z.string().describe('The WordPress connection ID to publish to'),
|
|
19
|
+
status: zod_1.z.enum(['draft', 'publish']).optional().describe('Publish status: draft (default) or publish'),
|
|
20
|
+
categories: zod_1.z.array(zod_1.z.string()).optional().describe('Category names to assign'),
|
|
21
|
+
tags: zod_1.z.array(zod_1.z.string()).optional().describe('Tag names to assign'),
|
|
22
|
+
});
|
|
23
|
+
// ============ React/Webhook Schemas ============
|
|
24
|
+
exports.listReactConnectionsSchema = zod_1.z.object({});
|
|
25
|
+
exports.publishToReactSchema = zod_1.z.object({
|
|
26
|
+
contentId: zod_1.z.string().describe('The ID of the content to publish'),
|
|
27
|
+
connectionId: zod_1.z.string().describe('The React connection ID to publish to'),
|
|
28
|
+
section: zod_1.z.string().optional().describe('Target section ID (e.g., blog, news) if the connection has multiple sections'),
|
|
29
|
+
});
|
|
30
|
+
// ============ WordPress Handlers ============
|
|
31
|
+
/**
|
|
32
|
+
* List WordPress connections tool handler
|
|
33
|
+
*/
|
|
34
|
+
async function listWordPressConnections(client, _args) {
|
|
35
|
+
const result = await client.listWordPressConnections();
|
|
36
|
+
if (result.connections.length === 0) {
|
|
37
|
+
return 'No WordPress connections found. Connect a WordPress site in the Reaudit dashboard under Settings > Integrations.';
|
|
38
|
+
}
|
|
39
|
+
let response = `## WordPress Connections (${result.connections.length})\n\n`;
|
|
40
|
+
for (const conn of result.connections) {
|
|
41
|
+
const statusIcon = conn.isVerified ? '✅' : '⚠️';
|
|
42
|
+
response += `### ${conn.siteName}\n`;
|
|
43
|
+
response += `- **ID:** ${conn.id}\n`;
|
|
44
|
+
response += `- **Site URL:** ${conn.siteUrl}\n`;
|
|
45
|
+
response += `- **Status:** ${statusIcon} ${conn.isVerified ? 'Verified' : 'Not Verified'}\n`;
|
|
46
|
+
response += `- **Stats:** ${conn.totalPublished} published, ${conn.totalDrafts} drafts\n`;
|
|
47
|
+
if (conn.lastPublishedAt) {
|
|
48
|
+
response += `- **Last Published:** ${new Date(conn.lastPublishedAt).toLocaleDateString()}\n`;
|
|
49
|
+
}
|
|
50
|
+
response += '\n';
|
|
51
|
+
}
|
|
52
|
+
return response;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Publish to WordPress tool handler
|
|
56
|
+
*/
|
|
57
|
+
async function publishToWordPress(client, args) {
|
|
58
|
+
const result = await client.publishToWordPress({
|
|
59
|
+
contentId: args.contentId,
|
|
60
|
+
connectionId: args.connectionId,
|
|
61
|
+
status: args.status || 'draft',
|
|
62
|
+
categories: args.categories,
|
|
63
|
+
tags: args.tags,
|
|
64
|
+
});
|
|
65
|
+
if (!result.success || !result.post) {
|
|
66
|
+
return `Failed to publish to WordPress: ${result.error || 'Unknown error'}`;
|
|
67
|
+
}
|
|
68
|
+
const post = result.post;
|
|
69
|
+
const statusText = post.status === 'published' ? 'Published' : 'Saved as draft';
|
|
70
|
+
let response = `## ${statusText} to WordPress!\n\n`;
|
|
71
|
+
response += `- **Title:** ${post.title}\n`;
|
|
72
|
+
response += `- **WordPress Post ID:** ${post.wordpressPostId}\n`;
|
|
73
|
+
response += `- **URL:** ${post.wordpressUrl}\n`;
|
|
74
|
+
response += `- **Status:** ${post.status}\n`;
|
|
75
|
+
if (post.publishedAt) {
|
|
76
|
+
response += `- **Published At:** ${new Date(post.publishedAt).toLocaleString()}\n`;
|
|
77
|
+
}
|
|
78
|
+
response += `\nContent successfully ${post.status === 'published' ? 'published' : 'saved'} to WordPress.`;
|
|
79
|
+
return response;
|
|
80
|
+
}
|
|
81
|
+
// ============ React/Webhook Handlers ============
|
|
82
|
+
/**
|
|
83
|
+
* List React connections tool handler
|
|
84
|
+
*/
|
|
85
|
+
async function listReactConnections(client, _args) {
|
|
86
|
+
const result = await client.listReactConnections();
|
|
87
|
+
if (result.connections.length === 0) {
|
|
88
|
+
return 'No React/webhook connections found. Set up a React connection in the Reaudit dashboard under Settings > Integrations.';
|
|
89
|
+
}
|
|
90
|
+
let response = `## React/Webhook Connections (${result.connections.length})\n\n`;
|
|
91
|
+
for (const conn of result.connections) {
|
|
92
|
+
const statusIcon = conn.isActive ? '✅' : '⚠️';
|
|
93
|
+
response += `### ${conn.siteName}\n`;
|
|
94
|
+
response += `- **ID:** ${conn.id}\n`;
|
|
95
|
+
response += `- **Site URL:** ${conn.siteUrl}\n`;
|
|
96
|
+
response += `- **Status:** ${statusIcon} ${conn.isActive ? 'Active' : 'Inactive'}\n`;
|
|
97
|
+
response += `- **Webhook:** ${conn.webhookUrl ? 'Configured' : 'Not configured'}\n`;
|
|
98
|
+
if (conn.contentSections && conn.contentSections.length > 0) {
|
|
99
|
+
response += `- **Sections:** ${conn.contentSections.map(s => s.name).join(', ')}\n`;
|
|
100
|
+
}
|
|
101
|
+
response += '\n';
|
|
102
|
+
}
|
|
103
|
+
return response;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Publish to React/webhook tool handler
|
|
107
|
+
*/
|
|
108
|
+
async function publishToReact(client, args) {
|
|
109
|
+
const result = await client.publishToReact({
|
|
110
|
+
contentId: args.contentId,
|
|
111
|
+
connectionId: args.connectionId,
|
|
112
|
+
section: args.section,
|
|
113
|
+
});
|
|
114
|
+
if (!result.success) {
|
|
115
|
+
return `❌ Failed to publish: ${result.error || 'Unknown error'}`;
|
|
116
|
+
}
|
|
117
|
+
let response = `## Published via Webhook!\n\n`;
|
|
118
|
+
response += `- **Content ID:** ${result.contentId}\n`;
|
|
119
|
+
response += `- **Slug:** ${result.slug}\n`;
|
|
120
|
+
if (result.section) {
|
|
121
|
+
response += `- **Section:** ${result.section}\n`;
|
|
122
|
+
}
|
|
123
|
+
response += `- **Webhook Sent:** ${result.webhookSent ? '✅ Yes' : '⚠️ No webhook URL configured'}\n`;
|
|
124
|
+
response += `\n✅ Content marked as published. `;
|
|
125
|
+
if (result.webhookSent) {
|
|
126
|
+
response += `Your site has been notified via webhook with a download URL to fetch the content.`;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
response += `Configure a webhook URL in your React connection to receive notifications.`;
|
|
130
|
+
}
|
|
131
|
+
return response;
|
|
132
|
+
}
|
|
133
|
+
// ============ Tool Definitions ============
|
|
134
|
+
exports.publishingTools = [
|
|
135
|
+
{
|
|
136
|
+
name: 'list_wordpress_connections',
|
|
137
|
+
description: 'List all connected WordPress sites. Use this to find the connectionId needed for publishing.',
|
|
138
|
+
inputSchema: {
|
|
139
|
+
type: 'object',
|
|
140
|
+
properties: {},
|
|
141
|
+
required: [],
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'publish_to_wordpress',
|
|
146
|
+
description: 'Publish content to a WordPress site. Includes schema markup and markdown for AI search visibility.',
|
|
147
|
+
inputSchema: {
|
|
148
|
+
type: 'object',
|
|
149
|
+
properties: {
|
|
150
|
+
contentId: {
|
|
151
|
+
type: 'string',
|
|
152
|
+
description: 'The ID of the content to publish',
|
|
153
|
+
},
|
|
154
|
+
connectionId: {
|
|
155
|
+
type: 'string',
|
|
156
|
+
description: 'The WordPress connection ID (get from list_wordpress_connections)',
|
|
157
|
+
},
|
|
158
|
+
status: {
|
|
159
|
+
type: 'string',
|
|
160
|
+
enum: ['draft', 'publish'],
|
|
161
|
+
description: 'Publish status: draft (default) or publish',
|
|
162
|
+
},
|
|
163
|
+
categories: {
|
|
164
|
+
type: 'array',
|
|
165
|
+
items: { type: 'string' },
|
|
166
|
+
description: 'Category names to assign (will be created if they don\'t exist)',
|
|
167
|
+
},
|
|
168
|
+
tags: {
|
|
169
|
+
type: 'array',
|
|
170
|
+
items: { type: 'string' },
|
|
171
|
+
description: 'Tag names to assign (will be created if they don\'t exist)',
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
required: ['contentId', 'connectionId'],
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'list_react_connections',
|
|
179
|
+
description: 'List all React/webhook connections for headless CMS publishing.',
|
|
180
|
+
inputSchema: {
|
|
181
|
+
type: 'object',
|
|
182
|
+
properties: {},
|
|
183
|
+
required: [],
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: 'publish_to_react',
|
|
188
|
+
description: 'Publish content via webhook to a React/Next.js site. Sends a notification with a download URL for the content.',
|
|
189
|
+
inputSchema: {
|
|
190
|
+
type: 'object',
|
|
191
|
+
properties: {
|
|
192
|
+
contentId: {
|
|
193
|
+
type: 'string',
|
|
194
|
+
description: 'The ID of the content to publish',
|
|
195
|
+
},
|
|
196
|
+
connectionId: {
|
|
197
|
+
type: 'string',
|
|
198
|
+
description: 'The React connection ID (get from list_react_connections)',
|
|
199
|
+
},
|
|
200
|
+
section: {
|
|
201
|
+
type: 'string',
|
|
202
|
+
description: 'Target section ID (e.g., blog, news) if the connection has multiple sections',
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
required: ['contentId', 'connectionId'],
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
];
|
|
209
|
+
//# sourceMappingURL=publishing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publishing.js","sourceRoot":"","sources":["../../src/tools/publishing.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAgCH,4DA2BC;AAKD,gDA+BC;AAOD,oDA6BC;AAKD,wCA8BC;AApKD,6BAAwB;AAGxB,8CAA8C;AAEjC,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE9C,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IACl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BACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,4DAA4D;iBAC1E;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC;SACxC;KACF;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,iEAAiE;QAC9E,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAc;SACzB;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,gHAAgH;QAC7H,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kCAAkC;iBAChD;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2DAA2D;iBACzE;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8EAA8E;iBAC5F;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC;SACxC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Saved Reports Tools
|
|
3
|
+
*
|
|
4
|
+
* MCP tools for managing saved analytics reports.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { ReauditAPIClient } from '../lib/api-client.js';
|
|
8
|
+
export declare const listReportsSchema: z.ZodObject<{
|
|
9
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
10
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
projectId?: string | undefined;
|
|
14
|
+
limit?: number | undefined;
|
|
15
|
+
pinned?: boolean | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
projectId?: string | undefined;
|
|
18
|
+
limit?: number | undefined;
|
|
19
|
+
pinned?: boolean | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const createReportSchema: z.ZodObject<{
|
|
22
|
+
projectId: z.ZodString;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
description: z.ZodOptional<z.ZodString>;
|
|
25
|
+
query: z.ZodObject<{
|
|
26
|
+
metrics: z.ZodArray<z.ZodString, "many">;
|
|
27
|
+
dimensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
28
|
+
timeGrain: z.ZodOptional<z.ZodString>;
|
|
29
|
+
days: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
filters: z.ZodOptional<z.ZodAny>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
metrics: string[];
|
|
33
|
+
days?: number | undefined;
|
|
34
|
+
dimensions?: string[] | undefined;
|
|
35
|
+
timeGrain?: string | undefined;
|
|
36
|
+
filters?: any;
|
|
37
|
+
}, {
|
|
38
|
+
metrics: string[];
|
|
39
|
+
days?: number | undefined;
|
|
40
|
+
dimensions?: string[] | undefined;
|
|
41
|
+
timeGrain?: string | undefined;
|
|
42
|
+
filters?: any;
|
|
43
|
+
}>;
|
|
44
|
+
visualization: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
type: z.ZodOptional<z.ZodEnum<["line", "bar", "pie", "table", "metric"]>>;
|
|
46
|
+
title: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
type?: "line" | "bar" | "pie" | "table" | "metric" | undefined;
|
|
49
|
+
title?: string | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
type?: "line" | "bar" | "pie" | "table" | "metric" | undefined;
|
|
52
|
+
title?: string | undefined;
|
|
53
|
+
}>>;
|
|
54
|
+
schedule: z.ZodOptional<z.ZodEnum<["daily", "weekly", "monthly"]>>;
|
|
55
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
56
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
projectId: string;
|
|
59
|
+
query: {
|
|
60
|
+
metrics: string[];
|
|
61
|
+
days?: number | undefined;
|
|
62
|
+
dimensions?: string[] | undefined;
|
|
63
|
+
timeGrain?: string | undefined;
|
|
64
|
+
filters?: any;
|
|
65
|
+
};
|
|
66
|
+
name: string;
|
|
67
|
+
pinned?: boolean | undefined;
|
|
68
|
+
description?: string | undefined;
|
|
69
|
+
tags?: string[] | undefined;
|
|
70
|
+
visualization?: {
|
|
71
|
+
type?: "line" | "bar" | "pie" | "table" | "metric" | undefined;
|
|
72
|
+
title?: string | undefined;
|
|
73
|
+
} | undefined;
|
|
74
|
+
schedule?: "weekly" | "daily" | "monthly" | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
projectId: string;
|
|
77
|
+
query: {
|
|
78
|
+
metrics: string[];
|
|
79
|
+
days?: number | undefined;
|
|
80
|
+
dimensions?: string[] | undefined;
|
|
81
|
+
timeGrain?: string | undefined;
|
|
82
|
+
filters?: any;
|
|
83
|
+
};
|
|
84
|
+
name: string;
|
|
85
|
+
pinned?: boolean | undefined;
|
|
86
|
+
description?: string | undefined;
|
|
87
|
+
tags?: string[] | undefined;
|
|
88
|
+
visualization?: {
|
|
89
|
+
type?: "line" | "bar" | "pie" | "table" | "metric" | undefined;
|
|
90
|
+
title?: string | undefined;
|
|
91
|
+
} | undefined;
|
|
92
|
+
schedule?: "weekly" | "daily" | "monthly" | undefined;
|
|
93
|
+
}>;
|
|
94
|
+
export declare const getReportSchema: z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
id: string;
|
|
98
|
+
}, {
|
|
99
|
+
id: string;
|
|
100
|
+
}>;
|
|
101
|
+
export declare const deleteReportSchema: z.ZodObject<{
|
|
102
|
+
id: z.ZodString;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
id: string;
|
|
105
|
+
}, {
|
|
106
|
+
id: string;
|
|
107
|
+
}>;
|
|
108
|
+
/**
|
|
109
|
+
* List saved reports
|
|
110
|
+
*/
|
|
111
|
+
export declare function listReports(client: ReauditAPIClient, args: z.infer<typeof listReportsSchema>): Promise<string>;
|
|
112
|
+
/**
|
|
113
|
+
* Create a saved report
|
|
114
|
+
*/
|
|
115
|
+
export declare function createReport(client: ReauditAPIClient, args: z.infer<typeof createReportSchema>): Promise<string>;
|
|
116
|
+
/**
|
|
117
|
+
* Get a saved report
|
|
118
|
+
*/
|
|
119
|
+
export declare function getReport(client: ReauditAPIClient, args: z.infer<typeof getReportSchema>): Promise<string>;
|
|
120
|
+
/**
|
|
121
|
+
* Delete a saved report
|
|
122
|
+
*/
|
|
123
|
+
export declare function deleteReport(client: ReauditAPIClient, args: z.infer<typeof deleteReportSchema>): Promise<string>;
|
|
124
|
+
/**
|
|
125
|
+
* Tool definitions for MCP
|
|
126
|
+
*/
|
|
127
|
+
export declare const reportsTools: ({
|
|
128
|
+
name: string;
|
|
129
|
+
description: string;
|
|
130
|
+
inputSchema: {
|
|
131
|
+
type: "object";
|
|
132
|
+
properties: {
|
|
133
|
+
projectId: {
|
|
134
|
+
type: string;
|
|
135
|
+
description: string;
|
|
136
|
+
};
|
|
137
|
+
pinned: {
|
|
138
|
+
type: string;
|
|
139
|
+
description: string;
|
|
140
|
+
};
|
|
141
|
+
limit: {
|
|
142
|
+
type: string;
|
|
143
|
+
description: string;
|
|
144
|
+
};
|
|
145
|
+
name?: undefined;
|
|
146
|
+
description?: undefined;
|
|
147
|
+
query?: undefined;
|
|
148
|
+
visualization?: undefined;
|
|
149
|
+
schedule?: undefined;
|
|
150
|
+
tags?: undefined;
|
|
151
|
+
id?: undefined;
|
|
152
|
+
};
|
|
153
|
+
required?: undefined;
|
|
154
|
+
};
|
|
155
|
+
} | {
|
|
156
|
+
name: string;
|
|
157
|
+
description: string;
|
|
158
|
+
inputSchema: {
|
|
159
|
+
type: "object";
|
|
160
|
+
properties: {
|
|
161
|
+
projectId: {
|
|
162
|
+
type: string;
|
|
163
|
+
description: string;
|
|
164
|
+
};
|
|
165
|
+
name: {
|
|
166
|
+
type: string;
|
|
167
|
+
description: string;
|
|
168
|
+
};
|
|
169
|
+
description: {
|
|
170
|
+
type: string;
|
|
171
|
+
description: string;
|
|
172
|
+
};
|
|
173
|
+
query: {
|
|
174
|
+
type: string;
|
|
175
|
+
properties: {
|
|
176
|
+
metrics: {
|
|
177
|
+
type: string;
|
|
178
|
+
items: {
|
|
179
|
+
type: string;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
dimensions: {
|
|
183
|
+
type: string;
|
|
184
|
+
items: {
|
|
185
|
+
type: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
timeGrain: {
|
|
189
|
+
type: string;
|
|
190
|
+
enum: string[];
|
|
191
|
+
};
|
|
192
|
+
days: {
|
|
193
|
+
type: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
required: string[];
|
|
197
|
+
};
|
|
198
|
+
visualization: {
|
|
199
|
+
type: string;
|
|
200
|
+
properties: {
|
|
201
|
+
type: {
|
|
202
|
+
type: string;
|
|
203
|
+
enum: string[];
|
|
204
|
+
};
|
|
205
|
+
title: {
|
|
206
|
+
type: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
schedule: {
|
|
211
|
+
type: string;
|
|
212
|
+
enum: string[];
|
|
213
|
+
};
|
|
214
|
+
tags: {
|
|
215
|
+
type: string;
|
|
216
|
+
items: {
|
|
217
|
+
type: string;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
pinned: {
|
|
221
|
+
type: string;
|
|
222
|
+
description?: undefined;
|
|
223
|
+
};
|
|
224
|
+
limit?: undefined;
|
|
225
|
+
id?: undefined;
|
|
226
|
+
};
|
|
227
|
+
required: string[];
|
|
228
|
+
};
|
|
229
|
+
} | {
|
|
230
|
+
name: string;
|
|
231
|
+
description: string;
|
|
232
|
+
inputSchema: {
|
|
233
|
+
type: "object";
|
|
234
|
+
properties: {
|
|
235
|
+
id: {
|
|
236
|
+
type: string;
|
|
237
|
+
description: string;
|
|
238
|
+
};
|
|
239
|
+
projectId?: undefined;
|
|
240
|
+
pinned?: undefined;
|
|
241
|
+
limit?: undefined;
|
|
242
|
+
name?: undefined;
|
|
243
|
+
description?: undefined;
|
|
244
|
+
query?: undefined;
|
|
245
|
+
visualization?: undefined;
|
|
246
|
+
schedule?: undefined;
|
|
247
|
+
tags?: undefined;
|
|
248
|
+
};
|
|
249
|
+
required: string[];
|
|
250
|
+
};
|
|
251
|
+
})[];
|
|
252
|
+
//# sourceMappingURL=reports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.d.ts","sourceRoot":"","sources":["../../src/tools/reports.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAI5B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB7B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;EAAqD,CAAC;AAClF,eAAO,MAAM,kBAAkB;;;;;;EAAqD,CAAC;AAErF;;GAEG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,GACtC,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GACvC,OAAO,CAAC,MAAM,CAAC,CAajB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GACpC,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GACvC,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoExB,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Saved Reports Tools
|
|
4
|
+
*
|
|
5
|
+
* MCP tools for managing saved analytics reports.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.reportsTools = exports.deleteReportSchema = exports.getReportSchema = exports.createReportSchema = exports.listReportsSchema = void 0;
|
|
9
|
+
exports.listReports = listReports;
|
|
10
|
+
exports.createReport = createReport;
|
|
11
|
+
exports.getReport = getReport;
|
|
12
|
+
exports.deleteReport = deleteReport;
|
|
13
|
+
const zod_1 = require("zod");
|
|
14
|
+
exports.listReportsSchema = zod_1.z.object({
|
|
15
|
+
projectId: zod_1.z.string().optional().describe('Filter by project ID'),
|
|
16
|
+
pinned: zod_1.z.boolean().optional().describe('Only show pinned reports'),
|
|
17
|
+
limit: zod_1.z.number().optional().describe('Max reports to return (default: 20, max: 50)'),
|
|
18
|
+
});
|
|
19
|
+
exports.createReportSchema = zod_1.z.object({
|
|
20
|
+
projectId: zod_1.z.string().describe('The ID of the project'),
|
|
21
|
+
name: zod_1.z.string().describe('Report name'),
|
|
22
|
+
description: zod_1.z.string().optional().describe('Report description'),
|
|
23
|
+
query: zod_1.z.object({
|
|
24
|
+
metrics: zod_1.z.array(zod_1.z.string()),
|
|
25
|
+
dimensions: zod_1.z.array(zod_1.z.string()).optional(),
|
|
26
|
+
timeGrain: zod_1.z.string().optional(),
|
|
27
|
+
days: zod_1.z.number().optional(),
|
|
28
|
+
filters: zod_1.z.any().optional(),
|
|
29
|
+
}).describe('Analytics query configuration'),
|
|
30
|
+
visualization: zod_1.z.object({
|
|
31
|
+
type: zod_1.z.enum(['line', 'bar', 'pie', 'table', 'metric']).optional(),
|
|
32
|
+
title: zod_1.z.string().optional(),
|
|
33
|
+
}).optional().describe('Visualization settings'),
|
|
34
|
+
schedule: zod_1.z.enum(['daily', 'weekly', 'monthly']).optional().describe('Auto-refresh schedule'),
|
|
35
|
+
tags: zod_1.z.array(zod_1.z.string()).optional().describe('Tags for organization'),
|
|
36
|
+
pinned: zod_1.z.boolean().optional().describe('Pin to dashboard'),
|
|
37
|
+
});
|
|
38
|
+
exports.getReportSchema = zod_1.z.object({ id: zod_1.z.string().describe('Report ID') });
|
|
39
|
+
exports.deleteReportSchema = zod_1.z.object({ id: zod_1.z.string().describe('Report ID') });
|
|
40
|
+
/**
|
|
41
|
+
* List saved reports
|
|
42
|
+
*/
|
|
43
|
+
async function listReports(client, args) {
|
|
44
|
+
const result = await client.listReports(args.projectId, args.pinned, args.limit);
|
|
45
|
+
let response = `## Saved Reports\n`;
|
|
46
|
+
response += `Total: ${result.count}\n\n`;
|
|
47
|
+
if (result.reports.length === 0) {
|
|
48
|
+
response += 'No saved reports found. Create one with create_report.\n';
|
|
49
|
+
return response;
|
|
50
|
+
}
|
|
51
|
+
for (const report of result.reports) {
|
|
52
|
+
response += `### ${report.pinned ? '📌 ' : ''}${report.name}\n`;
|
|
53
|
+
if (report.description)
|
|
54
|
+
response += `${report.description}\n`;
|
|
55
|
+
response += `- ID: ${report.id}\n`;
|
|
56
|
+
response += `- Metrics: ${report.query?.metrics?.join(', ')}\n`;
|
|
57
|
+
response += `- Visualization: ${report.visualization?.type || 'table'}\n`;
|
|
58
|
+
if (report.schedule)
|
|
59
|
+
response += `- Schedule: ${report.schedule}\n`;
|
|
60
|
+
if (report.tags?.length)
|
|
61
|
+
response += `- Tags: ${report.tags.join(', ')}\n`;
|
|
62
|
+
response += `- Updated: ${report.updatedAt}\n\n`;
|
|
63
|
+
}
|
|
64
|
+
return response;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Create a saved report
|
|
68
|
+
*/
|
|
69
|
+
async function createReport(client, args) {
|
|
70
|
+
const result = await client.createReport({
|
|
71
|
+
projectId: args.projectId,
|
|
72
|
+
name: args.name,
|
|
73
|
+
description: args.description,
|
|
74
|
+
query: args.query,
|
|
75
|
+
visualization: args.visualization,
|
|
76
|
+
schedule: args.schedule,
|
|
77
|
+
tags: args.tags,
|
|
78
|
+
pinned: args.pinned,
|
|
79
|
+
});
|
|
80
|
+
return `## Report Created\n\n- ID: ${result.id}\n- Name: ${result.name}\n- Metrics: ${result.query?.metrics?.join(', ')}\n- Visualization: ${result.visualization?.type || 'table'}\n`;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get a saved report
|
|
84
|
+
*/
|
|
85
|
+
async function getReport(client, args) {
|
|
86
|
+
const report = await client.getReport(args.id);
|
|
87
|
+
let response = `## ${report.pinned ? '📌 ' : ''}${report.name}\n`;
|
|
88
|
+
if (report.description)
|
|
89
|
+
response += `${report.description}\n\n`;
|
|
90
|
+
response += `- ID: ${report.id}\n`;
|
|
91
|
+
response += `- Project: ${report.projectId}\n`;
|
|
92
|
+
response += `- Metrics: ${report.query?.metrics?.join(', ')}\n`;
|
|
93
|
+
response += `- Dimensions: ${report.query?.dimensions?.join(', ') || 'none'}\n`;
|
|
94
|
+
response += `- Time Grain: ${report.query?.timeGrain || 'day'}\n`;
|
|
95
|
+
response += `- Days: ${report.query?.days || 30}\n`;
|
|
96
|
+
response += `- Visualization: ${report.visualization?.type || 'table'}\n`;
|
|
97
|
+
if (report.schedule)
|
|
98
|
+
response += `- Schedule: ${report.schedule}\n`;
|
|
99
|
+
if (report.tags?.length)
|
|
100
|
+
response += `- Tags: ${report.tags.join(', ')}\n`;
|
|
101
|
+
response += `\nTo execute this report's query, use query_analytics with the same parameters.\n`;
|
|
102
|
+
return response;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Delete a saved report
|
|
106
|
+
*/
|
|
107
|
+
async function deleteReport(client, args) {
|
|
108
|
+
await client.deleteReport(args.id);
|
|
109
|
+
return `Report ${args.id} has been deleted.`;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Tool definitions for MCP
|
|
113
|
+
*/
|
|
114
|
+
exports.reportsTools = [
|
|
115
|
+
{
|
|
116
|
+
name: 'list_reports',
|
|
117
|
+
description: 'List saved analytics reports. Reports store reusable query configurations for dashboards.',
|
|
118
|
+
inputSchema: {
|
|
119
|
+
type: 'object',
|
|
120
|
+
properties: {
|
|
121
|
+
projectId: { type: 'string', description: 'Filter by project ID' },
|
|
122
|
+
pinned: { type: 'boolean', description: 'Only show pinned reports' },
|
|
123
|
+
limit: { type: 'number', description: 'Max reports (default: 20, max: 50)' },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'create_report',
|
|
129
|
+
description: 'Create a saved analytics report with custom metrics, dimensions, filters, and visualization settings.',
|
|
130
|
+
inputSchema: {
|
|
131
|
+
type: 'object',
|
|
132
|
+
properties: {
|
|
133
|
+
projectId: { type: 'string', description: 'Project ID' },
|
|
134
|
+
name: { type: 'string', description: 'Report name' },
|
|
135
|
+
description: { type: 'string', description: 'Report description' },
|
|
136
|
+
query: {
|
|
137
|
+
type: 'object',
|
|
138
|
+
properties: {
|
|
139
|
+
metrics: { type: 'array', items: { type: 'string' } },
|
|
140
|
+
dimensions: { type: 'array', items: { type: 'string' } },
|
|
141
|
+
timeGrain: { type: 'string', enum: ['day', 'week', 'month'] },
|
|
142
|
+
days: { type: 'number' },
|
|
143
|
+
},
|
|
144
|
+
required: ['metrics'],
|
|
145
|
+
},
|
|
146
|
+
visualization: {
|
|
147
|
+
type: 'object',
|
|
148
|
+
properties: {
|
|
149
|
+
type: { type: 'string', enum: ['line', 'bar', 'pie', 'table', 'metric'] },
|
|
150
|
+
title: { type: 'string' },
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
schedule: { type: 'string', enum: ['daily', 'weekly', 'monthly'] },
|
|
154
|
+
tags: { type: 'array', items: { type: 'string' } },
|
|
155
|
+
pinned: { type: 'boolean' },
|
|
156
|
+
},
|
|
157
|
+
required: ['projectId', 'name', 'query'],
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: 'get_report',
|
|
162
|
+
description: 'Get details of a saved analytics report by ID.',
|
|
163
|
+
inputSchema: {
|
|
164
|
+
type: 'object',
|
|
165
|
+
properties: {
|
|
166
|
+
id: { type: 'string', description: 'Report ID' },
|
|
167
|
+
},
|
|
168
|
+
required: ['id'],
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'delete_report',
|
|
173
|
+
description: 'Delete a saved analytics report.',
|
|
174
|
+
inputSchema: {
|
|
175
|
+
type: 'object',
|
|
176
|
+
properties: {
|
|
177
|
+
id: { type: 'string', description: 'Report ID' },
|
|
178
|
+
},
|
|
179
|
+
required: ['id'],
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
];
|
|
183
|
+
//# sourceMappingURL=reports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../../src/tools/reports.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAqCH,kCA0BC;AAKD,oCAgBC;AAKD,8BAoBC;A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