validate_all_seo
Run SEO analysis using PageSpeed Insights to validate website optimization for search engines through automated testing.
Instructions
Run SEO analysis using PageSpeed Insights (includes Lighthouse SEO).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Implementation Reference
- src/orchestrator/run-all.ts:162-181 (handler)Core handler function implementing validate_all_seo tool logic by running PageSpeed Insights SEO analysis.
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:417-421 (handler)MCP server dispatcher handler that validates input and delegates to runAllSEO.
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:260-270 (registration)Tool registration definition including 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:94-96 (schema)Zod schema used for input argument validation in the tool handler.
const AllSEOArgsSchema = z.object({ url: z.string().url(), }); - src/orchestrator/run-all.ts:51-59 (schema)TypeScript interface defining the output structure of the SEO validation result.
export interface AllSEOResult { url: string; timestamp: string; pagespeed_seo?: PageSpeedResult; summary: { tools_run: string[]; seo_score?: number; }; }