@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.
Files changed (119) hide show
  1. package/LICENSE +33 -0
  2. package/README.md +399 -0
  3. package/dist/auth/oauth-client.d.ts +43 -0
  4. package/dist/auth/oauth-client.d.ts.map +1 -0
  5. package/dist/auth/oauth-client.js +340 -0
  6. package/dist/auth/oauth-client.js.map +1 -0
  7. package/dist/auth/token-store.d.ts +41 -0
  8. package/dist/auth/token-store.d.ts.map +1 -0
  9. package/dist/auth/token-store.js +176 -0
  10. package/dist/auth/token-store.js.map +1 -0
  11. package/dist/index.d.ts +11 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +480 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/lib/api-client.d.ts +970 -0
  16. package/dist/lib/api-client.d.ts.map +1 -0
  17. package/dist/lib/api-client.js +441 -0
  18. package/dist/lib/api-client.js.map +1 -0
  19. package/dist/lib/confirmation.d.ts +92 -0
  20. package/dist/lib/confirmation.d.ts.map +1 -0
  21. package/dist/lib/confirmation.js +224 -0
  22. package/dist/lib/confirmation.js.map +1 -0
  23. package/dist/lib/error-handler.d.ts +57 -0
  24. package/dist/lib/error-handler.d.ts.map +1 -0
  25. package/dist/lib/error-handler.js +235 -0
  26. package/dist/lib/error-handler.js.map +1 -0
  27. package/dist/lib/offline-mode.d.ts +107 -0
  28. package/dist/lib/offline-mode.d.ts.map +1 -0
  29. package/dist/lib/offline-mode.js +356 -0
  30. package/dist/lib/offline-mode.js.map +1 -0
  31. package/dist/lib/progress-tracker.d.ts +87 -0
  32. package/dist/lib/progress-tracker.d.ts.map +1 -0
  33. package/dist/lib/progress-tracker.js +238 -0
  34. package/dist/lib/progress-tracker.js.map +1 -0
  35. package/dist/prompts/index.d.ts +24 -0
  36. package/dist/prompts/index.d.ts.map +1 -0
  37. package/dist/prompts/index.js +305 -0
  38. package/dist/prompts/index.js.map +1 -0
  39. package/dist/resources/index.d.ts +44 -0
  40. package/dist/resources/index.d.ts.map +1 -0
  41. package/dist/resources/index.js +125 -0
  42. package/dist/resources/index.js.map +1 -0
  43. package/dist/tools/account.d.ts +25 -0
  44. package/dist/tools/account.d.ts.map +1 -0
  45. package/dist/tools/account.js +69 -0
  46. package/dist/tools/account.js.map +1 -0
  47. package/dist/tools/action-grids.d.ts +414 -0
  48. package/dist/tools/action-grids.d.ts.map +1 -0
  49. package/dist/tools/action-grids.js +271 -0
  50. package/dist/tools/action-grids.js.map +1 -0
  51. package/dist/tools/analytics-query.d.ts +126 -0
  52. package/dist/tools/analytics-query.d.ts.map +1 -0
  53. package/dist/tools/analytics-query.js +106 -0
  54. package/dist/tools/analytics-query.js.map +1 -0
  55. package/dist/tools/analytics.d.ts +57 -0
  56. package/dist/tools/analytics.d.ts.map +1 -0
  57. package/dist/tools/analytics.js +122 -0
  58. package/dist/tools/analytics.js.map +1 -0
  59. package/dist/tools/audits.d.ts +123 -0
  60. package/dist/tools/audits.d.ts.map +1 -0
  61. package/dist/tools/audits.js +226 -0
  62. package/dist/tools/audits.js.map +1 -0
  63. package/dist/tools/calendar.d.ts +57 -0
  64. package/dist/tools/calendar.d.ts.map +1 -0
  65. package/dist/tools/calendar.js +109 -0
  66. package/dist/tools/calendar.js.map +1 -0
  67. package/dist/tools/content-generation.d.ts +211 -0
  68. package/dist/tools/content-generation.d.ts.map +1 -0
  69. package/dist/tools/content-generation.js +363 -0
  70. package/dist/tools/content-generation.js.map +1 -0
  71. package/dist/tools/content.d.ts +92 -0
  72. package/dist/tools/content.d.ts.map +1 -0
  73. package/dist/tools/content.js +130 -0
  74. package/dist/tools/content.js.map +1 -0
  75. package/dist/tools/indexing.d.ts +132 -0
  76. package/dist/tools/indexing.d.ts.map +1 -0
  77. package/dist/tools/indexing.js +190 -0
  78. package/dist/tools/indexing.js.map +1 -0
  79. package/dist/tools/optimization.d.ts +70 -0
  80. package/dist/tools/optimization.d.ts.map +1 -0
  81. package/dist/tools/optimization.js +106 -0
  82. package/dist/tools/optimization.js.map +1 -0
  83. package/dist/tools/projects.d.ts +67 -0
  84. package/dist/tools/projects.d.ts.map +1 -0
  85. package/dist/tools/projects.js +113 -0
  86. package/dist/tools/projects.js.map +1 -0
  87. package/dist/tools/prompts.d.ts +306 -0
  88. package/dist/tools/prompts.d.ts.map +1 -0
  89. package/dist/tools/prompts.js +378 -0
  90. package/dist/tools/prompts.js.map +1 -0
  91. package/dist/tools/publishing.d.ts +135 -0
  92. package/dist/tools/publishing.d.ts.map +1 -0
  93. package/dist/tools/publishing.js +209 -0
  94. package/dist/tools/publishing.js.map +1 -0
  95. package/dist/tools/reports.d.ts +252 -0
  96. package/dist/tools/reports.d.ts.map +1 -0
  97. package/dist/tools/reports.js +183 -0
  98. package/dist/tools/reports.js.map +1 -0
  99. package/dist/tools/social.d.ts +224 -0
  100. package/dist/tools/social.d.ts.map +1 -0
  101. package/dist/tools/social.js +291 -0
  102. package/dist/tools/social.js.map +1 -0
  103. package/dist/tools/sources.d.ts +221 -0
  104. package/dist/tools/sources.d.ts.map +1 -0
  105. package/dist/tools/sources.js +308 -0
  106. package/dist/tools/sources.js.map +1 -0
  107. package/dist/tools/strategy.d.ts +345 -0
  108. package/dist/tools/strategy.d.ts.map +1 -0
  109. package/dist/tools/strategy.js +392 -0
  110. package/dist/tools/strategy.js.map +1 -0
  111. package/dist/tools/usage.d.ts +101 -0
  112. package/dist/tools/usage.d.ts.map +1 -0
  113. package/dist/tools/usage.js +184 -0
  114. package/dist/tools/usage.js.map +1 -0
  115. package/dist/tools/visibility.d.ts +95 -0
  116. package/dist/tools/visibility.d.ts.map +1 -0
  117. package/dist/tools/visibility.js +163 -0
  118. package/dist/tools/visibility.js.map +1 -0
  119. package/package.json +54 -0
@@ -0,0 +1,224 @@
1
+ /**
2
+ * Social Media Tools
3
+ *
4
+ * MCP tools for social media management.
5
+ */
6
+ import { z } from 'zod';
7
+ import { ReauditAPIClient } from '../lib/api-client.js';
8
+ export declare const listSocialConnectionsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
9
+ export declare const listSocialPostsSchema: z.ZodObject<{
10
+ projectId: z.ZodOptional<z.ZodString>;
11
+ platform: z.ZodOptional<z.ZodString>;
12
+ status: z.ZodOptional<z.ZodString>;
13
+ limit: z.ZodOptional<z.ZodNumber>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ status?: string | undefined;
16
+ projectId?: string | undefined;
17
+ platform?: string | undefined;
18
+ limit?: number | undefined;
19
+ }, {
20
+ status?: string | undefined;
21
+ projectId?: string | undefined;
22
+ platform?: string | undefined;
23
+ limit?: number | undefined;
24
+ }>;
25
+ export declare const generateSocialPostsSchema: z.ZodObject<{
26
+ contentId: z.ZodString;
27
+ platforms: z.ZodArray<z.ZodString, "many">;
28
+ tone: z.ZodOptional<z.ZodString>;
29
+ includeHashtags: z.ZodOptional<z.ZodBoolean>;
30
+ includeLink: z.ZodOptional<z.ZodBoolean>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ contentId: string;
33
+ platforms: string[];
34
+ tone?: string | undefined;
35
+ includeHashtags?: boolean | undefined;
36
+ includeLink?: boolean | undefined;
37
+ }, {
38
+ contentId: string;
39
+ platforms: string[];
40
+ tone?: string | undefined;
41
+ includeHashtags?: boolean | undefined;
42
+ includeLink?: boolean | undefined;
43
+ }>;
44
+ export declare const publishSocialPostSchema: z.ZodObject<{
45
+ postId: z.ZodString;
46
+ }, "strip", z.ZodTypeAny, {
47
+ postId: string;
48
+ }, {
49
+ postId: string;
50
+ }>;
51
+ export declare const scheduleSocialPostSchema: z.ZodObject<{
52
+ postId: z.ZodString;
53
+ scheduledFor: z.ZodString;
54
+ }, "strip", z.ZodTypeAny, {
55
+ postId: string;
56
+ scheduledFor: string;
57
+ }, {
58
+ postId: string;
59
+ scheduledFor: string;
60
+ }>;
61
+ /**
62
+ * List social connections tool handler
63
+ */
64
+ export declare function listSocialConnections(client: ReauditAPIClient, _args: z.infer<typeof listSocialConnectionsSchema>): Promise<string>;
65
+ /**
66
+ * List social posts tool handler
67
+ */
68
+ export declare function listSocialPosts(client: ReauditAPIClient, args: z.infer<typeof listSocialPostsSchema>): Promise<string>;
69
+ /**
70
+ * Generate social posts from content tool handler
71
+ */
72
+ export declare function generateSocialPosts(client: ReauditAPIClient, args: z.infer<typeof generateSocialPostsSchema>): Promise<string>;
73
+ /**
74
+ * Publish social post tool handler
75
+ */
76
+ export declare function publishSocialPost(client: ReauditAPIClient, args: z.infer<typeof publishSocialPostSchema>): Promise<string>;
77
+ /**
78
+ * Schedule social post tool handler
79
+ */
80
+ export declare function scheduleSocialPost(client: ReauditAPIClient, args: z.infer<typeof scheduleSocialPostSchema>): Promise<string>;
81
+ /**
82
+ * Tool definitions for MCP
83
+ */
84
+ export declare const socialTools: ({
85
+ name: string;
86
+ description: string;
87
+ inputSchema: {
88
+ type: "object";
89
+ properties: {
90
+ projectId?: undefined;
91
+ platform?: undefined;
92
+ status?: undefined;
93
+ limit?: undefined;
94
+ contentId?: undefined;
95
+ platforms?: undefined;
96
+ tone?: undefined;
97
+ includeHashtags?: undefined;
98
+ includeLink?: undefined;
99
+ postId?: undefined;
100
+ scheduledFor?: undefined;
101
+ };
102
+ required: string[];
103
+ };
104
+ } | {
105
+ name: string;
106
+ description: string;
107
+ inputSchema: {
108
+ type: "object";
109
+ properties: {
110
+ projectId: {
111
+ type: string;
112
+ description: string;
113
+ };
114
+ platform: {
115
+ type: string;
116
+ description: string;
117
+ };
118
+ status: {
119
+ type: string;
120
+ description: string;
121
+ };
122
+ limit: {
123
+ type: string;
124
+ description: string;
125
+ };
126
+ contentId?: undefined;
127
+ platforms?: undefined;
128
+ tone?: undefined;
129
+ includeHashtags?: undefined;
130
+ includeLink?: undefined;
131
+ postId?: undefined;
132
+ scheduledFor?: undefined;
133
+ };
134
+ required: string[];
135
+ };
136
+ } | {
137
+ name: string;
138
+ description: string;
139
+ inputSchema: {
140
+ type: "object";
141
+ properties: {
142
+ contentId: {
143
+ type: string;
144
+ description: string;
145
+ };
146
+ platforms: {
147
+ type: string;
148
+ items: {
149
+ type: string;
150
+ };
151
+ description: string;
152
+ };
153
+ tone: {
154
+ type: string;
155
+ description: string;
156
+ };
157
+ includeHashtags: {
158
+ type: string;
159
+ description: string;
160
+ };
161
+ includeLink: {
162
+ type: string;
163
+ description: string;
164
+ };
165
+ projectId?: undefined;
166
+ platform?: undefined;
167
+ status?: undefined;
168
+ limit?: undefined;
169
+ postId?: undefined;
170
+ scheduledFor?: undefined;
171
+ };
172
+ required: string[];
173
+ };
174
+ } | {
175
+ name: string;
176
+ description: string;
177
+ inputSchema: {
178
+ type: "object";
179
+ properties: {
180
+ postId: {
181
+ type: string;
182
+ description: string;
183
+ };
184
+ projectId?: undefined;
185
+ platform?: undefined;
186
+ status?: undefined;
187
+ limit?: undefined;
188
+ contentId?: undefined;
189
+ platforms?: undefined;
190
+ tone?: undefined;
191
+ includeHashtags?: undefined;
192
+ includeLink?: undefined;
193
+ scheduledFor?: undefined;
194
+ };
195
+ required: string[];
196
+ };
197
+ } | {
198
+ name: string;
199
+ description: string;
200
+ inputSchema: {
201
+ type: "object";
202
+ properties: {
203
+ postId: {
204
+ type: string;
205
+ description: string;
206
+ };
207
+ scheduledFor: {
208
+ type: string;
209
+ description: string;
210
+ };
211
+ projectId?: undefined;
212
+ platform?: undefined;
213
+ status?: undefined;
214
+ limit?: undefined;
215
+ contentId?: undefined;
216
+ platforms?: undefined;
217
+ tone?: undefined;
218
+ includeHashtags?: undefined;
219
+ includeLink?: undefined;
220
+ };
221
+ required: string[];
222
+ };
223
+ })[];
224
+ //# sourceMappingURL=social.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"social.d.ts","sourceRoot":"","sources":["../../src/tools/social.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,eA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkE7B,CAAC"}
@@ -0,0 +1,291 @@
1
+ "use strict";
2
+ /**
3
+ * Social Media Tools
4
+ *
5
+ * MCP tools for social media management.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.socialTools = exports.scheduleSocialPostSchema = exports.publishSocialPostSchema = exports.generateSocialPostsSchema = exports.listSocialPostsSchema = exports.listSocialConnectionsSchema = void 0;
9
+ exports.listSocialConnections = listSocialConnections;
10
+ exports.listSocialPosts = listSocialPosts;
11
+ exports.generateSocialPosts = generateSocialPosts;
12
+ exports.publishSocialPost = publishSocialPost;
13
+ exports.scheduleSocialPost = scheduleSocialPost;
14
+ const zod_1 = require("zod");
15
+ // Tool schemas
16
+ exports.listSocialConnectionsSchema = zod_1.z.object({});
17
+ exports.listSocialPostsSchema = zod_1.z.object({
18
+ projectId: zod_1.z.string().optional().describe('Filter by project ID'),
19
+ platform: zod_1.z.string().optional().describe('Filter by platform: twitter, linkedin'),
20
+ status: zod_1.z.string().optional().describe('Filter by status: draft, scheduled, published, failed'),
21
+ limit: zod_1.z.number().optional().describe('Maximum number of posts to return (default: 50)'),
22
+ });
23
+ exports.generateSocialPostsSchema = zod_1.z.object({
24
+ contentId: zod_1.z.string().describe('The ID of the content to create social posts from'),
25
+ platforms: zod_1.z.array(zod_1.z.string()).describe('Platforms to generate for: twitter, linkedin'),
26
+ tone: zod_1.z.string().optional().describe('Tone: professional, casual, engaging, informative'),
27
+ includeHashtags: zod_1.z.boolean().optional().describe('Include relevant hashtags (default: true)'),
28
+ includeLink: zod_1.z.boolean().optional().describe('Include link to article (default: true)'),
29
+ });
30
+ exports.publishSocialPostSchema = zod_1.z.object({
31
+ postId: zod_1.z.string().describe('The ID of the social post to publish'),
32
+ });
33
+ exports.scheduleSocialPostSchema = zod_1.z.object({
34
+ postId: zod_1.z.string().describe('The ID of the social post to schedule'),
35
+ scheduledFor: zod_1.z.string().describe('ISO date string for when to publish (e.g., 2024-01-15T10:00:00Z)'),
36
+ });
37
+ /**
38
+ * List social connections tool handler
39
+ */
40
+ async function listSocialConnections(client, _args) {
41
+ const result = await client.listSocialConnections();
42
+ if (result.connections.length === 0) {
43
+ return 'No social media connections found. Connect your social accounts in the Reaudit dashboard to enable posting.';
44
+ }
45
+ let response = `## Social Media Connections (${result.count})\n\n`;
46
+ for (const conn of result.connections) {
47
+ const verifiedIcon = conn.isVerified ? '✅' : '⚠️';
48
+ const platformName = conn.platform === 'twitter' ? 'X/Twitter' : 'LinkedIn';
49
+ response += `### ${platformName}\n`;
50
+ response += `- **ID:** ${conn.id}\n`;
51
+ if (conn.platformUsername)
52
+ response += `- **Username:** @${conn.platformUsername}\n`;
53
+ response += `- **Status:** ${verifiedIcon} ${conn.isVerified ? 'Verified' : 'Not Verified'}\n`;
54
+ response += `- **Stats:** ${conn.totalPublished} published, ${conn.totalScheduled} scheduled\n`;
55
+ if (conn.lastPublishedAt) {
56
+ response += `- **Last Published:** ${new Date(conn.lastPublishedAt).toLocaleDateString()}\n`;
57
+ }
58
+ response += '\n';
59
+ }
60
+ return response;
61
+ }
62
+ /**
63
+ * List social posts tool handler
64
+ */
65
+ async function listSocialPosts(client, args) {
66
+ const result = await client.listSocialPosts({
67
+ projectId: args.projectId,
68
+ platform: args.platform,
69
+ status: args.status,
70
+ limit: args.limit,
71
+ });
72
+ if (result.posts.length === 0) {
73
+ return 'No social media posts found. Use `generate_social_posts` to create posts from your content.';
74
+ }
75
+ let response = `## Social Media Posts (${result.pagination.total} total)\n\n`;
76
+ const scheduled = result.posts.filter(p => p.status === 'scheduled');
77
+ const published = result.posts.filter(p => p.status === 'published');
78
+ const drafts = result.posts.filter(p => p.status === 'draft');
79
+ const failed = result.posts.filter(p => p.status === 'failed');
80
+ if (scheduled.length > 0) {
81
+ response += `### Scheduled (${scheduled.length})\n\n`;
82
+ for (const post of scheduled) {
83
+ const platformName = post.platform === 'twitter' ? 'X/Twitter' : 'LinkedIn';
84
+ response += `**${platformName}** - ${post.scheduledFor ? new Date(post.scheduledFor).toLocaleString() : 'TBD'}\n`;
85
+ response += `> ${post.text.substring(0, 100)}${post.text.length > 100 ? '...' : ''}\n`;
86
+ response += `- ID: ${post.id}\n\n`;
87
+ }
88
+ }
89
+ if (published.length > 0) {
90
+ response += `### Published (${published.length})\n\n`;
91
+ for (const post of published.slice(0, 10)) {
92
+ const platformName = post.platform === 'twitter' ? 'X/Twitter' : 'LinkedIn';
93
+ response += `**${platformName}** - ${post.publishedAt ? new Date(post.publishedAt).toLocaleString() : ''}\n`;
94
+ response += `> ${post.text.substring(0, 100)}${post.text.length > 100 ? '...' : ''}\n`;
95
+ if (post.platformUrl)
96
+ response += `- URL: ${post.platformUrl}\n`;
97
+ response += `- ID: ${post.id}\n\n`;
98
+ }
99
+ if (published.length > 10) {
100
+ response += `*...and ${published.length - 10} more published posts*\n\n`;
101
+ }
102
+ }
103
+ if (drafts.length > 0) {
104
+ response += `### Drafts (${drafts.length})\n\n`;
105
+ for (const post of drafts) {
106
+ const platformName = post.platform === 'twitter' ? 'X/Twitter' : 'LinkedIn';
107
+ response += `**${platformName}**\n`;
108
+ response += `> ${post.text.substring(0, 100)}${post.text.length > 100 ? '...' : ''}\n`;
109
+ response += `- ID: ${post.id}\n\n`;
110
+ }
111
+ }
112
+ if (failed.length > 0) {
113
+ response += `### Failed (${failed.length})\n\n`;
114
+ for (const post of failed) {
115
+ const platformName = post.platform === 'twitter' ? 'X/Twitter' : 'LinkedIn';
116
+ response += `**${platformName}**\n`;
117
+ response += `> ${post.text.substring(0, 100)}${post.text.length > 100 ? '...' : ''}\n`;
118
+ response += `- ID: ${post.id}\n\n`;
119
+ }
120
+ }
121
+ return response;
122
+ }
123
+ /**
124
+ * Generate social posts from content tool handler
125
+ */
126
+ async function generateSocialPosts(client, args) {
127
+ const result = await client.generateSocialPosts({
128
+ contentId: args.contentId,
129
+ platforms: args.platforms,
130
+ tone: args.tone,
131
+ includeHashtags: args.includeHashtags ?? true,
132
+ includeLink: args.includeLink ?? true,
133
+ });
134
+ if (!result.success || !result.posts || result.posts.length === 0) {
135
+ return `Failed to generate social posts: ${result.error || 'Unknown error'}. Make sure you have social accounts connected.`;
136
+ }
137
+ let response = `## Social Posts Generated!\n\n`;
138
+ response += `Created ${result.posts.length} post(s) as drafts:\n\n`;
139
+ for (const post of result.posts) {
140
+ const platformName = post.platform === 'twitter' ? 'X/Twitter' : 'LinkedIn';
141
+ response += `### ${platformName}\n`;
142
+ response += `**ID:** ${post._id}\n`;
143
+ response += `**Status:** Draft\n\n`;
144
+ response += `${post.text}\n\n`;
145
+ if (post.hashtags && post.hashtags.length > 0) {
146
+ response += `**Hashtags:** ${post.hashtags.join(' ')}\n\n`;
147
+ }
148
+ response += '---\n\n';
149
+ }
150
+ response += `Use \`publish_social_post\` or \`schedule_social_post\` to publish these posts.`;
151
+ return response;
152
+ }
153
+ /**
154
+ * Publish social post tool handler
155
+ */
156
+ async function publishSocialPost(client, args) {
157
+ const result = await client.publishSocialPost(args.postId);
158
+ if (!result.success) {
159
+ return `Failed to publish post: ${result.error || 'Unknown error'}`;
160
+ }
161
+ const platformName = result.platform === 'twitter' ? 'X/Twitter' : 'LinkedIn';
162
+ let response = `## Post Published!\n\n`;
163
+ response += `- **Platform:** ${platformName}\n`;
164
+ response += `- **Status:** Published\n`;
165
+ if (result.platformUrl) {
166
+ response += `- **URL:** ${result.platformUrl}\n`;
167
+ }
168
+ response += `\nYour post is now live!`;
169
+ return response;
170
+ }
171
+ /**
172
+ * Schedule social post tool handler
173
+ */
174
+ async function scheduleSocialPost(client, args) {
175
+ const result = await client.scheduleSocialPost(args.postId, args.scheduledFor);
176
+ if (!result.success) {
177
+ return `Failed to schedule post: ${result.error || 'Unknown error'}`;
178
+ }
179
+ const scheduledDate = new Date(args.scheduledFor);
180
+ const platformName = result.platform === 'twitter' ? 'X/Twitter' : 'LinkedIn';
181
+ let response = `## Post Scheduled!\n\n`;
182
+ response += `- **Platform:** ${platformName}\n`;
183
+ response += `- **Scheduled For:** ${scheduledDate.toLocaleString()}\n`;
184
+ response += `- **Status:** Scheduled\n`;
185
+ response += `\nYour post will be automatically published at the scheduled time.`;
186
+ return response;
187
+ }
188
+ /**
189
+ * Tool definitions for MCP
190
+ */
191
+ exports.socialTools = [
192
+ {
193
+ name: 'list_social_connections',
194
+ description: 'List all connected social media accounts (X/Twitter, LinkedIn). Shows connection status and publishing stats.',
195
+ inputSchema: {
196
+ type: 'object',
197
+ properties: {},
198
+ required: [],
199
+ },
200
+ },
201
+ {
202
+ name: 'list_social_posts',
203
+ description: 'List social media posts including scheduled, published, draft, and failed posts. Filter by platform, status, or project.',
204
+ inputSchema: {
205
+ type: 'object',
206
+ properties: {
207
+ projectId: {
208
+ type: 'string',
209
+ description: 'Filter by project ID',
210
+ },
211
+ platform: {
212
+ type: 'string',
213
+ description: 'Filter by platform: twitter, linkedin',
214
+ },
215
+ status: {
216
+ type: 'string',
217
+ description: 'Filter by status: draft, scheduled, published, failed',
218
+ },
219
+ limit: {
220
+ type: 'number',
221
+ description: 'Maximum number of posts to return (default: 50)',
222
+ },
223
+ },
224
+ required: [],
225
+ },
226
+ },
227
+ {
228
+ name: 'generate_social_posts',
229
+ description: 'Generate social media posts from existing content. Creates draft posts for X/Twitter and LinkedIn.',
230
+ inputSchema: {
231
+ type: 'object',
232
+ properties: {
233
+ contentId: {
234
+ type: 'string',
235
+ description: 'The ID of the content to create social posts from',
236
+ },
237
+ platforms: {
238
+ type: 'array',
239
+ items: { type: 'string' },
240
+ description: 'Platforms to generate for: twitter, linkedin',
241
+ },
242
+ tone: {
243
+ type: 'string',
244
+ description: 'Tone: professional, casual, engaging, informative',
245
+ },
246
+ includeHashtags: {
247
+ type: 'boolean',
248
+ description: 'Include relevant hashtags (default: true)',
249
+ },
250
+ includeLink: {
251
+ type: 'boolean',
252
+ description: 'Include link to article (default: true)',
253
+ },
254
+ },
255
+ required: ['contentId', 'platforms'],
256
+ },
257
+ },
258
+ {
259
+ name: 'publish_social_post',
260
+ description: 'Publish a social media post immediately. The post must be in draft status.',
261
+ inputSchema: {
262
+ type: 'object',
263
+ properties: {
264
+ postId: {
265
+ type: 'string',
266
+ description: 'The ID of the social post to publish',
267
+ },
268
+ },
269
+ required: ['postId'],
270
+ },
271
+ },
272
+ {
273
+ name: 'schedule_social_post',
274
+ description: 'Schedule a social media post for later publication.',
275
+ inputSchema: {
276
+ type: 'object',
277
+ properties: {
278
+ postId: {
279
+ type: 'string',
280
+ description: 'The ID of the social post to schedule',
281
+ },
282
+ scheduledFor: {
283
+ type: 'string',
284
+ description: 'ISO date string for when to publish (e.g., 2024-01-15T10:00:00Z)',
285
+ },
286
+ },
287
+ required: ['postId', 'scheduledFor'],
288
+ },
289
+ },
290
+ ];
291
+ //# sourceMappingURL=social.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"social.js","sourceRoot":"","sources":["../../src/tools/social.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAmCH,sDA4BC;AAKD,0CAmEC;AAKD,kDAkCC;AAKD,8CAqBC;AAKD,gDAoBC;AA/ND,6BAAwB;AAGxB,eAAe;AACF,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE3C,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IACjE,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IACjF,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IAC/F,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;CACzF,CAAC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