/** * WordPress SEO Tools - Main Module * * This module provides comprehensive SEO management functionality for WordPress * through the MCP protocol. It combines content analysis, metadata generation, * schema markup, and optimization capabilities in a modular architecture. * * Features: * - Content analysis for readability and keyword optimization * - Metadata generation with AI assistance and safety filters * - Schema markup generation and validation * - Internal linking optimization * - Site audits and Core Web Vitals monitoring * - Bulk operations with progress tracking * * @since 2.7.0 */ import { WordPressClient } from "../../client/api.js"; import type { SEOAnalysisResult, SEOMetadata, SchemaMarkup, SEOToolParams, BulkOperationResult, SiteAuditResult, SERPTrackingResult, KeywordResearchResult } from "../../types/seo.js"; /** * Main SEOTools class that provides WordPress SEO management functionality. * * This class serves as the interface between the MCP framework and WordPress * SEO operations. It follows the established pattern of other tool classes * while providing SEO-specific capabilities. * * The class is designed with a modular architecture: * - Analyzers for content evaluation * - Generators for metadata and schema creation * - Validators for ensuring compliance * - Optimizers for performance improvements * * @since 2.7.0 */ export declare class SEOTools { private logger; private contentAnalyzer; private metaGenerator; private schemaGenerator; private cacheManager; constructor(); /** * Analyzes content for SEO optimization opportunities. * * Performs comprehensive analysis including: * - Readability scoring (Flesch-Kincaid) * - Keyword density and distribution * - Content structure evaluation * - Meta tag optimization suggestions * * @param params - Analysis parameters including post ID and analysis type * @returns Detailed SEO analysis with scores and recommendations */ analyzeContent(client: WordPressClient, params: SEOToolParams): Promise; /** * Generates optimized metadata for posts. * * Creates SEO-friendly metadata including: * - Title tags (60 character limit) * - Meta descriptions (155-160 characters) * - OpenGraph tags * - Twitter Card metadata * * @param params - Generation parameters including content and constraints * @returns Generated metadata with safety filters applied */ generateMetadata(client: WordPressClient, params: SEOToolParams): Promise; /** * Performs bulk metadata updates with progress tracking. * * Handles large-scale metadata updates with: * - Batch processing (10 posts per batch) * - Progress event streaming * - Retry logic with exponential backoff * - Dry-run mode for validation * * @param params - Bulk operation parameters * @returns Operation results with success/failure counts */ bulkUpdateMetadata(client: WordPressClient, params: SEOToolParams): Promise; /** * Generates structured data schema markup. * * Creates JSON-LD schema for: * - Article, Product, FAQ, HowTo * - Organization, Website, BreadcrumbList * - Event, Recipe, Course, and more * * @param params - Schema generation parameters * @returns Valid JSON-LD schema markup */ generateSchema(client: WordPressClient, params: SEOToolParams): Promise; /** * Validates schema markup for correctness. * * Performs validation using: * - Local validation rules * - Google Rich Results Test API (optional) * - Schema.org specifications * * @param params - Validation parameters including schema JSON * @returns Validation results with errors and warnings */ validateSchema(params: SEOToolParams): Promise; /** * Suggests internal linking opportunities. * * Analyzes content to suggest: * - Related posts for contextual linking * - Anchor text recommendations * - Hub-and-spoke content architectures * - Topical cluster connections * * @param params - Linking parameters including post ID * @returns Internal linking suggestions with confidence scores */ suggestInternalLinks(client: WordPressClient, params: SEOToolParams): Promise; /** * Performs comprehensive site SEO audit. * * Audits include: * - Technical SEO issues * - Content quality analysis * - Core Web Vitals assessment * - Mobile usability checks * - Structured data validation * * @param params - Audit parameters including scope and depth * @returns Detailed audit results with prioritized recommendations */ performSiteAudit(client: WordPressClient, params: SEOToolParams): Promise; /** * Estimates SERP positions by analysing WordPress content coverage for each keyword. */ trackSERPPositions(client: WordPressClient, params: SEOToolParams): Promise; /** * Generates keyword suggestions derived from existing WordPress content. */ keywordResearch(client: WordPressClient, params: SEOToolParams): Promise; /** * Retrieves all SEO tool definitions for MCP registration. * * @returns Array of SEO tool definitions with handlers */ getTools(): unknown[]; /** * Maps tool names to their corresponding handler methods. * * @param toolName - Name of the tool * @returns Handler function for the tool * @private */ private getHandlerForTool; /** * Retrieves cached result if available. * * @param key - Cache key * @returns Cached result or null * @private */ private getCachedResult; /** * Caches a result with specified TTL. * * @param key - Cache key * @param result - Result to cache * @param ttl - Time to live in seconds * @private */ private cacheResult; private performAnalysis; private createMetadata; private processBulkUpdate; private createSchema; private performSchemaValidation; private findLinkingOpportunities; /** * Test SEO plugin integration and WordPress API connectivity */ testSEOIntegration(client: WordPressClient, params: SEOToolParams): Promise; /** * Get live SEO data for multiple posts */ getLiveSEOData(client: WordPressClient, params: SEOToolParams & { maxPosts?: number; }): Promise; private executeSiteAudit; /** * Generate integration recommendations based on test results */ private generateIntegrationRecommendations; private buildSearchConsoleProvider; private computeSERPPositions; private computeKeywordResearch; private stripHtml; private scorePostRelevance; private estimateDifficulty; private extractRelatedTerms; private computeTermRelevance; private generateVariations; private generateQuestions; /** * Analyze live SEO data for insights */ private analyzeLiveSEOData; } export default SEOTools; //# sourceMappingURL=SEOTools.d.ts.map