@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,221 @@
1
+ /**
2
+ * Sources & Outreach Tools
3
+ *
4
+ * MCP tools for citation sources and outreach management.
5
+ */
6
+ import { z } from 'zod';
7
+ import { ReauditAPIClient } from '../lib/api-client.js';
8
+ export declare const getCitationSourcesSchema: z.ZodObject<{
9
+ projectId: z.ZodString;
10
+ type: z.ZodOptional<z.ZodString>;
11
+ limit: z.ZodOptional<z.ZodNumber>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ projectId: string;
14
+ limit?: number | undefined;
15
+ type?: string | undefined;
16
+ }, {
17
+ projectId: string;
18
+ limit?: number | undefined;
19
+ type?: string | undefined;
20
+ }>;
21
+ export declare const extractAuthorInfoSchema: z.ZodObject<{
22
+ url: z.ZodString;
23
+ }, "strip", z.ZodTypeAny, {
24
+ url: string;
25
+ }, {
26
+ url: string;
27
+ }>;
28
+ export declare const listOutreachOpportunitiesSchema: z.ZodObject<{
29
+ projectId: z.ZodString;
30
+ status: z.ZodOptional<z.ZodString>;
31
+ limit: z.ZodOptional<z.ZodNumber>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ projectId: string;
34
+ status?: string | undefined;
35
+ limit?: number | undefined;
36
+ }, {
37
+ projectId: string;
38
+ status?: string | undefined;
39
+ limit?: number | undefined;
40
+ }>;
41
+ export declare const createOutreachOpportunitySchema: z.ZodObject<{
42
+ projectId: z.ZodString;
43
+ articleUrl: z.ZodString;
44
+ articleTitle: z.ZodString;
45
+ authorName: z.ZodOptional<z.ZodString>;
46
+ authorEmail: z.ZodOptional<z.ZodString>;
47
+ authorBio: z.ZodOptional<z.ZodString>;
48
+ notes: z.ZodOptional<z.ZodString>;
49
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ projectId: string;
52
+ articleUrl: string;
53
+ articleTitle: string;
54
+ notes?: string | undefined;
55
+ authorName?: string | undefined;
56
+ authorEmail?: string | undefined;
57
+ authorBio?: string | undefined;
58
+ tags?: string[] | undefined;
59
+ }, {
60
+ projectId: string;
61
+ articleUrl: string;
62
+ articleTitle: string;
63
+ notes?: string | undefined;
64
+ authorName?: string | undefined;
65
+ authorEmail?: string | undefined;
66
+ authorBio?: string | undefined;
67
+ tags?: string[] | undefined;
68
+ }>;
69
+ /**
70
+ * Get citation sources tool handler
71
+ */
72
+ export declare function getCitationSources(client: ReauditAPIClient, args: z.infer<typeof getCitationSourcesSchema>): Promise<string>;
73
+ /**
74
+ * Extract author info tool handler
75
+ */
76
+ export declare function extractAuthorInfo(client: ReauditAPIClient, args: z.infer<typeof extractAuthorInfoSchema>): Promise<string>;
77
+ /**
78
+ * List outreach opportunities tool handler
79
+ */
80
+ export declare function listOutreachOpportunities(client: ReauditAPIClient, args: z.infer<typeof listOutreachOpportunitiesSchema>): Promise<string>;
81
+ /**
82
+ * Create outreach opportunity tool handler
83
+ */
84
+ export declare function createOutreachOpportunity(client: ReauditAPIClient, args: z.infer<typeof createOutreachOpportunitySchema>): Promise<string>;
85
+ /**
86
+ * Tool definitions for MCP
87
+ */
88
+ export declare const sourcesTools: ({
89
+ name: string;
90
+ description: string;
91
+ inputSchema: {
92
+ type: "object";
93
+ properties: {
94
+ projectId: {
95
+ type: string;
96
+ description: string;
97
+ };
98
+ type: {
99
+ type: string;
100
+ description: string;
101
+ };
102
+ limit: {
103
+ type: string;
104
+ description: string;
105
+ };
106
+ url?: undefined;
107
+ status?: undefined;
108
+ articleUrl?: undefined;
109
+ articleTitle?: undefined;
110
+ authorName?: undefined;
111
+ authorEmail?: undefined;
112
+ authorBio?: undefined;
113
+ notes?: undefined;
114
+ tags?: undefined;
115
+ };
116
+ required: string[];
117
+ };
118
+ } | {
119
+ name: string;
120
+ description: string;
121
+ inputSchema: {
122
+ type: "object";
123
+ properties: {
124
+ url: {
125
+ type: string;
126
+ description: string;
127
+ };
128
+ projectId?: undefined;
129
+ type?: undefined;
130
+ limit?: undefined;
131
+ status?: undefined;
132
+ articleUrl?: undefined;
133
+ articleTitle?: undefined;
134
+ authorName?: undefined;
135
+ authorEmail?: undefined;
136
+ authorBio?: undefined;
137
+ notes?: undefined;
138
+ tags?: undefined;
139
+ };
140
+ required: string[];
141
+ };
142
+ } | {
143
+ name: string;
144
+ description: string;
145
+ inputSchema: {
146
+ type: "object";
147
+ properties: {
148
+ projectId: {
149
+ type: string;
150
+ description: string;
151
+ };
152
+ status: {
153
+ type: string;
154
+ description: string;
155
+ };
156
+ limit: {
157
+ type: string;
158
+ description: string;
159
+ };
160
+ type?: undefined;
161
+ url?: undefined;
162
+ articleUrl?: undefined;
163
+ articleTitle?: undefined;
164
+ authorName?: undefined;
165
+ authorEmail?: undefined;
166
+ authorBio?: undefined;
167
+ notes?: undefined;
168
+ tags?: undefined;
169
+ };
170
+ required: string[];
171
+ };
172
+ } | {
173
+ name: string;
174
+ description: string;
175
+ inputSchema: {
176
+ type: "object";
177
+ properties: {
178
+ projectId: {
179
+ type: string;
180
+ description: string;
181
+ };
182
+ articleUrl: {
183
+ type: string;
184
+ description: string;
185
+ };
186
+ articleTitle: {
187
+ type: string;
188
+ description: string;
189
+ };
190
+ authorName: {
191
+ type: string;
192
+ description: string;
193
+ };
194
+ authorEmail: {
195
+ type: string;
196
+ description: string;
197
+ };
198
+ authorBio: {
199
+ type: string;
200
+ description: string;
201
+ };
202
+ notes: {
203
+ type: string;
204
+ description: string;
205
+ };
206
+ tags: {
207
+ type: string;
208
+ items: {
209
+ type: string;
210
+ };
211
+ description: string;
212
+ };
213
+ type?: undefined;
214
+ limit?: undefined;
215
+ url?: undefined;
216
+ status?: undefined;
217
+ };
218
+ required: string[];
219
+ };
220
+ })[];
221
+ //# sourceMappingURL=sources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../src/tools/sources.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAInC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;EAI1C,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS1C,CAAC;AAEH;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,GAC7C,OAAO,CAAC,MAAM,CAAC,CA0DjB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,GAC5C,OAAO,CAAC,MAAM,CAAC,CAoCjB;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,GACpD,OAAO,CAAC,MAAM,CAAC,CA+CjB;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,GACpD,OAAO,CAAC,MAAM,CAAC,CAwBjB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsGxB,CAAC"}
@@ -0,0 +1,308 @@
1
+ "use strict";
2
+ /**
3
+ * Sources & Outreach Tools
4
+ *
5
+ * MCP tools for citation sources and outreach management.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.sourcesTools = exports.createOutreachOpportunitySchema = exports.listOutreachOpportunitiesSchema = exports.extractAuthorInfoSchema = exports.getCitationSourcesSchema = void 0;
9
+ exports.getCitationSources = getCitationSources;
10
+ exports.extractAuthorInfo = extractAuthorInfo;
11
+ exports.listOutreachOpportunities = listOutreachOpportunities;
12
+ exports.createOutreachOpportunity = createOutreachOpportunity;
13
+ const zod_1 = require("zod");
14
+ // Tool schemas
15
+ exports.getCitationSourcesSchema = zod_1.z.object({
16
+ projectId: zod_1.z.string().describe('The ID of the project'),
17
+ type: zod_1.z.string().optional().describe('Filter by type: Brand, Third-party, or All'),
18
+ limit: zod_1.z.number().optional().describe('Maximum number of sources to return (default: 50)'),
19
+ });
20
+ exports.extractAuthorInfoSchema = zod_1.z.object({
21
+ url: zod_1.z.string().describe('The URL to extract author information from'),
22
+ });
23
+ exports.listOutreachOpportunitiesSchema = zod_1.z.object({
24
+ projectId: zod_1.z.string().describe('The ID of the project'),
25
+ status: zod_1.z.string().optional().describe('Filter by status: discovered, contacted, responded, converted, rejected'),
26
+ limit: zod_1.z.number().optional().describe('Maximum number of opportunities to return (default: 20)'),
27
+ });
28
+ exports.createOutreachOpportunitySchema = zod_1.z.object({
29
+ projectId: zod_1.z.string().describe('The ID of the project'),
30
+ articleUrl: zod_1.z.string().describe('URL of the article'),
31
+ articleTitle: zod_1.z.string().describe('Title of the article'),
32
+ authorName: zod_1.z.string().optional().describe('Name of the author'),
33
+ authorEmail: zod_1.z.string().optional().describe('Email of the author'),
34
+ authorBio: zod_1.z.string().optional().describe('Bio of the author'),
35
+ notes: zod_1.z.string().optional().describe('Notes about this opportunity'),
36
+ tags: zod_1.z.array(zod_1.z.string()).optional().describe('Tags for categorization'),
37
+ });
38
+ /**
39
+ * Get citation sources tool handler
40
+ */
41
+ async function getCitationSources(client, args) {
42
+ const result = await client.getCitationSources(args.projectId, {
43
+ type: args.type,
44
+ limit: args.limit,
45
+ });
46
+ if (result.sources.length === 0) {
47
+ return 'No citation sources found. Run AI visibility queries to discover sources citing your content.';
48
+ }
49
+ let response = `## Citation Sources\n\n`;
50
+ response += `### Summary\n`;
51
+ response += `- **Total Sources:** ${result.stats.totalSources}\n`;
52
+ response += `- **Brand Sources:** ${result.stats.brandSources}\n`;
53
+ response += `- **Third-party Sources:** ${result.stats.thirdPartySources}\n`;
54
+ response += `- **Total Citations:** ${result.stats.totalCitations}\n\n`;
55
+ if (Object.keys(result.stats.modelBreakdown).length > 0) {
56
+ response += `### Citations by AI Model\n`;
57
+ for (const [model, count] of Object.entries(result.stats.modelBreakdown)) {
58
+ response += `- **${model}:** ${count}\n`;
59
+ }
60
+ response += '\n';
61
+ }
62
+ response += `### Sources (${result.sources.length})\n\n`;
63
+ // Group by type
64
+ const brandSources = result.sources.filter(s => s.type === 'Brand');
65
+ const thirdPartySources = result.sources.filter(s => s.type === 'Third-party');
66
+ if (brandSources.length > 0) {
67
+ response += `#### Brand Sources\n`;
68
+ for (const source of brandSources.slice(0, 10)) {
69
+ response += `- **${source.title}**\n`;
70
+ response += ` - URL: ${source.url}\n`;
71
+ response += ` - Domain: ${source.domain}\n`;
72
+ response += ` - Frequency: ${source.frequency} citations\n`;
73
+ response += ` - Models: ${source.models.join(', ')}\n`;
74
+ response += ` - Prompts: ${source.promptCount}\n`;
75
+ }
76
+ response += '\n';
77
+ }
78
+ if (thirdPartySources.length > 0) {
79
+ response += `#### Third-party Sources\n`;
80
+ for (const source of thirdPartySources.slice(0, 15)) {
81
+ response += `- **${source.title}**\n`;
82
+ response += ` - URL: ${source.url}\n`;
83
+ response += ` - Domain: ${source.domain}\n`;
84
+ response += ` - Frequency: ${source.frequency} citations\n`;
85
+ response += ` - Models: ${source.models.join(', ')}\n`;
86
+ }
87
+ response += '\n';
88
+ }
89
+ return response;
90
+ }
91
+ /**
92
+ * Extract author info tool handler
93
+ */
94
+ async function extractAuthorInfo(client, args) {
95
+ const result = await client.extractAuthorInfo(args.url);
96
+ if (!result.found) {
97
+ return `Could not extract author information from ${args.url}. ${result.message || 'The page may not have structured author data.'}`;
98
+ }
99
+ const author = result.author;
100
+ let response = `## Author Information Extracted\n\n`;
101
+ if (author.name)
102
+ response += `- **Name:** ${author.name}\n`;
103
+ if (author.email)
104
+ response += `- **Email:** ${author.email}\n`;
105
+ if (author.bio)
106
+ response += `- **Bio:** ${author.bio}\n`;
107
+ if (author.imageUrl)
108
+ response += `- **Image:** ${author.imageUrl}\n`;
109
+ if (author.socialLinks && Object.keys(author.socialLinks).length > 0) {
110
+ response += `\n### Social Links\n`;
111
+ for (const [platform, url] of Object.entries(author.socialLinks)) {
112
+ response += `- **${platform}:** ${url}\n`;
113
+ }
114
+ }
115
+ if (author.articleTitle) {
116
+ response += `\n### Article\n`;
117
+ response += `- **Title:** ${author.articleTitle}\n`;
118
+ if (author.articleExcerpt) {
119
+ response += `- **Excerpt:** ${author.articleExcerpt}\n`;
120
+ }
121
+ }
122
+ if (author.confidence) {
123
+ response += `\n*Confidence: ${Math.round(author.confidence * 100)}%*`;
124
+ }
125
+ return response;
126
+ }
127
+ /**
128
+ * List outreach opportunities tool handler
129
+ */
130
+ async function listOutreachOpportunities(client, args) {
131
+ const result = await client.listOutreachOpportunities(args.projectId, {
132
+ status: args.status,
133
+ limit: args.limit,
134
+ });
135
+ if (result.opportunities.length === 0) {
136
+ return 'No outreach opportunities found. Create opportunities manually or discover them from citation sources.';
137
+ }
138
+ let response = `## Outreach Opportunities (${result.pagination.total} total)\n\n`;
139
+ if (Object.keys(result.statusCounts).length > 0) {
140
+ response += `### Status Summary\n`;
141
+ for (const [status, count] of Object.entries(result.statusCounts)) {
142
+ response += `- **${status}:** ${count}\n`;
143
+ }
144
+ response += '\n';
145
+ }
146
+ response += `### Opportunities\n\n`;
147
+ for (const opp of result.opportunities) {
148
+ const statusEmoji = opp.status === 'converted' ? '✅' :
149
+ opp.status === 'responded' ? '💬' :
150
+ opp.status === 'contacted' ? '📧' :
151
+ opp.status === 'rejected' ? '❌' : '🔍';
152
+ response += `#### ${statusEmoji} ${opp.articleTitle}\n`;
153
+ response += `- **ID:** ${opp.id}\n`;
154
+ response += `- **URL:** ${opp.articleUrl}\n`;
155
+ response += `- **Domain:** ${opp.articleDomain}\n`;
156
+ response += `- **Status:** ${opp.status}\n`;
157
+ if (opp.authorName)
158
+ response += `- **Author:** ${opp.authorName}\n`;
159
+ if (opp.authorEmail)
160
+ response += `- **Email:** ${opp.authorEmail}\n`;
161
+ if (opp.discoveredFrom)
162
+ response += `- **Source:** ${opp.discoveredFrom}\n`;
163
+ if (opp.notes)
164
+ response += `- **Notes:** ${opp.notes}\n`;
165
+ if (opp.tags && opp.tags.length > 0)
166
+ response += `- **Tags:** ${opp.tags.join(', ')}\n`;
167
+ response += `- **Created:** ${new Date(opp.createdAt).toLocaleDateString()}\n`;
168
+ response += '\n';
169
+ }
170
+ if (result.pagination.totalPages > 1) {
171
+ response += `\n*Page ${result.pagination.page} of ${result.pagination.totalPages}*`;
172
+ }
173
+ return response;
174
+ }
175
+ /**
176
+ * Create outreach opportunity tool handler
177
+ */
178
+ async function createOutreachOpportunity(client, args) {
179
+ const result = await client.createOutreachOpportunity({
180
+ projectId: args.projectId,
181
+ articleUrl: args.articleUrl,
182
+ articleTitle: args.articleTitle,
183
+ authorName: args.authorName,
184
+ authorEmail: args.authorEmail,
185
+ authorBio: args.authorBio,
186
+ notes: args.notes,
187
+ tags: args.tags,
188
+ });
189
+ const opp = result.opportunity;
190
+ let response = `## Outreach Opportunity Created\n\n`;
191
+ response += `- **ID:** ${opp.id}\n`;
192
+ response += `- **Title:** ${opp.articleTitle}\n`;
193
+ response += `- **URL:** ${opp.articleUrl}\n`;
194
+ response += `- **Domain:** ${opp.articleDomain}\n`;
195
+ response += `- **Status:** ${opp.status}\n`;
196
+ if (opp.authorName)
197
+ response += `- **Author:** ${opp.authorName}\n`;
198
+ if (opp.authorEmail)
199
+ response += `- **Email:** ${opp.authorEmail}\n`;
200
+ return response;
201
+ }
202
+ /**
203
+ * Tool definitions for MCP
204
+ */
205
+ exports.sourcesTools = [
206
+ {
207
+ name: 'get_citation_sources',
208
+ description: 'Get all citation sources for a project showing which URLs are being cited by AI models, their frequency, and which models cite them.',
209
+ inputSchema: {
210
+ type: 'object',
211
+ properties: {
212
+ projectId: {
213
+ type: 'string',
214
+ description: 'The ID of the project',
215
+ },
216
+ type: {
217
+ type: 'string',
218
+ description: 'Filter by type: Brand (your own content), Third-party (external sources), or All',
219
+ },
220
+ limit: {
221
+ type: 'number',
222
+ description: 'Maximum number of sources to return (default: 50)',
223
+ },
224
+ },
225
+ required: ['projectId'],
226
+ },
227
+ },
228
+ {
229
+ name: 'extract_author_info',
230
+ description: 'Extract author information from a URL including name, email, bio, and social links. Useful for outreach preparation.',
231
+ inputSchema: {
232
+ type: 'object',
233
+ properties: {
234
+ url: {
235
+ type: 'string',
236
+ description: 'The URL to extract author information from',
237
+ },
238
+ },
239
+ required: ['url'],
240
+ },
241
+ },
242
+ {
243
+ name: 'list_outreach_opportunities',
244
+ description: 'List outreach opportunities for a project. These are potential contacts for link building or content collaboration.',
245
+ inputSchema: {
246
+ type: 'object',
247
+ properties: {
248
+ projectId: {
249
+ type: 'string',
250
+ description: 'The ID of the project',
251
+ },
252
+ status: {
253
+ type: 'string',
254
+ description: 'Filter by status: discovered, contacted, responded, converted, rejected',
255
+ },
256
+ limit: {
257
+ type: 'number',
258
+ description: 'Maximum number of opportunities to return (default: 20)',
259
+ },
260
+ },
261
+ required: ['projectId'],
262
+ },
263
+ },
264
+ {
265
+ name: 'create_outreach_opportunity',
266
+ description: 'Create a new outreach opportunity manually. Use this to track potential link building or collaboration contacts.',
267
+ inputSchema: {
268
+ type: 'object',
269
+ properties: {
270
+ projectId: {
271
+ type: 'string',
272
+ description: 'The ID of the project',
273
+ },
274
+ articleUrl: {
275
+ type: 'string',
276
+ description: 'URL of the article',
277
+ },
278
+ articleTitle: {
279
+ type: 'string',
280
+ description: 'Title of the article',
281
+ },
282
+ authorName: {
283
+ type: 'string',
284
+ description: 'Name of the author',
285
+ },
286
+ authorEmail: {
287
+ type: 'string',
288
+ description: 'Email of the author',
289
+ },
290
+ authorBio: {
291
+ type: 'string',
292
+ description: 'Bio of the author',
293
+ },
294
+ notes: {
295
+ type: 'string',
296
+ description: 'Notes about this opportunity',
297
+ },
298
+ tags: {
299
+ type: 'array',
300
+ items: { type: 'string' },
301
+ description: 'Tags for categorization',
302
+ },
303
+ },
304
+ required: ['projectId', 'articleUrl', 'articleTitle'],
305
+ },
306
+ },
307
+ ];
308
+ //# sourceMappingURL=sources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources.js","sourceRoot":"","sources":["../../src/tools/sources.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAoCH,gDA6DC;AAKD,8CAuCC;AAKD,8DAkDC;AAKD,8DA2BC;AAlOD,6BAAwB;AAGxB,eAAe;AACF,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACvD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;IAClF,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;CAC3F,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;CACvE,CAAC,CAAC;AAEU,QAAA,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IACtD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACvD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yEAAyE,CAAC;IACjH,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;CACjG,CAAC,CAAC;AAEU,QAAA,+BAA+B,GAAG,OAA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