validate_all_seo
Analyze website SEO performance using PageSpeed Insights and Lighthouse to identify optimization opportunities and improve search visibility.
Instructions
Run SEO analysis using PageSpeed Insights (includes Lighthouse SEO).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Implementation Reference
- src/orchestrator/run-all.ts:162-181 (handler)Core handler function implementing the validate_all_seo tool logic by running PageSpeed Insights with SEO category focus.export async function runAllSEO(url: string): Promise<AllSEOResult> { const results: AllSEOResult = { url, timestamp: new Date().toISOString(), summary: { tools_run: [], }, }; // Use PageSpeed Insights (includes Lighthouse SEO) const pagespeed = await analyzePageSpeed(url, { categories: ['seo'] }); results.pagespeed_seo = pagespeed; if (pagespeed.success) { results.summary.tools_run.push('pagespeed'); results.summary.seo_score = pagespeed.seo_score; } return results; }
- index.ts:260-270 (registration)Tool registration entry in the MCP tools list, defining name, description, and input schema.{ name: 'validate_all_seo', description: 'Run SEO analysis using PageSpeed Insights (includes Lighthouse SEO).', inputSchema: { type: 'object', properties: { url: { type: 'string' }, }, required: ['url'], }, },
- index.ts:417-421 (schema)Dispatcher handler case that performs input validation using AllSEOArgsSchema and invokes the runAllSEO implementation.case 'validate_all_seo': { const validatedArgs = AllSEOArgsSchema.parse(args); const result = await runAllSEO(validatedArgs.url); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- index.ts:94-96 (schema)Zod schema for input argument validation (requires URL).const AllSEOArgsSchema = z.object({ url: z.string().url(), });
- src/orchestrator/run-all.ts:51-59 (schema)TypeScript interface defining the structure of the tool's output result.export interface AllSEOResult { url: string; timestamp: string; pagespeed_seo?: PageSpeedResult; summary: { tools_run: string[]; seo_score?: number; }; }