@heyseo/mcp-server 0.2.0 → 0.2.1
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/README.md +133 -56
- package/dist/index.js +492 -293
- package/dist/index.js.map +1 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +93 -0
- package/dist/prompts/index.js.map +1 -1
- package/dist/resources/index.d.ts +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +135 -4
- package/dist/resources/index.js.map +1 -1
- package/dist/tools/comparison.d.ts +1 -1
- package/dist/tools/index.d.ts +37 -458
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +56 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/indexing.d.ts +94 -0
- package/dist/tools/indexing.d.ts.map +1 -0
- package/dist/tools/indexing.js +99 -0
- package/dist/tools/indexing.js.map +1 -0
- package/dist/tools/insights.d.ts +38 -0
- package/dist/tools/insights.d.ts.map +1 -0
- package/dist/tools/insights.js +58 -0
- package/dist/tools/insights.js.map +1 -0
- package/dist/tools/memory.d.ts +329 -0
- package/dist/tools/memory.d.ts.map +1 -0
- package/dist/tools/memory.js +242 -0
- package/dist/tools/memory.js.map +1 -0
- package/dist/tools/onpage.d.ts +37 -0
- package/dist/tools/onpage.d.ts.map +1 -0
- package/dist/tools/onpage.js +46 -0
- package/dist/tools/onpage.js.map +1 -0
- package/dist/tools/reports.d.ts +74 -0
- package/dist/tools/reports.d.ts.map +1 -0
- package/dist/tools/reports.js +92 -0
- package/dist/tools/reports.js.map +1 -0
- package/dist/tools/serp.d.ts +55 -0
- package/dist/tools/serp.d.ts.map +1 -0
- package/dist/tools/serp.js +47 -0
- package/dist/tools/serp.js.map +1 -0
- package/dist/tools/sitemaps.d.ts +30 -0
- package/dist/tools/sitemaps.d.ts.map +1 -0
- package/dist/tools/sitemaps.js +44 -0
- package/dist/tools/sitemaps.js.map +1 -0
- package/dist/tools/tasks.d.ts +14 -14
- package/dist/types.d.ts +138 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/api-client.d.ts +55 -1
- package/dist/utils/api-client.d.ts.map +1 -1
- package/dist/utils/api-client.js +126 -1
- package/dist/utils/api-client.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SEO Memory Tools
|
|
3
|
+
* Tools for accessing and updating the SEO memory system (strategy, goals, actions, learnings)
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export const getMemorySchema = z.object({
|
|
7
|
+
siteId: z.string().describe('The ID of the site'),
|
|
8
|
+
});
|
|
9
|
+
export const updateStrategySchema = z.object({
|
|
10
|
+
siteId: z.string().describe('The ID of the site'),
|
|
11
|
+
action: z.enum(['update_summary', 'create_goal', 'update_goal']).describe('The action to perform'),
|
|
12
|
+
strategySummary: z.string().optional().describe('New strategy summary (for update_summary)'),
|
|
13
|
+
goalType: z.enum(['clicks', 'position', 'ctr', 'traffic', 'ranking', 'custom']).optional().describe('Goal type (for create_goal)'),
|
|
14
|
+
goalDescription: z.string().optional().describe('Goal description'),
|
|
15
|
+
goalTargetValue: z.number().optional().describe('Goal target value'),
|
|
16
|
+
goalCurrentValue: z.number().optional().describe('Goal current value'),
|
|
17
|
+
goalTargetDate: z.string().optional().describe('Goal target date (YYYY-MM-DD)'),
|
|
18
|
+
goalId: z.string().optional().describe('Goal ID (for update_goal)'),
|
|
19
|
+
goalStatus: z.enum(['active', 'achieved', 'missed', 'paused']).optional().describe('Goal status (for update_goal)'),
|
|
20
|
+
});
|
|
21
|
+
export const recordActionSchema = z.object({
|
|
22
|
+
siteId: z.string().describe('The ID of the site'),
|
|
23
|
+
title: z.string().describe('Title of the SEO action taken'),
|
|
24
|
+
description: z.string().describe('Description of what was done'),
|
|
25
|
+
category: z.enum(['technical', 'content', 'links', 'ux']).describe('Category of the action'),
|
|
26
|
+
hypothesis: z.string().optional().describe('What you expect to happen'),
|
|
27
|
+
targetMetrics: z.array(z.string()).optional().describe('Metrics to track'),
|
|
28
|
+
measurementDays: z.number().optional().default(28).describe('Days to measure impact'),
|
|
29
|
+
goalId: z.string().optional().describe('Link to a goal'),
|
|
30
|
+
});
|
|
31
|
+
export const addLearningSchema = z.object({
|
|
32
|
+
siteId: z.string().describe('The ID of the site'),
|
|
33
|
+
type: z.enum(['fact', 'pattern']).describe('Type of learning to add'),
|
|
34
|
+
fact: z.string().optional().describe('A key fact about the site (for type=fact)'),
|
|
35
|
+
pattern: z.string().optional().describe('A success pattern observed (for type=pattern)'),
|
|
36
|
+
evidence: z.string().optional().describe('Evidence for the pattern'),
|
|
37
|
+
applicableCategories: z.array(z.enum(['technical', 'content', 'links', 'ux'])).optional().describe('Which categories this pattern applies to'),
|
|
38
|
+
confidence: z.enum(['high', 'medium', 'low']).optional().default('low').describe('Confidence level'),
|
|
39
|
+
});
|
|
40
|
+
export async function executeGetMemory(client, input) {
|
|
41
|
+
try {
|
|
42
|
+
const context = await client.getMemoryContext(input.siteId);
|
|
43
|
+
const summary = {
|
|
44
|
+
success: true,
|
|
45
|
+
healthTrend: context.healthTrend,
|
|
46
|
+
};
|
|
47
|
+
if (context.strategy) {
|
|
48
|
+
summary.strategy = {
|
|
49
|
+
summary: context.strategy.strategySummary || '(no strategy set)',
|
|
50
|
+
activeGoals: context.activeGoals.length,
|
|
51
|
+
pendingActions: context.pendingActions.length,
|
|
52
|
+
goals: context.activeGoals.map(g => ({
|
|
53
|
+
id: g.id,
|
|
54
|
+
type: g.type,
|
|
55
|
+
description: g.description,
|
|
56
|
+
progress: `${g.progress}%`,
|
|
57
|
+
target: g.targetValue,
|
|
58
|
+
current: g.currentValue,
|
|
59
|
+
status: g.status,
|
|
60
|
+
})),
|
|
61
|
+
updatedAt: context.strategy.updatedAt,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
summary.strategy = null;
|
|
66
|
+
}
|
|
67
|
+
if (context.learnings) {
|
|
68
|
+
summary.learnings = {
|
|
69
|
+
keyFactsCount: context.learnings.keyFacts.length,
|
|
70
|
+
keyFacts: context.learnings.keyFacts.slice(0, 10),
|
|
71
|
+
successPatternsCount: context.learnings.successPatterns.length,
|
|
72
|
+
trajectory: context.learnings.trajectory,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
summary.learnings = null;
|
|
77
|
+
}
|
|
78
|
+
summary.recentSnapshots = context.recentSnapshots.length;
|
|
79
|
+
return JSON.stringify(summary, null, 2);
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
return JSON.stringify({ success: false, error: error instanceof Error ? error.message : 'Unknown error' });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export async function executeUpdateStrategy(client, input) {
|
|
86
|
+
try {
|
|
87
|
+
if (input.action === 'update_summary') {
|
|
88
|
+
if (!input.strategySummary) {
|
|
89
|
+
return JSON.stringify({ success: false, error: 'strategySummary is required for update_summary action' });
|
|
90
|
+
}
|
|
91
|
+
await client.updateStrategy(input.siteId, input.strategySummary);
|
|
92
|
+
return JSON.stringify({ success: true, message: 'Strategy summary updated' });
|
|
93
|
+
}
|
|
94
|
+
if (input.action === 'create_goal') {
|
|
95
|
+
if (!input.goalType || !input.goalDescription || input.goalTargetValue === undefined) {
|
|
96
|
+
return JSON.stringify({ success: false, error: 'goalType, goalDescription, and goalTargetValue are required for create_goal action' });
|
|
97
|
+
}
|
|
98
|
+
const goal = await client.createGoal(input.siteId, {
|
|
99
|
+
type: input.goalType,
|
|
100
|
+
description: input.goalDescription,
|
|
101
|
+
targetValue: input.goalTargetValue,
|
|
102
|
+
currentValue: input.goalCurrentValue,
|
|
103
|
+
targetDate: input.goalTargetDate,
|
|
104
|
+
});
|
|
105
|
+
return JSON.stringify({ success: true, goal }, null, 2);
|
|
106
|
+
}
|
|
107
|
+
if (input.action === 'update_goal') {
|
|
108
|
+
if (!input.goalId) {
|
|
109
|
+
return JSON.stringify({ success: false, error: 'goalId is required for update_goal action' });
|
|
110
|
+
}
|
|
111
|
+
const updates = {};
|
|
112
|
+
if (input.goalStatus)
|
|
113
|
+
updates.status = input.goalStatus;
|
|
114
|
+
if (input.goalCurrentValue !== undefined)
|
|
115
|
+
updates.currentValue = input.goalCurrentValue;
|
|
116
|
+
if (input.goalDescription)
|
|
117
|
+
updates.description = input.goalDescription;
|
|
118
|
+
if (input.goalTargetValue !== undefined)
|
|
119
|
+
updates.targetValue = input.goalTargetValue;
|
|
120
|
+
const goal = await client.updateGoal(input.siteId, input.goalId, updates);
|
|
121
|
+
return JSON.stringify({ success: true, goal }, null, 2);
|
|
122
|
+
}
|
|
123
|
+
return JSON.stringify({ success: false, error: `Unknown action: ${input.action}` });
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
return JSON.stringify({ success: false, error: error instanceof Error ? error.message : 'Unknown error' });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
export async function executeRecordAction(client, input) {
|
|
130
|
+
try {
|
|
131
|
+
const action = await client.recordAction(input.siteId, {
|
|
132
|
+
title: input.title,
|
|
133
|
+
description: input.description,
|
|
134
|
+
category: input.category,
|
|
135
|
+
hypothesis: input.hypothesis,
|
|
136
|
+
targetMetrics: input.targetMetrics,
|
|
137
|
+
measurementDays: input.measurementDays,
|
|
138
|
+
goalId: input.goalId,
|
|
139
|
+
});
|
|
140
|
+
return JSON.stringify({ success: true, action }, null, 2);
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
return JSON.stringify({ success: false, error: error instanceof Error ? error.message : 'Unknown error' });
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
export async function executeAddLearning(client, input) {
|
|
147
|
+
try {
|
|
148
|
+
const result = await client.addLearning(input.siteId, {
|
|
149
|
+
type: input.type,
|
|
150
|
+
fact: input.fact,
|
|
151
|
+
pattern: input.pattern,
|
|
152
|
+
evidence: input.evidence,
|
|
153
|
+
applicableCategories: input.applicableCategories,
|
|
154
|
+
confidence: input.confidence,
|
|
155
|
+
});
|
|
156
|
+
return JSON.stringify({ success: true, ...result }, null, 2);
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
return JSON.stringify({ success: false, error: error instanceof Error ? error.message : 'Unknown error' });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
export const memoryTools = [
|
|
163
|
+
{
|
|
164
|
+
name: 'heyseo_get_memory',
|
|
165
|
+
description: `Get the full SEO memory context for a site.
|
|
166
|
+
|
|
167
|
+
Returns the site's SEO strategy summary, active goals with progress, recent performance snapshots, key learnings (facts and patterns), and overall health trend. This provides persistent context about the site's SEO journey.`,
|
|
168
|
+
inputSchema: {
|
|
169
|
+
type: 'object',
|
|
170
|
+
properties: {
|
|
171
|
+
siteId: { type: 'string', description: 'The ID of the site' },
|
|
172
|
+
},
|
|
173
|
+
required: ['siteId'],
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: 'heyseo_update_strategy',
|
|
178
|
+
description: `Update SEO strategy, create goals, or update goal progress.
|
|
179
|
+
|
|
180
|
+
Actions:
|
|
181
|
+
- update_summary: Set the overall SEO strategy summary
|
|
182
|
+
- create_goal: Create a new SEO goal (clicks, position, CTR, traffic, ranking, custom)
|
|
183
|
+
- update_goal: Update a goal's status or progress`,
|
|
184
|
+
inputSchema: {
|
|
185
|
+
type: 'object',
|
|
186
|
+
properties: {
|
|
187
|
+
siteId: { type: 'string', description: 'The ID of the site' },
|
|
188
|
+
action: { type: 'string', enum: ['update_summary', 'create_goal', 'update_goal'], description: 'Action to perform' },
|
|
189
|
+
strategySummary: { type: 'string', description: 'New strategy summary (for update_summary)' },
|
|
190
|
+
goalType: { type: 'string', enum: ['clicks', 'position', 'ctr', 'traffic', 'ranking', 'custom'], description: 'Goal type' },
|
|
191
|
+
goalDescription: { type: 'string', description: 'Goal description' },
|
|
192
|
+
goalTargetValue: { type: 'number', description: 'Goal target value' },
|
|
193
|
+
goalCurrentValue: { type: 'number', description: 'Current value' },
|
|
194
|
+
goalTargetDate: { type: 'string', description: 'Target date (YYYY-MM-DD)' },
|
|
195
|
+
goalId: { type: 'string', description: 'Goal ID (for update_goal)' },
|
|
196
|
+
goalStatus: { type: 'string', enum: ['active', 'achieved', 'missed', 'paused'], description: 'Goal status' },
|
|
197
|
+
},
|
|
198
|
+
required: ['siteId', 'action'],
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: 'heyseo_record_action',
|
|
203
|
+
description: `Record an SEO action that was taken on the site.
|
|
204
|
+
|
|
205
|
+
Track what changes were made, the hypothesis behind them, and which metrics to monitor. The system will track the action's impact over a measurement period (default 28 days).`,
|
|
206
|
+
inputSchema: {
|
|
207
|
+
type: 'object',
|
|
208
|
+
properties: {
|
|
209
|
+
siteId: { type: 'string', description: 'The ID of the site' },
|
|
210
|
+
title: { type: 'string', description: 'Title of the action taken' },
|
|
211
|
+
description: { type: 'string', description: 'Description of the action' },
|
|
212
|
+
category: { type: 'string', enum: ['technical', 'content', 'links', 'ux'], description: 'Category' },
|
|
213
|
+
hypothesis: { type: 'string', description: 'What you expect to happen' },
|
|
214
|
+
targetMetrics: { type: 'array', items: { type: 'string' }, description: 'Metrics to track' },
|
|
215
|
+
measurementDays: { type: 'number', minimum: 7, maximum: 90, default: 28, description: 'Days to measure' },
|
|
216
|
+
goalId: { type: 'string', description: 'Link to a goal' },
|
|
217
|
+
},
|
|
218
|
+
required: ['siteId', 'title', 'description', 'category'],
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'heyseo_add_learning',
|
|
223
|
+
description: `Add a key fact or success pattern to the site's learning memory.
|
|
224
|
+
|
|
225
|
+
- type=fact: Add a key fact about the site (e.g., "Site migrated to Next.js in January 2025")
|
|
226
|
+
- type=pattern: Add a success pattern observed (e.g., "Long-form guides rank better for informational queries")`,
|
|
227
|
+
inputSchema: {
|
|
228
|
+
type: 'object',
|
|
229
|
+
properties: {
|
|
230
|
+
siteId: { type: 'string', description: 'The ID of the site' },
|
|
231
|
+
type: { type: 'string', enum: ['fact', 'pattern'], description: 'Type of learning' },
|
|
232
|
+
fact: { type: 'string', description: 'A key fact (for type=fact)' },
|
|
233
|
+
pattern: { type: 'string', description: 'A success pattern (for type=pattern)' },
|
|
234
|
+
evidence: { type: 'string', description: 'Evidence for the pattern' },
|
|
235
|
+
applicableCategories: { type: 'array', items: { type: 'string', enum: ['technical', 'content', 'links', 'ux'] }, description: 'Applicable categories' },
|
|
236
|
+
confidence: { type: 'string', enum: ['high', 'medium', 'low'], default: 'low', description: 'Confidence level' },
|
|
237
|
+
},
|
|
238
|
+
required: ['siteId', 'type'],
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
];
|
|
242
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/tools/memory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;CAClD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IAClG,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAC5F,QAAQ,EAA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,UAAU,EAAE;gBACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;gBAC7D,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,EAAE,kBAAkB,EAAE;gBACpF,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;gBACnE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sCAAsC,EAAE;gBAChF,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0BAA0B,EAAE;gBACrE,oBAAoB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE;gBACvJ,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE;aACjH;YACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC;SAC7B;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* On-Page Audit Tools
|
|
3
|
+
* Tools for running on-page SEO analysis
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import type { HeySeoApiClient } from '../utils/api-client.js';
|
|
7
|
+
export declare const onpageAuditSchema: z.ZodObject<{
|
|
8
|
+
url: z.ZodString;
|
|
9
|
+
siteId: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
url: string;
|
|
12
|
+
siteId?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
url: string;
|
|
15
|
+
siteId?: string | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
export type OnpageAuditInput = z.infer<typeof onpageAuditSchema>;
|
|
18
|
+
export declare function executeOnpageAudit(client: HeySeoApiClient, input: OnpageAuditInput): Promise<string>;
|
|
19
|
+
export declare const onpageTools: {
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: string;
|
|
24
|
+
properties: {
|
|
25
|
+
url: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
siteId: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
required: string[];
|
|
35
|
+
};
|
|
36
|
+
}[];
|
|
37
|
+
//# sourceMappingURL=onpage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onpage.d.ts","sourceRoot":"","sources":["../../src/tools/onpage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,MAAM,CAAC,CAWjB;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;GAuBvB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* On-Page Audit Tools
|
|
3
|
+
* Tools for running on-page SEO analysis
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export const onpageAuditSchema = z.object({
|
|
7
|
+
url: z.string().describe('The URL to audit'),
|
|
8
|
+
siteId: z.string().optional().describe('Optional site ID to associate the audit with'),
|
|
9
|
+
});
|
|
10
|
+
export async function executeOnpageAudit(client, input) {
|
|
11
|
+
try {
|
|
12
|
+
const result = await client.analyzeOnPage(input.url, input.siteId);
|
|
13
|
+
return JSON.stringify({
|
|
14
|
+
success: true,
|
|
15
|
+
audit: result,
|
|
16
|
+
}, null, 2);
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
return JSON.stringify({ success: false, error: error instanceof Error ? error.message : 'Unknown error' });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export const onpageTools = [
|
|
23
|
+
{
|
|
24
|
+
name: 'heyseo_onpage_audit',
|
|
25
|
+
description: `Run a full on-page SEO audit on a URL.
|
|
26
|
+
|
|
27
|
+
Analyzes the page and returns:
|
|
28
|
+
- SEO score (0-100)
|
|
29
|
+
- Meta tags (title, description, Open Graph, Twitter Cards)
|
|
30
|
+
- Heading structure (H1-H6 hierarchy)
|
|
31
|
+
- Word count and content analysis
|
|
32
|
+
- Internal and external links
|
|
33
|
+
- Image optimization (alt text, sizes)
|
|
34
|
+
- Structured data detection
|
|
35
|
+
- Issues found with severity levels`,
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
url: { type: 'string', description: 'The URL to audit' },
|
|
40
|
+
siteId: { type: 'string', description: 'Optional site ID to save the audit results' },
|
|
41
|
+
},
|
|
42
|
+
required: ['url'],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
//# sourceMappingURL=onpage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onpage.js","sourceRoot":"","sources":["../../src/tools/onpage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EA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 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reports Tools
|
|
3
|
+
* Tools for accessing AI-generated SEO reports
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import type { HeySeoApiClient } from '../utils/api-client.js';
|
|
7
|
+
export declare const listReportsSchema: z.ZodObject<{
|
|
8
|
+
siteId: z.ZodOptional<z.ZodString>;
|
|
9
|
+
type: z.ZodOptional<z.ZodEnum<["weekly", "monthly"]>>;
|
|
10
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
limit: number;
|
|
13
|
+
type?: "weekly" | "monthly" | undefined;
|
|
14
|
+
siteId?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
type?: "weekly" | "monthly" | undefined;
|
|
17
|
+
siteId?: string | undefined;
|
|
18
|
+
limit?: number | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export type ListReportsInput = z.infer<typeof listReportsSchema>;
|
|
21
|
+
export declare const getReportSchema: z.ZodObject<{
|
|
22
|
+
reportId: z.ZodString;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
reportId: string;
|
|
25
|
+
}, {
|
|
26
|
+
reportId: string;
|
|
27
|
+
}>;
|
|
28
|
+
export type GetReportInput = z.infer<typeof getReportSchema>;
|
|
29
|
+
export declare function executeListReports(client: HeySeoApiClient, input: ListReportsInput): Promise<string>;
|
|
30
|
+
export declare function executeGetReport(client: HeySeoApiClient, input: GetReportInput): Promise<string>;
|
|
31
|
+
export declare const reportTools: ({
|
|
32
|
+
name: string;
|
|
33
|
+
description: string;
|
|
34
|
+
inputSchema: {
|
|
35
|
+
type: string;
|
|
36
|
+
properties: {
|
|
37
|
+
siteId: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
type: {
|
|
42
|
+
type: string;
|
|
43
|
+
enum: string[];
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
limit: {
|
|
47
|
+
type: string;
|
|
48
|
+
minimum: number;
|
|
49
|
+
maximum: number;
|
|
50
|
+
default: number;
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
reportId?: undefined;
|
|
54
|
+
};
|
|
55
|
+
required: never[];
|
|
56
|
+
};
|
|
57
|
+
} | {
|
|
58
|
+
name: string;
|
|
59
|
+
description: string;
|
|
60
|
+
inputSchema: {
|
|
61
|
+
type: string;
|
|
62
|
+
properties: {
|
|
63
|
+
reportId: {
|
|
64
|
+
type: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
siteId?: undefined;
|
|
68
|
+
type?: undefined;
|
|
69
|
+
limit?: undefined;
|
|
70
|
+
};
|
|
71
|
+
required: string[];
|
|
72
|
+
};
|
|
73
|
+
})[];
|
|
74
|
+
//# sourceMappingURL=reports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.d.ts","sourceRoot":"","sources":["../../src/tools/reports.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAI5B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,eAAO,MAAM,eAAe;;;;;;EAE1B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE7D,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,MAAM,CAAC,CA2BjB;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,MAAM,CAAC,CAmBjB;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8BvB,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reports Tools
|
|
3
|
+
* Tools for accessing AI-generated SEO reports
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export const listReportsSchema = z.object({
|
|
7
|
+
siteId: z.string().optional().describe('Filter reports by site ID'),
|
|
8
|
+
type: z.enum(['weekly', 'monthly']).optional().describe('Filter by report type'),
|
|
9
|
+
limit: z.number().min(1).max(50).optional().default(10).describe('Number of reports to return'),
|
|
10
|
+
});
|
|
11
|
+
export const getReportSchema = z.object({
|
|
12
|
+
reportId: z.string().describe('The ID of the report to retrieve'),
|
|
13
|
+
});
|
|
14
|
+
export async function executeListReports(client, input) {
|
|
15
|
+
try {
|
|
16
|
+
const result = await client.getReports(input.siteId, input.type, input.limit);
|
|
17
|
+
if (result.reports.length === 0) {
|
|
18
|
+
return JSON.stringify({
|
|
19
|
+
success: true,
|
|
20
|
+
message: 'No reports found. Reports are generated automatically based on your schedule settings.',
|
|
21
|
+
total: 0,
|
|
22
|
+
reports: [],
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return JSON.stringify({
|
|
26
|
+
success: true,
|
|
27
|
+
total: result.total,
|
|
28
|
+
reports: result.reports.map(r => ({
|
|
29
|
+
id: r.id,
|
|
30
|
+
siteId: r.siteId,
|
|
31
|
+
type: r.type,
|
|
32
|
+
title: r.title,
|
|
33
|
+
createdAt: r.createdAt,
|
|
34
|
+
})),
|
|
35
|
+
}, null, 2);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
return JSON.stringify({ success: false, error: error instanceof Error ? error.message : 'Unknown error' });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export async function executeGetReport(client, input) {
|
|
42
|
+
try {
|
|
43
|
+
const report = await client.getReport(input.reportId);
|
|
44
|
+
return JSON.stringify({
|
|
45
|
+
success: true,
|
|
46
|
+
report: {
|
|
47
|
+
id: report.id,
|
|
48
|
+
siteId: report.siteId,
|
|
49
|
+
type: report.type,
|
|
50
|
+
title: report.title,
|
|
51
|
+
data: report.data,
|
|
52
|
+
aiAnalysis: report.aiAnalysis,
|
|
53
|
+
createdAt: report.createdAt,
|
|
54
|
+
},
|
|
55
|
+
}, null, 2);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
return JSON.stringify({ success: false, error: error instanceof Error ? error.message : 'Unknown error' });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export const reportTools = [
|
|
62
|
+
{
|
|
63
|
+
name: 'heyseo_list_reports',
|
|
64
|
+
description: `List AI-generated SEO reports for your sites.
|
|
65
|
+
|
|
66
|
+
Returns a list of reports with their type, title, and creation date.
|
|
67
|
+
Filter by site ID or report type (weekly/monthly).`,
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {
|
|
71
|
+
siteId: { type: 'string', description: 'Filter reports by site ID' },
|
|
72
|
+
type: { type: 'string', enum: ['weekly', 'monthly'], description: 'Filter by report type' },
|
|
73
|
+
limit: { type: 'number', minimum: 1, maximum: 50, default: 10, description: 'Number of reports to return' },
|
|
74
|
+
},
|
|
75
|
+
required: [],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'heyseo_get_report',
|
|
80
|
+
description: `Get the full details of a specific SEO report.
|
|
81
|
+
|
|
82
|
+
Returns the complete report including metrics data and AI-generated analysis with insights and recommendations.`,
|
|
83
|
+
inputSchema: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
properties: {
|
|
86
|
+
reportId: { type: 'string', description: 'The ID of the report to retrieve' },
|
|
87
|
+
},
|
|
88
|
+
required: ['reportId'],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
];
|
|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+
import type { HeySeoApiClient } from '../utils/api-client.js';
|
|
7
|
+
export declare const serpSearchSchema: z.ZodObject<{
|
|
8
|
+
query: z.ZodString;
|
|
9
|
+
siteId: z.ZodOptional<z.ZodString>;
|
|
10
|
+
country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
11
|
+
numResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
query: string;
|
|
14
|
+
country: string;
|
|
15
|
+
numResults: number;
|
|
16
|
+
siteId?: string | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
query: string;
|
|
19
|
+
country?: string | undefined;
|
|
20
|
+
siteId?: string | undefined;
|
|
21
|
+
numResults?: number | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
export type SerpSearchInput = z.infer<typeof serpSearchSchema>;
|
|
24
|
+
export declare function executeSerpSearch(client: HeySeoApiClient, input: SerpSearchInput): Promise<string>;
|
|
25
|
+
export declare const serpTools: {
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: string;
|
|
30
|
+
properties: {
|
|
31
|
+
query: {
|
|
32
|
+
type: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
siteId: {
|
|
36
|
+
type: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
country: {
|
|
40
|
+
type: string;
|
|
41
|
+
default: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
numResults: {
|
|
45
|
+
type: string;
|
|
46
|
+
minimum: number;
|
|
47
|
+
maximum: number;
|
|
48
|
+
default: number;
|
|
49
|
+
description: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
required: string[];
|
|
53
|
+
};
|
|
54
|
+
}[];
|
|
55
|
+
//# sourceMappingURL=serp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serp.d.ts","sourceRoot":"","sources":["../../src/tools/serp.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAK3B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/D,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiBrB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SERP Tools
|
|
3
|
+
* Tools for searching Google SERP
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export const serpSearchSchema = z.object({
|
|
7
|
+
query: z.string().describe('The search query to look up'),
|
|
8
|
+
siteId: z.string().optional().describe('Optional site ID for site presence detection in SERP results'),
|
|
9
|
+
country: z.string().optional().default('us').describe('Country code (e.g., us, gb, de)'),
|
|
10
|
+
numResults: z.number().min(1).max(100).optional().default(10).describe('Number of results to return'),
|
|
11
|
+
});
|
|
12
|
+
export async function executeSerpSearch(client, input) {
|
|
13
|
+
try {
|
|
14
|
+
const result = await client.searchSerp(input.query, {
|
|
15
|
+
siteId: input.siteId,
|
|
16
|
+
country: input.country,
|
|
17
|
+
numResults: input.numResults,
|
|
18
|
+
});
|
|
19
|
+
return JSON.stringify({
|
|
20
|
+
success: true,
|
|
21
|
+
query: input.query,
|
|
22
|
+
...result,
|
|
23
|
+
}, null, 2);
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
return JSON.stringify({ success: false, error: error instanceof Error ? error.message : 'Unknown error' });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export const serpTools = [
|
|
30
|
+
{
|
|
31
|
+
name: 'heyseo_serp_search',
|
|
32
|
+
description: `Search Google SERP for a keyword and see the current results.
|
|
33
|
+
|
|
34
|
+
Returns organic results with position, title, URL, and snippet. Also includes featured snippets, People Also Ask, and related searches. If a siteId is provided, it will detect your site's presence in the results.`,
|
|
35
|
+
inputSchema: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
query: { type: 'string', description: 'The search query' },
|
|
39
|
+
siteId: { type: 'string', description: 'Optional site ID for presence detection' },
|
|
40
|
+
country: { type: 'string', default: 'us', description: 'Country code (e.g., us, gb, de)' },
|
|
41
|
+
numResults: { type: 'number', minimum: 1, maximum: 100, default: 10, description: 'Number of results' },
|
|
42
|
+
},
|
|
43
|
+
required: ['query'],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
//# sourceMappingURL=serp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serp.js","sourceRoot":"","sources":["../../src/tools/serp.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8DAA8D,CAAC;IACtG,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IACxF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ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