@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,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Indexing Tools
|
|
3
|
+
*
|
|
4
|
+
* MCP tools for website indexing management (IndexNow, GSC).
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { ReauditAPIClient } from '../lib/api-client.js';
|
|
8
|
+
export declare const listIndexingConnectionsSchema: z.ZodObject<{
|
|
9
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
10
|
+
activeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
projectId?: string | undefined;
|
|
13
|
+
activeOnly?: boolean | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
projectId?: string | undefined;
|
|
16
|
+
activeOnly?: boolean | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const createIndexingConnectionSchema: z.ZodObject<{
|
|
19
|
+
siteUrl: z.ZodString;
|
|
20
|
+
siteName: z.ZodString;
|
|
21
|
+
sitemapUrl: z.ZodOptional<z.ZodString>;
|
|
22
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
23
|
+
indexNowEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
siteUrl: string;
|
|
26
|
+
siteName: string;
|
|
27
|
+
projectId?: string | undefined;
|
|
28
|
+
sitemapUrl?: string | undefined;
|
|
29
|
+
indexNowEnabled?: boolean | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
siteUrl: string;
|
|
32
|
+
siteName: string;
|
|
33
|
+
projectId?: string | undefined;
|
|
34
|
+
sitemapUrl?: string | undefined;
|
|
35
|
+
indexNowEnabled?: boolean | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const syncIndexingConnectionSchema: z.ZodObject<{
|
|
38
|
+
connectionId: z.ZodString;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
connectionId: string;
|
|
41
|
+
}, {
|
|
42
|
+
connectionId: string;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* List indexing connections tool handler
|
|
46
|
+
*/
|
|
47
|
+
export declare function listIndexingConnections(client: ReauditAPIClient, args: z.infer<typeof listIndexingConnectionsSchema>): Promise<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Create indexing connection tool handler
|
|
50
|
+
*/
|
|
51
|
+
export declare function createIndexingConnection(client: ReauditAPIClient, args: z.infer<typeof createIndexingConnectionSchema>): Promise<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Sync indexing connection tool handler
|
|
54
|
+
*/
|
|
55
|
+
export declare function syncIndexingConnection(client: ReauditAPIClient, args: z.infer<typeof syncIndexingConnectionSchema>): Promise<string>;
|
|
56
|
+
/**
|
|
57
|
+
* Tool definitions for MCP
|
|
58
|
+
*/
|
|
59
|
+
export declare const indexingTools: ({
|
|
60
|
+
name: string;
|
|
61
|
+
description: string;
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: "object";
|
|
64
|
+
properties: {
|
|
65
|
+
projectId: {
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
activeOnly: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
siteUrl?: undefined;
|
|
74
|
+
siteName?: undefined;
|
|
75
|
+
sitemapUrl?: undefined;
|
|
76
|
+
indexNowEnabled?: undefined;
|
|
77
|
+
connectionId?: undefined;
|
|
78
|
+
};
|
|
79
|
+
required: string[];
|
|
80
|
+
};
|
|
81
|
+
} | {
|
|
82
|
+
name: string;
|
|
83
|
+
description: string;
|
|
84
|
+
inputSchema: {
|
|
85
|
+
type: "object";
|
|
86
|
+
properties: {
|
|
87
|
+
siteUrl: {
|
|
88
|
+
type: string;
|
|
89
|
+
description: string;
|
|
90
|
+
};
|
|
91
|
+
siteName: {
|
|
92
|
+
type: string;
|
|
93
|
+
description: string;
|
|
94
|
+
};
|
|
95
|
+
sitemapUrl: {
|
|
96
|
+
type: string;
|
|
97
|
+
description: string;
|
|
98
|
+
};
|
|
99
|
+
projectId: {
|
|
100
|
+
type: string;
|
|
101
|
+
description: string;
|
|
102
|
+
};
|
|
103
|
+
indexNowEnabled: {
|
|
104
|
+
type: string;
|
|
105
|
+
description: string;
|
|
106
|
+
};
|
|
107
|
+
activeOnly?: undefined;
|
|
108
|
+
connectionId?: undefined;
|
|
109
|
+
};
|
|
110
|
+
required: string[];
|
|
111
|
+
};
|
|
112
|
+
} | {
|
|
113
|
+
name: string;
|
|
114
|
+
description: string;
|
|
115
|
+
inputSchema: {
|
|
116
|
+
type: "object";
|
|
117
|
+
properties: {
|
|
118
|
+
connectionId: {
|
|
119
|
+
type: string;
|
|
120
|
+
description: string;
|
|
121
|
+
};
|
|
122
|
+
projectId?: undefined;
|
|
123
|
+
activeOnly?: undefined;
|
|
124
|
+
siteUrl?: undefined;
|
|
125
|
+
siteName?: undefined;
|
|
126
|
+
sitemapUrl?: undefined;
|
|
127
|
+
indexNowEnabled?: undefined;
|
|
128
|
+
};
|
|
129
|
+
required: string[];
|
|
130
|
+
};
|
|
131
|
+
})[];
|
|
132
|
+
//# sourceMappingURL=indexing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexing.d.ts","sourceRoot":"","sources":["../../src/tools/indexing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,eAAO,MAAM,6BAA6B;;;;;;;;;EAGxC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;EAMzC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;EAEvC,CAAC;AAEH;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,GAClD,OAAO,CAAC,MAAM,CAAC,CAkDjB;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,GACnD,OAAO,CAAC,MAAM,CAAC,CA4BjB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,GACjD,OAAO,CAAC,MAAM,CAAC,CAqBjB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;kBAgBJ,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+C7B,CAAC"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Indexing Tools
|
|
4
|
+
*
|
|
5
|
+
* MCP tools for website indexing management (IndexNow, GSC).
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.indexingTools = exports.syncIndexingConnectionSchema = exports.createIndexingConnectionSchema = exports.listIndexingConnectionsSchema = void 0;
|
|
9
|
+
exports.listIndexingConnections = listIndexingConnections;
|
|
10
|
+
exports.createIndexingConnection = createIndexingConnection;
|
|
11
|
+
exports.syncIndexingConnection = syncIndexingConnection;
|
|
12
|
+
const zod_1 = require("zod");
|
|
13
|
+
// Tool schemas
|
|
14
|
+
exports.listIndexingConnectionsSchema = zod_1.z.object({
|
|
15
|
+
projectId: zod_1.z.string().optional().describe('Filter by project ID'),
|
|
16
|
+
activeOnly: zod_1.z.boolean().optional().describe('Only show active connections (default: true)'),
|
|
17
|
+
});
|
|
18
|
+
exports.createIndexingConnectionSchema = zod_1.z.object({
|
|
19
|
+
siteUrl: zod_1.z.string().describe('The website URL (e.g., https://example.com)'),
|
|
20
|
+
siteName: zod_1.z.string().describe('A friendly name for the site'),
|
|
21
|
+
sitemapUrl: zod_1.z.string().optional().describe('URL to the sitemap (auto-detected if not provided)'),
|
|
22
|
+
projectId: zod_1.z.string().optional().describe('Project ID to associate with'),
|
|
23
|
+
indexNowEnabled: zod_1.z.boolean().optional().describe('Enable IndexNow instant indexing (default: true)'),
|
|
24
|
+
});
|
|
25
|
+
exports.syncIndexingConnectionSchema = zod_1.z.object({
|
|
26
|
+
connectionId: zod_1.z.string().describe('The ID of the indexing connection to sync'),
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* List indexing connections tool handler
|
|
30
|
+
*/
|
|
31
|
+
async function listIndexingConnections(client, args) {
|
|
32
|
+
const result = await client.listIndexingConnections({
|
|
33
|
+
projectId: args.projectId,
|
|
34
|
+
activeOnly: args.activeOnly,
|
|
35
|
+
});
|
|
36
|
+
if (result.connections.length === 0) {
|
|
37
|
+
return 'No indexing connections found. Create a connection to start monitoring and submitting URLs to search engines.';
|
|
38
|
+
}
|
|
39
|
+
let response = `## Indexing Connections (${result.count})\n\n`;
|
|
40
|
+
for (const conn of result.connections) {
|
|
41
|
+
const statusIcon = conn.isActive ? '✅' : '⏸️';
|
|
42
|
+
const indexNowIcon = conn.indexNowEnabled ? (conn.indexNowKeyVerified ? '🔑' : '⚠️') : '❌';
|
|
43
|
+
response += `### ${statusIcon} ${conn.siteName}\n`;
|
|
44
|
+
response += `- **ID:** ${conn.id}\n`;
|
|
45
|
+
response += `- **Site URL:** ${conn.siteUrl}\n`;
|
|
46
|
+
if (conn.sitemapUrl)
|
|
47
|
+
response += `- **Sitemap:** ${conn.sitemapUrl}\n`;
|
|
48
|
+
response += `- **Source Type:** ${conn.sourceType}\n`;
|
|
49
|
+
response += `- **IndexNow:** ${indexNowIcon} ${conn.indexNowEnabled ? 'Enabled' : 'Disabled'}`;
|
|
50
|
+
if (conn.indexNowEnabled) {
|
|
51
|
+
response += conn.indexNowKeyVerified ? ' (Verified)' : ' (Not Verified)';
|
|
52
|
+
}
|
|
53
|
+
response += '\n';
|
|
54
|
+
response += `- **GSC:** ${conn.gscEnabled ? '✅ Enabled' : '❌ Disabled'}\n`;
|
|
55
|
+
if (conn.stats) {
|
|
56
|
+
response += `- **Stats:**\n`;
|
|
57
|
+
response += ` - Total URLs: ${conn.stats.totalUrls || 0}\n`;
|
|
58
|
+
response += ` - Indexed URLs: ${conn.stats.indexedUrls || 0}\n`;
|
|
59
|
+
if (conn.stats.lastSyncAt) {
|
|
60
|
+
response += ` - Last Sync: ${new Date(conn.stats.lastSyncAt).toLocaleString()}\n`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (conn.project) {
|
|
64
|
+
response += `- **Project:** ${conn.project.name} (${conn.project.id})\n`;
|
|
65
|
+
}
|
|
66
|
+
if (conn.lastError) {
|
|
67
|
+
response += `- **⚠️ Last Error:** ${conn.lastError}\n`;
|
|
68
|
+
}
|
|
69
|
+
response += `- **Created:** ${new Date(conn.createdAt).toLocaleDateString()}\n`;
|
|
70
|
+
response += '\n';
|
|
71
|
+
}
|
|
72
|
+
return response;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Create indexing connection tool handler
|
|
76
|
+
*/
|
|
77
|
+
async function createIndexingConnection(client, args) {
|
|
78
|
+
const result = await client.createIndexingConnection({
|
|
79
|
+
siteUrl: args.siteUrl,
|
|
80
|
+
siteName: args.siteName,
|
|
81
|
+
sitemapUrl: args.sitemapUrl,
|
|
82
|
+
projectId: args.projectId,
|
|
83
|
+
indexNowEnabled: args.indexNowEnabled,
|
|
84
|
+
});
|
|
85
|
+
const conn = result.connection;
|
|
86
|
+
let response = `## Indexing Connection Created\n\n`;
|
|
87
|
+
response += `${result.message}\n\n`;
|
|
88
|
+
response += `- **ID:** ${conn.id}\n`;
|
|
89
|
+
response += `- **Site URL:** ${conn.siteUrl}\n`;
|
|
90
|
+
response += `- **Site Name:** ${conn.siteName}\n`;
|
|
91
|
+
if (conn.sitemapUrl)
|
|
92
|
+
response += `- **Sitemap:** ${conn.sitemapUrl}\n`;
|
|
93
|
+
response += `- **IndexNow:** ${conn.indexNowEnabled ? 'Enabled' : 'Disabled'}\n`;
|
|
94
|
+
if (conn.indexNowKey) {
|
|
95
|
+
response += `\n### IndexNow Setup\n`;
|
|
96
|
+
response += `To verify IndexNow, add this key file to your website:\n`;
|
|
97
|
+
response += `- **Key:** ${conn.indexNowKey}\n`;
|
|
98
|
+
response += `- **File:** ${conn.siteUrl}/${conn.indexNowKey}.txt\n`;
|
|
99
|
+
response += `- **Content:** ${conn.indexNowKey}\n`;
|
|
100
|
+
}
|
|
101
|
+
return response;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Sync indexing connection tool handler
|
|
105
|
+
*/
|
|
106
|
+
async function syncIndexingConnection(client, args) {
|
|
107
|
+
const result = await client.syncIndexingConnection(args.connectionId);
|
|
108
|
+
let response = `## Sync Triggered\n\n`;
|
|
109
|
+
response += `${result.message}\n\n`;
|
|
110
|
+
response += `- **Site URL:** ${result.connection.siteUrl}\n`;
|
|
111
|
+
response += `- **Sitemap:** ${result.connection.sitemapUrl}\n`;
|
|
112
|
+
if (result.connection.stats) {
|
|
113
|
+
response += `\n### Current Stats\n`;
|
|
114
|
+
response += `- Total URLs: ${result.connection.stats.totalUrls || 0}\n`;
|
|
115
|
+
response += `- Indexed URLs: ${result.connection.stats.indexedUrls || 0}\n`;
|
|
116
|
+
}
|
|
117
|
+
if (result.connection.lastSyncAt) {
|
|
118
|
+
response += `- Last Sync: ${new Date(result.connection.lastSyncAt).toLocaleString()}\n`;
|
|
119
|
+
}
|
|
120
|
+
response += `\n*The sync will process in the background. Check back later for updated stats.*`;
|
|
121
|
+
return response;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Tool definitions for MCP
|
|
125
|
+
*/
|
|
126
|
+
exports.indexingTools = [
|
|
127
|
+
{
|
|
128
|
+
name: 'list_indexing_connections',
|
|
129
|
+
description: 'List all website indexing connections. These connections enable IndexNow instant indexing and Google Search Console integration.',
|
|
130
|
+
inputSchema: {
|
|
131
|
+
type: 'object',
|
|
132
|
+
properties: {
|
|
133
|
+
projectId: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
description: 'Filter by project ID',
|
|
136
|
+
},
|
|
137
|
+
activeOnly: {
|
|
138
|
+
type: 'boolean',
|
|
139
|
+
description: 'Only show active connections (default: true)',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
required: [],
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'create_indexing_connection',
|
|
147
|
+
description: 'Create a new indexing connection for a website. This enables sitemap monitoring and IndexNow instant indexing.',
|
|
148
|
+
inputSchema: {
|
|
149
|
+
type: 'object',
|
|
150
|
+
properties: {
|
|
151
|
+
siteUrl: {
|
|
152
|
+
type: 'string',
|
|
153
|
+
description: 'The website URL (e.g., https://example.com)',
|
|
154
|
+
},
|
|
155
|
+
siteName: {
|
|
156
|
+
type: 'string',
|
|
157
|
+
description: 'A friendly name for the site',
|
|
158
|
+
},
|
|
159
|
+
sitemapUrl: {
|
|
160
|
+
type: 'string',
|
|
161
|
+
description: 'URL to the sitemap (auto-detected if not provided)',
|
|
162
|
+
},
|
|
163
|
+
projectId: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: 'Project ID to associate with',
|
|
166
|
+
},
|
|
167
|
+
indexNowEnabled: {
|
|
168
|
+
type: 'boolean',
|
|
169
|
+
description: 'Enable IndexNow instant indexing (default: true)',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
required: ['siteUrl', 'siteName'],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: 'sync_indexing_connection',
|
|
177
|
+
description: 'Trigger a sitemap sync for an indexing connection. This will fetch the latest URLs from the sitemap and submit new/updated URLs to search engines.',
|
|
178
|
+
inputSchema: {
|
|
179
|
+
type: 'object',
|
|
180
|
+
properties: {
|
|
181
|
+
connectionId: {
|
|
182
|
+
type: 'string',
|
|
183
|
+
description: 'The ID of the indexing connection to sync',
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
required: ['connectionId'],
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
];
|
|
190
|
+
//# sourceMappingURL=indexing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexing.js","sourceRoot":"","sources":["../../src/tools/indexing.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA0BH,0DAqDC;AAKD,4DA+BC;AAKD,wDAwBC;AA9ID,6BAAwB;AAGxB,eAAe;A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ACf,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,kDAAkD;iBAChE;aACF;YACD,QAAQ,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;SAClC;KACF;IACD;QACE,IAAI,EAAE,0BAA0B;QAChC,WAAW,EAAE,oJAAoJ;QACjK,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2CAA2C;iBACzD;aACF;YACD,QAAQ,EAAE,CAAC,cAAc,CAAC;SAC3B;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optimization Tools
|
|
3
|
+
*
|
|
4
|
+
* MCP tools for llms.txt generation, translation, and content optimization.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { ReauditAPIClient } from '../lib/api-client.js';
|
|
8
|
+
export declare const generateLlmsTxtSchema: z.ZodObject<{
|
|
9
|
+
projectId: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
projectId: string;
|
|
12
|
+
}, {
|
|
13
|
+
projectId: string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const translateContentSchema: z.ZodObject<{
|
|
16
|
+
contentId: z.ZodString;
|
|
17
|
+
targetLanguage: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
contentId: string;
|
|
20
|
+
targetLanguage: string;
|
|
21
|
+
}, {
|
|
22
|
+
contentId: string;
|
|
23
|
+
targetLanguage: string;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Generate llms.txt tool handler
|
|
27
|
+
*/
|
|
28
|
+
export declare function generateLlmsTxt(client: ReauditAPIClient, args: z.infer<typeof generateLlmsTxtSchema>): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Translate content tool handler
|
|
31
|
+
*/
|
|
32
|
+
export declare function translateContent(client: ReauditAPIClient, args: z.infer<typeof translateContentSchema>): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Tool definitions for MCP
|
|
35
|
+
*/
|
|
36
|
+
export declare const optimizationTools: ({
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
inputSchema: {
|
|
40
|
+
type: "object";
|
|
41
|
+
properties: {
|
|
42
|
+
projectId: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
contentId?: undefined;
|
|
47
|
+
targetLanguage?: undefined;
|
|
48
|
+
};
|
|
49
|
+
required: string[];
|
|
50
|
+
};
|
|
51
|
+
} | {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: "object";
|
|
56
|
+
properties: {
|
|
57
|
+
contentId: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
targetLanguage: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
projectId?: undefined;
|
|
66
|
+
};
|
|
67
|
+
required: string[];
|
|
68
|
+
};
|
|
69
|
+
})[];
|
|
70
|
+
//# sourceMappingURL=optimization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optimization.d.ts","sourceRoot":"","sources":["../../src/tools/optimization.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AAEH;;GAEG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,GAC1C,OAAO,CAAC,MAAM,CAAC,CAsBjB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,GAC3C,OAAO,CAAC,MAAM,CAAC,CA6BjB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiC7B,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Optimization Tools
|
|
4
|
+
*
|
|
5
|
+
* MCP tools for llms.txt generation, translation, and content optimization.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.optimizationTools = exports.translateContentSchema = exports.generateLlmsTxtSchema = void 0;
|
|
9
|
+
exports.generateLlmsTxt = generateLlmsTxt;
|
|
10
|
+
exports.translateContent = translateContent;
|
|
11
|
+
const zod_1 = require("zod");
|
|
12
|
+
// Tool schemas
|
|
13
|
+
exports.generateLlmsTxtSchema = zod_1.z.object({
|
|
14
|
+
projectId: zod_1.z.string().describe('The ID of the project to generate llms.txt for'),
|
|
15
|
+
});
|
|
16
|
+
exports.translateContentSchema = zod_1.z.object({
|
|
17
|
+
contentId: zod_1.z.string().describe('The ID of the content to translate'),
|
|
18
|
+
targetLanguage: zod_1.z.string().describe('Target language code (e.g., es, fr, de, el, it, pt, nl, pl, ja, ko, zh)'),
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Generate llms.txt tool handler
|
|
22
|
+
*/
|
|
23
|
+
async function generateLlmsTxt(client, args) {
|
|
24
|
+
const result = await client.generateLlmsTxt(args.projectId);
|
|
25
|
+
if (!result.success || !result.content) {
|
|
26
|
+
return `Failed to generate llms.txt: ${result.error || 'Unknown error'}`;
|
|
27
|
+
}
|
|
28
|
+
let response = `## llms.txt Generated!\n\n`;
|
|
29
|
+
if (result.metadata) {
|
|
30
|
+
response += `**Generated At:** ${result.metadata.generatedAt}\n`;
|
|
31
|
+
response += `**Model:** ${result.metadata.model}\n`;
|
|
32
|
+
response += `**Used Knowledge Base:** ${result.metadata.hasKnowledgeBase ? 'Yes' : 'No'}\n\n`;
|
|
33
|
+
}
|
|
34
|
+
response += `---\n\n`;
|
|
35
|
+
response += `### Content\n\n`;
|
|
36
|
+
response += '```\n';
|
|
37
|
+
response += result.content;
|
|
38
|
+
response += '\n```\n\n';
|
|
39
|
+
response += `---\n`;
|
|
40
|
+
response += `Copy this content to your website's \`/llms.txt\` file to help AI assistants understand your business.\n`;
|
|
41
|
+
return response;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Translate content tool handler
|
|
45
|
+
*/
|
|
46
|
+
async function translateContent(client, args) {
|
|
47
|
+
const result = await client.translateContent(args.contentId, args.targetLanguage);
|
|
48
|
+
if (!result.success || !result.content) {
|
|
49
|
+
return `Failed to translate content: ${result.error || 'Unknown error'}`;
|
|
50
|
+
}
|
|
51
|
+
const content = result.content;
|
|
52
|
+
let response = `## Content Translated!\n\n`;
|
|
53
|
+
response += `**Original Language:** ${result.originalLanguage || 'en'}\n`;
|
|
54
|
+
response += `**Target Language:** ${args.targetLanguage}\n`;
|
|
55
|
+
response += `**New Content ID:** ${content.id}\n\n`;
|
|
56
|
+
response += `### Translated Content\n\n`;
|
|
57
|
+
response += `- **Title:** ${content.title}\n`;
|
|
58
|
+
response += `- **Slug:** ${content.slug}\n`;
|
|
59
|
+
response += `- **Meta Title:** ${content.metaTitle}\n`;
|
|
60
|
+
response += `- **Meta Description:** ${content.metaDescription}\n`;
|
|
61
|
+
response += `- **Word Count:** ${content.wordCount}\n`;
|
|
62
|
+
if (content.excerpt) {
|
|
63
|
+
response += `\n**Excerpt:**\n> ${content.excerpt}\n`;
|
|
64
|
+
}
|
|
65
|
+
response += `\n---\n`;
|
|
66
|
+
response += `Use \`get_content_details\` with ID \`${content.id}\` to view the full translated content.\n`;
|
|
67
|
+
return response;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Tool definitions for MCP
|
|
71
|
+
*/
|
|
72
|
+
exports.optimizationTools = [
|
|
73
|
+
{
|
|
74
|
+
name: 'generate_llms_txt',
|
|
75
|
+
description: 'Generate an AI-optimized llms.txt file for your project. This file helps AI assistants understand your business and provide accurate information.',
|
|
76
|
+
inputSchema: {
|
|
77
|
+
type: 'object',
|
|
78
|
+
properties: {
|
|
79
|
+
projectId: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'The ID of the project to generate llms.txt for',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
required: ['projectId'],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'translate_content',
|
|
89
|
+
description: 'Translate generated content to another language. Creates a new content entry with the translated version.',
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {
|
|
93
|
+
contentId: {
|
|
94
|
+
type: 'string',
|
|
95
|
+
description: 'The ID of the content to translate',
|
|
96
|
+
},
|
|
97
|
+
targetLanguage: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
description: 'Target language code (e.g., es, fr, de, el, it, pt, nl, pl, ja, ko, zh)',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
required: ['contentId', 'targetLanguage'],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
//# sourceMappingURL=optimization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optimization.js","sourceRoot":"","sources":["../../src/tools/optimization.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAkBH,0CAyBC;AAKD,4CAgCC;AA9ED,6BAAwB;AAGxB,eAAe;AACF,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAA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QAChK,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,gDAAgD;iBAC9D;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,2GAA2G;QACxH,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oCAAoC;iBAClD;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yEAAyE;iBACvF;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,EAAE,gBAAgB,CAAC;SAC1C;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project Tools
|
|
3
|
+
*
|
|
4
|
+
* MCP tools for managing and querying projects.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { ReauditAPIClient } from '../lib/api-client.js';
|
|
8
|
+
export declare const listProjectsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
9
|
+
export declare const getProjectSchema: z.ZodObject<{
|
|
10
|
+
projectId: z.ZodString;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
projectId: string;
|
|
13
|
+
}, {
|
|
14
|
+
projectId: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const setActiveProjectSchema: z.ZodObject<{
|
|
17
|
+
projectId: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
projectId: string;
|
|
20
|
+
}, {
|
|
21
|
+
projectId: string;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const getActiveProjectSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
24
|
+
/**
|
|
25
|
+
* List all projects tool handler
|
|
26
|
+
*/
|
|
27
|
+
export declare function listProjects(client: ReauditAPIClient, _args: z.infer<typeof listProjectsSchema>): Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Set active project tool handler
|
|
30
|
+
*/
|
|
31
|
+
export declare function setActiveProject(client: ReauditAPIClient, args: z.infer<typeof setActiveProjectSchema>): Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Get active project tool handler
|
|
34
|
+
*/
|
|
35
|
+
export declare function getActiveProject(_client: ReauditAPIClient, _args: z.infer<typeof getActiveProjectSchema>): Promise<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Get the current active project ID (for use by other tools)
|
|
38
|
+
*/
|
|
39
|
+
export declare function getActiveProjectId(): string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Tool definitions for MCP
|
|
42
|
+
*/
|
|
43
|
+
export declare const projectTools: ({
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: "object";
|
|
48
|
+
properties: {
|
|
49
|
+
projectId?: undefined;
|
|
50
|
+
};
|
|
51
|
+
required: string[];
|
|
52
|
+
};
|
|
53
|
+
} | {
|
|
54
|
+
name: string;
|
|
55
|
+
description: string;
|
|
56
|
+
inputSchema: {
|
|
57
|
+
type: "object";
|
|
58
|
+
properties: {
|
|
59
|
+
projectId: {
|
|
60
|
+
type: string;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
required: string[];
|
|
65
|
+
};
|
|
66
|
+
})[];
|
|
67
|
+
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAOxD,eAAO,MAAM,kBAAkB,gDAAe,CAAC;AAE/C,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,eAAO,MAAM,sBAAsB,gDAAe,CAAC;AAEnD;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GACxC,OAAO,CAAC,MAAM,CAAC,CAsBjB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,GAC3C,OAAO,CAAC,MAAM,CAAC,CAajB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,GAC5C,OAAO,CAAC,MAAM,CAAC,CAMjB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAElD;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;kBAOH,MAAM,EAAE;;;;;;;;;;;;;;;IA0B7B,CAAC"}
|