mcp-wordpress 2.6.4 → 2.7.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.
- package/README.md +1 -1
- package/dist/cache/CacheInvalidation.d.ts +25 -6
- package/dist/cache/CacheInvalidation.d.ts.map +1 -1
- package/dist/cache/CacheInvalidation.js +168 -16
- package/dist/cache/CacheInvalidation.js.map +1 -1
- package/dist/cache/HttpCacheWrapper.d.ts.map +1 -1
- package/dist/cache/HttpCacheWrapper.js +3 -4
- package/dist/cache/HttpCacheWrapper.js.map +1 -1
- package/dist/cache/SEOCacheManager.d.ts +150 -0
- package/dist/cache/SEOCacheManager.d.ts.map +1 -0
- package/dist/cache/SEOCacheManager.js +275 -0
- package/dist/cache/SEOCacheManager.js.map +1 -0
- package/dist/client/SEOWordPressClient.d.ts +164 -0
- package/dist/client/SEOWordPressClient.d.ts.map +1 -0
- package/dist/client/SEOWordPressClient.js +674 -0
- package/dist/client/SEOWordPressClient.js.map +1 -0
- package/dist/client/api.d.ts.map +1 -1
- package/dist/client/api.js +50 -20
- package/dist/client/api.js.map +1 -1
- package/dist/client/auth.js +19 -19
- package/dist/client/auth.js.map +1 -1
- package/dist/client/index.d.ts +11 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +14 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/managers/AuthManager.d.ts +39 -0
- package/dist/client/managers/AuthManager.d.ts.map +1 -0
- package/dist/client/managers/AuthManager.js +142 -0
- package/dist/client/managers/AuthManager.js.map +1 -0
- package/dist/client/managers/AuthenticationManager.d.ts.map +1 -1
- package/dist/client/managers/AuthenticationManager.js +10 -9
- package/dist/client/managers/AuthenticationManager.js.map +1 -1
- package/dist/client/managers/BaseManager.d.ts.map +1 -1
- package/dist/client/managers/BaseManager.js +12 -0
- package/dist/client/managers/BaseManager.js.map +1 -1
- package/dist/client/managers/ComposedAuthenticationManager.d.ts +94 -0
- package/dist/client/managers/ComposedAuthenticationManager.d.ts.map +1 -0
- package/dist/client/managers/ComposedAuthenticationManager.js +340 -0
- package/dist/client/managers/ComposedAuthenticationManager.js.map +1 -0
- package/dist/client/managers/ComposedManagerFactory.d.ts +104 -0
- package/dist/client/managers/ComposedManagerFactory.d.ts.map +1 -0
- package/dist/client/managers/ComposedManagerFactory.js +180 -0
- package/dist/client/managers/ComposedManagerFactory.js.map +1 -0
- package/dist/client/managers/ComposedRequestManager.d.ts +82 -0
- package/dist/client/managers/ComposedRequestManager.d.ts.map +1 -0
- package/dist/client/managers/ComposedRequestManager.js +260 -0
- package/dist/client/managers/ComposedRequestManager.js.map +1 -0
- package/dist/client/managers/JWTAuthImplementation.d.ts +86 -0
- package/dist/client/managers/JWTAuthImplementation.d.ts.map +1 -0
- package/dist/client/managers/JWTAuthImplementation.js +240 -0
- package/dist/client/managers/JWTAuthImplementation.js.map +1 -0
- package/dist/client/managers/ManagersIndex.d.ts +6 -0
- package/dist/client/managers/ManagersIndex.d.ts.map +1 -0
- package/dist/client/managers/ManagersIndex.js +6 -0
- package/dist/client/managers/ManagersIndex.js.map +1 -0
- package/dist/client/managers/RequestManager.d.ts.map +1 -1
- package/dist/client/managers/RequestManager.js +5 -3
- package/dist/client/managers/RequestManager.js.map +1 -1
- package/dist/client/managers/composed/MigrationAdapter.d.ts +80 -0
- package/dist/client/managers/composed/MigrationAdapter.d.ts.map +1 -0
- package/dist/client/managers/composed/MigrationAdapter.js +214 -0
- package/dist/client/managers/composed/MigrationAdapter.js.map +1 -0
- package/dist/client/managers/composed/index.d.ts +23 -0
- package/dist/client/managers/composed/index.d.ts.map +1 -0
- package/dist/client/managers/composed/index.js +26 -0
- package/dist/client/managers/composed/index.js.map +1 -0
- package/dist/client/managers/implementations/ConfigurationProviderImpl.d.ts +27 -0
- package/dist/client/managers/implementations/ConfigurationProviderImpl.d.ts.map +1 -0
- package/dist/client/managers/implementations/ConfigurationProviderImpl.js +41 -0
- package/dist/client/managers/implementations/ConfigurationProviderImpl.js.map +1 -0
- package/dist/client/managers/implementations/ErrorHandlerImpl.d.ts +31 -0
- package/dist/client/managers/implementations/ErrorHandlerImpl.d.ts.map +1 -0
- package/dist/client/managers/implementations/ErrorHandlerImpl.js +73 -0
- package/dist/client/managers/implementations/ErrorHandlerImpl.js.map +1 -0
- package/dist/client/managers/implementations/ParameterValidatorImpl.d.ts +47 -0
- package/dist/client/managers/implementations/ParameterValidatorImpl.d.ts.map +1 -0
- package/dist/client/managers/implementations/ParameterValidatorImpl.js +141 -0
- package/dist/client/managers/implementations/ParameterValidatorImpl.js.map +1 -0
- package/dist/client/managers/interfaces/ManagerInterfaces.d.ts +147 -0
- package/dist/client/managers/interfaces/ManagerInterfaces.d.ts.map +1 -0
- package/dist/client/managers/interfaces/ManagerInterfaces.js +6 -0
- package/dist/client/managers/interfaces/ManagerInterfaces.js.map +1 -0
- package/dist/config/Config.d.ts +30 -0
- package/dist/config/Config.d.ts.map +1 -1
- package/dist/config/Config.js +30 -0
- package/dist/config/Config.js.map +1 -1
- package/dist/config/ConfigurationSchema.d.ts +75 -198
- package/dist/config/ConfigurationSchema.d.ts.map +1 -1
- package/dist/config/ConfigurationSchema.js +17 -17
- package/dist/config/ConfigurationSchema.js.map +1 -1
- package/dist/config/ServerConfiguration.d.ts +2 -2
- package/dist/config/ServerConfiguration.d.ts.map +1 -1
- package/dist/config/ServerConfiguration.js +15 -13
- package/dist/config/ServerConfiguration.js.map +1 -1
- package/dist/config/index.d.ts +8 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +11 -0
- package/dist/config/index.js.map +1 -0
- package/dist/docs/DocumentationGenerator.js +2 -2
- package/dist/docs/DocumentationGenerator.js.map +1 -1
- package/dist/dxt-entry.js +3 -3
- package/dist/dxt-entry.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -37
- package/dist/index.js.map +1 -1
- package/dist/performance/MetricsCollector.d.ts.map +1 -1
- package/dist/performance/MetricsCollector.js +5 -4
- package/dist/performance/MetricsCollector.js.map +1 -1
- package/dist/security/AISecurityScanner.js +7 -7
- package/dist/security/AISecurityScanner.js.map +1 -1
- package/dist/security/AutomatedRemediation.d.ts.map +1 -1
- package/dist/security/AutomatedRemediation.js +11 -11
- package/dist/security/AutomatedRemediation.js.map +1 -1
- package/dist/security/InputValidator.d.ts +50 -126
- package/dist/security/InputValidator.d.ts.map +1 -1
- package/dist/security/InputValidator.js +9 -9
- package/dist/security/InputValidator.js.map +1 -1
- package/dist/security/SecurityCIPipeline.d.ts +47 -5
- package/dist/security/SecurityCIPipeline.d.ts.map +1 -1
- package/dist/security/SecurityCIPipeline.js +390 -49
- package/dist/security/SecurityCIPipeline.js.map +1 -1
- package/dist/security/SecurityConfigManager.js +10 -10
- package/dist/security/SecurityConfigManager.js.map +1 -1
- package/dist/security/SecurityMonitoring.js +4 -4
- package/dist/security/SecurityMonitoring.js.map +1 -1
- package/dist/security/SecurityReviewer.d.ts.map +1 -1
- package/dist/security/SecurityReviewer.js +13 -6
- package/dist/security/SecurityReviewer.js.map +1 -1
- package/dist/security/index.js +3 -3
- package/dist/security/index.js.map +1 -1
- package/dist/server/ConnectionTester.js +5 -5
- package/dist/server/ConnectionTester.js.map +1 -1
- package/dist/server/ToolRegistry.d.ts +2 -2
- package/dist/server/ToolRegistry.d.ts.map +1 -1
- package/dist/server/ToolRegistry.js +7 -6
- package/dist/server/ToolRegistry.js.map +1 -1
- package/dist/server/index.d.ts +7 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +9 -0
- package/dist/server/index.js.map +1 -0
- package/dist/tools/BaseToolManager.d.ts.map +1 -1
- package/dist/tools/BaseToolManager.js +11 -11
- package/dist/tools/BaseToolManager.js.map +1 -1
- package/dist/tools/auth.d.ts.map +1 -1
- package/dist/tools/auth.js +7 -7
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/comments.d.ts.map +1 -1
- package/dist/tools/comments.js +14 -14
- package/dist/tools/comments.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/media.d.ts.map +1 -1
- package/dist/tools/media.js +14 -11
- package/dist/tools/media.js.map +1 -1
- package/dist/tools/pages.d.ts.map +1 -1
- package/dist/tools/pages.js +12 -12
- package/dist/tools/pages.js.map +1 -1
- package/dist/tools/performance.d.ts.map +1 -1
- package/dist/tools/performance.js +13 -11
- package/dist/tools/performance.js.map +1 -1
- package/dist/tools/posts/PostHandlers.d.ts.map +1 -1
- package/dist/tools/posts/PostHandlers.js +16 -16
- package/dist/tools/posts/PostHandlers.js.map +1 -1
- package/dist/tools/posts/PostToolDefinitions.d.ts.map +1 -1
- package/dist/tools/posts/index.d.ts.map +1 -1
- package/dist/tools/seo/BulkOperations.d.ts +113 -0
- package/dist/tools/seo/BulkOperations.d.ts.map +1 -0
- package/dist/tools/seo/BulkOperations.js +398 -0
- package/dist/tools/seo/BulkOperations.js.map +1 -0
- package/dist/tools/seo/SEOHandlers.d.ts +55 -0
- package/dist/tools/seo/SEOHandlers.d.ts.map +1 -0
- package/dist/tools/seo/SEOHandlers.js +255 -0
- package/dist/tools/seo/SEOHandlers.js.map +1 -0
- package/dist/tools/seo/SEOToolDefinitions.d.ts +59 -0
- package/dist/tools/seo/SEOToolDefinitions.d.ts.map +1 -0
- package/dist/tools/seo/SEOToolDefinitions.js +385 -0
- package/dist/tools/seo/SEOToolDefinitions.js.map +1 -0
- package/dist/tools/seo/SEOTools.d.ts +203 -0
- package/dist/tools/seo/SEOTools.d.ts.map +1 -0
- package/dist/tools/seo/SEOTools.js +708 -0
- package/dist/tools/seo/SEOTools.js.map +1 -0
- package/dist/tools/seo/analyzers/ContentAnalyzer.d.ts +94 -0
- package/dist/tools/seo/analyzers/ContentAnalyzer.d.ts.map +1 -0
- package/dist/tools/seo/analyzers/ContentAnalyzer.js +402 -0
- package/dist/tools/seo/analyzers/ContentAnalyzer.js.map +1 -0
- package/dist/tools/seo/auditors/SiteAuditor.d.ts +121 -0
- package/dist/tools/seo/auditors/SiteAuditor.d.ts.map +1 -0
- package/dist/tools/seo/auditors/SiteAuditor.js +600 -0
- package/dist/tools/seo/auditors/SiteAuditor.js.map +1 -0
- package/dist/tools/seo/generators/MetaGenerator.d.ts +128 -0
- package/dist/tools/seo/generators/MetaGenerator.d.ts.map +1 -0
- package/dist/tools/seo/generators/MetaGenerator.js +547 -0
- package/dist/tools/seo/generators/MetaGenerator.js.map +1 -0
- package/dist/tools/seo/generators/SchemaGenerator.d.ts +204 -0
- package/dist/tools/seo/generators/SchemaGenerator.d.ts.map +1 -0
- package/dist/tools/seo/generators/SchemaGenerator.js +670 -0
- package/dist/tools/seo/generators/SchemaGenerator.js.map +1 -0
- package/dist/tools/seo/index.d.ts +17 -0
- package/dist/tools/seo/index.d.ts.map +1 -0
- package/dist/tools/seo/index.js +18 -0
- package/dist/tools/seo/index.js.map +1 -0
- package/dist/tools/seo/optimizers/InternalLinkingSuggester.d.ts +186 -0
- package/dist/tools/seo/optimizers/InternalLinkingSuggester.d.ts.map +1 -0
- package/dist/tools/seo/optimizers/InternalLinkingSuggester.js +683 -0
- package/dist/tools/seo/optimizers/InternalLinkingSuggester.js.map +1 -0
- package/dist/tools/site.d.ts.map +1 -1
- package/dist/tools/site.js +12 -12
- package/dist/tools/site.js.map +1 -1
- package/dist/tools/taxonomies.d.ts.map +1 -1
- package/dist/tools/taxonomies.js +20 -20
- package/dist/tools/taxonomies.js.map +1 -1
- package/dist/tools/users.d.ts.map +1 -1
- package/dist/tools/users.js +12 -12
- package/dist/tools/users.js.map +1 -1
- package/dist/types/client.d.ts +8 -6
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client.js.map +1 -1
- package/dist/types/seo.d.ts +473 -0
- package/dist/types/seo.d.ts.map +1 -0
- package/dist/types/seo.js +94 -0
- package/dist/types/seo.js.map +1 -0
- package/dist/utils/enhancedError.js +1 -1
- package/dist/utils/enhancedError.js.map +1 -1
- package/dist/utils/error.d.ts.map +1 -1
- package/dist/utils/error.js +0 -1
- package/dist/utils/error.js.map +1 -1
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.js +3 -3
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/toolWrapper.d.ts +2 -2
- package/dist/utils/toolWrapper.js +8 -8
- package/dist/utils/toolWrapper.js.map +1 -1
- package/dist/utils/validation/core.d.ts.map +1 -1
- package/dist/utils/validation/core.js.map +1 -1
- package/dist/utils/validation/index.d.ts.map +1 -1
- package/dist/utils/validation/index.js.map +1 -1
- package/dist/utils/validation/network.js +3 -3
- package/dist/utils/validation/network.js.map +1 -1
- package/dist/utils/validation/rateLimit.js.map +1 -1
- package/dist/utils/validation/security.js.map +1 -1
- package/dist/utils/validation/wordpress.js.map +1 -1
- package/dist/utils/version.d.ts +144 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +318 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +21 -55
- package/src/cache/CacheInvalidation.ts +183 -20
- package/src/cache/HttpCacheWrapper.ts +8 -5
- package/src/cache/SEOCacheManager.ts +330 -0
- package/src/cache/__tests__/CacheInvalidation.test.ts +6 -11
- package/src/cache/__tests__/CachedWordPressClient.test.ts +37 -62
- package/src/client/SEOWordPressClient.ts +876 -0
- package/src/client/api.ts +50 -21
- package/src/client/auth.ts +19 -19
- package/src/client/index.ts +16 -0
- package/src/client/managers/AuthManager.ts +175 -0
- package/src/client/managers/AuthenticationManager.ts +16 -14
- package/src/client/managers/BaseManager.ts +24 -5
- package/src/client/managers/ComposedAuthenticationManager.ts +409 -0
- package/src/client/managers/ComposedManagerFactory.ts +231 -0
- package/src/client/managers/ComposedRequestManager.ts +336 -0
- package/src/client/managers/JWTAuthImplementation.ts +326 -0
- package/src/client/managers/ManagersIndex.ts +6 -0
- package/src/client/managers/RequestManager.ts +9 -7
- package/src/client/managers/composed/MigrationAdapter.ts +263 -0
- package/src/client/managers/composed/index.ts +47 -0
- package/src/client/managers/implementations/ConfigurationProviderImpl.ts +52 -0
- package/src/client/managers/implementations/ErrorHandlerImpl.ts +102 -0
- package/src/client/managers/implementations/ParameterValidatorImpl.ts +221 -0
- package/src/client/managers/interfaces/ManagerInterfaces.ts +171 -0
- package/src/config/Config.ts +63 -0
- package/src/config/ConfigurationSchema.ts +17 -17
- package/src/config/ServerConfiguration.ts +18 -16
- package/src/config/index.ts +13 -0
- package/src/docs/DocumentationGenerator.ts +2 -2
- package/src/dxt-entry.ts +3 -3
- package/src/index.ts +43 -43
- package/src/performance/MetricsCollector.ts +15 -11
- package/src/security/AISecurityScanner.ts +7 -7
- package/src/security/AutomatedRemediation.ts +13 -11
- package/src/security/InputValidator.ts +10 -9
- package/src/security/SecurityCIPipeline.ts +494 -56
- package/src/security/SecurityConfigManager.ts +10 -10
- package/src/security/SecurityMonitoring.ts +5 -5
- package/src/security/SecurityReviewer.ts +13 -6
- package/src/security/index.ts +3 -3
- package/src/server/ConnectionTester.ts +5 -5
- package/src/server/ToolRegistry.ts +9 -8
- package/src/server/index.ts +10 -0
- package/src/tools/BaseToolManager.ts +55 -83
- package/src/tools/auth.ts +21 -12
- package/src/tools/comments.ts +23 -19
- package/src/tools/index.ts +1 -0
- package/src/tools/media.ts +23 -20
- package/src/tools/pages.ts +20 -13
- package/src/tools/performance.ts +101 -32
- package/src/tools/posts/PostHandlers.ts +23 -23
- package/src/tools/posts/PostToolDefinitions.ts +1 -1
- package/src/tools/posts/index.ts +2 -2
- package/src/tools/seo/BulkOperations.ts +557 -0
- package/src/tools/seo/SEOHandlers.ts +296 -0
- package/src/tools/seo/SEOToolDefinitions.ts +402 -0
- package/src/tools/seo/SEOTools.ts +871 -0
- package/src/tools/seo/analyzers/ContentAnalyzer.ts +493 -0
- package/src/tools/seo/auditors/SiteAuditor.ts +787 -0
- package/src/tools/seo/generators/MetaGenerator.ts +694 -0
- package/src/tools/seo/generators/SchemaGenerator.ts +955 -0
- package/src/tools/seo/index.ts +47 -0
- package/src/tools/seo/optimizers/InternalLinkingSuggester.ts +934 -0
- package/src/tools/site.ts +27 -26
- package/src/tools/taxonomies.ts +29 -25
- package/src/tools/users.ts +20 -13
- package/src/types/client.ts +8 -6
- package/src/types/seo.ts +546 -0
- package/src/utils/enhancedError.ts +1 -1
- package/src/utils/error.ts +1 -2
- package/src/utils/index.ts +23 -0
- package/src/utils/logger.ts +3 -3
- package/src/utils/toolWrapper.ts +10 -10
- package/src/utils/validation/core.ts +2 -2
- package/src/utils/validation/index.ts +2 -2
- package/src/utils/validation/network.ts +5 -5
- package/src/utils/validation/rateLimit.ts +1 -1
- package/src/utils/validation/security.ts +1 -1
- package/src/utils/validation/wordpress.ts +1 -1
- package/src/utils/version.ts +402 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SEO Tool Definitions for MCP Registration
|
|
3
|
+
*
|
|
4
|
+
* Defines all SEO-related tools with their schemas, descriptions,
|
|
5
|
+
* and handler functions for the Model Context Protocol.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.7.0
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Analyze content for SEO optimization opportunities
|
|
11
|
+
*/
|
|
12
|
+
export const analyzeContentTool = {
|
|
13
|
+
name: "wp_seo_analyze_content",
|
|
14
|
+
description: "Analyze WordPress post content for SEO optimization opportunities including readability, keyword density, structure, and technical factors",
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: {
|
|
18
|
+
postId: {
|
|
19
|
+
type: "number",
|
|
20
|
+
description: "WordPress post ID to analyze",
|
|
21
|
+
},
|
|
22
|
+
analysisType: {
|
|
23
|
+
type: "string",
|
|
24
|
+
enum: ["readability", "keywords", "structure", "full"],
|
|
25
|
+
description: "Type of SEO analysis to perform (default: full)",
|
|
26
|
+
},
|
|
27
|
+
focusKeywords: {
|
|
28
|
+
type: "array",
|
|
29
|
+
items: { type: "string" },
|
|
30
|
+
description: "Primary keywords to analyze for optimization",
|
|
31
|
+
},
|
|
32
|
+
site: {
|
|
33
|
+
type: "string",
|
|
34
|
+
description: "Site identifier for multi-site setups",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
required: ["postId"],
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Generate optimized metadata for posts
|
|
42
|
+
*/
|
|
43
|
+
export const generateMetadataTool = {
|
|
44
|
+
name: "wp_seo_generate_metadata",
|
|
45
|
+
description: "Generate SEO-optimized metadata including title tags, meta descriptions, OpenGraph, and Twitter Card data",
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: {
|
|
49
|
+
postId: {
|
|
50
|
+
type: "number",
|
|
51
|
+
description: "WordPress post ID",
|
|
52
|
+
},
|
|
53
|
+
title: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Custom title to optimize (optional, uses post title if not provided)",
|
|
56
|
+
},
|
|
57
|
+
description: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "Custom description to optimize (optional, uses excerpt if not provided)",
|
|
60
|
+
},
|
|
61
|
+
focusKeyword: {
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "Primary keyword to include in metadata",
|
|
64
|
+
},
|
|
65
|
+
site: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Site identifier for multi-site setups",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
required: ["postId"],
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Bulk update metadata for multiple posts
|
|
75
|
+
*/
|
|
76
|
+
export const bulkUpdateMetadataTool = {
|
|
77
|
+
name: "wp_seo_bulk_update_metadata",
|
|
78
|
+
description: "Update SEO metadata for multiple posts with progress tracking and error handling",
|
|
79
|
+
inputSchema: {
|
|
80
|
+
type: "object",
|
|
81
|
+
properties: {
|
|
82
|
+
postIds: {
|
|
83
|
+
type: "array",
|
|
84
|
+
items: { type: "number" },
|
|
85
|
+
description: "Array of WordPress post IDs to update",
|
|
86
|
+
},
|
|
87
|
+
updates: {
|
|
88
|
+
type: "object",
|
|
89
|
+
properties: {
|
|
90
|
+
title: { type: "string" },
|
|
91
|
+
description: { type: "string" },
|
|
92
|
+
focusKeyword: { type: "string" },
|
|
93
|
+
canonical: { type: "string" },
|
|
94
|
+
},
|
|
95
|
+
description: "Metadata fields to update for all posts",
|
|
96
|
+
},
|
|
97
|
+
dryRun: {
|
|
98
|
+
type: "boolean",
|
|
99
|
+
description: "Perform a dry run without making actual changes",
|
|
100
|
+
},
|
|
101
|
+
site: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description: "Site identifier for multi-site setups",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
required: ["postIds", "updates"],
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Generate structured data schema markup
|
|
111
|
+
*/
|
|
112
|
+
export const generateSchemaTool = {
|
|
113
|
+
name: "wp_seo_generate_schema",
|
|
114
|
+
description: "Generate JSON-LD structured data schema for enhanced search results",
|
|
115
|
+
inputSchema: {
|
|
116
|
+
type: "object",
|
|
117
|
+
properties: {
|
|
118
|
+
postId: {
|
|
119
|
+
type: "number",
|
|
120
|
+
description: "WordPress post ID",
|
|
121
|
+
},
|
|
122
|
+
schemaType: {
|
|
123
|
+
type: "string",
|
|
124
|
+
enum: [
|
|
125
|
+
"Article",
|
|
126
|
+
"Product",
|
|
127
|
+
"FAQ",
|
|
128
|
+
"HowTo",
|
|
129
|
+
"Organization",
|
|
130
|
+
"Website",
|
|
131
|
+
"BreadcrumbList",
|
|
132
|
+
"Event",
|
|
133
|
+
"Recipe",
|
|
134
|
+
"Course",
|
|
135
|
+
"LocalBusiness",
|
|
136
|
+
"Person",
|
|
137
|
+
"Review",
|
|
138
|
+
"VideoObject",
|
|
139
|
+
],
|
|
140
|
+
description: "Type of schema.org structured data to generate",
|
|
141
|
+
},
|
|
142
|
+
customData: {
|
|
143
|
+
type: "object",
|
|
144
|
+
description: "Additional custom data for the schema",
|
|
145
|
+
},
|
|
146
|
+
site: {
|
|
147
|
+
type: "string",
|
|
148
|
+
description: "Site identifier for multi-site setups",
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
required: ["postId", "schemaType"],
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Validate schema markup
|
|
156
|
+
*/
|
|
157
|
+
export const validateSchemaTool = {
|
|
158
|
+
name: "wp_seo_validate_schema",
|
|
159
|
+
description: "Validate JSON-LD schema markup for correctness and compliance",
|
|
160
|
+
inputSchema: {
|
|
161
|
+
type: "object",
|
|
162
|
+
properties: {
|
|
163
|
+
schema: {
|
|
164
|
+
type: "object",
|
|
165
|
+
description: "JSON-LD schema object to validate",
|
|
166
|
+
},
|
|
167
|
+
schemaType: {
|
|
168
|
+
type: "string",
|
|
169
|
+
description: "Expected schema type for validation",
|
|
170
|
+
},
|
|
171
|
+
useGoogleValidator: {
|
|
172
|
+
type: "boolean",
|
|
173
|
+
description: "Use Google's Rich Results Test API for validation",
|
|
174
|
+
},
|
|
175
|
+
site: {
|
|
176
|
+
type: "string",
|
|
177
|
+
description: "Site identifier for multi-site setups",
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
required: ["schema"],
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Suggest internal linking opportunities
|
|
185
|
+
*/
|
|
186
|
+
export const suggestInternalLinksTool = {
|
|
187
|
+
name: "wp_seo_suggest_internal_links",
|
|
188
|
+
description: "Analyze content and suggest relevant internal linking opportunities for better SEO",
|
|
189
|
+
inputSchema: {
|
|
190
|
+
type: "object",
|
|
191
|
+
properties: {
|
|
192
|
+
postId: {
|
|
193
|
+
type: "number",
|
|
194
|
+
description: "WordPress post ID to analyze for linking opportunities",
|
|
195
|
+
},
|
|
196
|
+
maxSuggestions: {
|
|
197
|
+
type: "number",
|
|
198
|
+
description: "Maximum number of link suggestions (default: 5)",
|
|
199
|
+
},
|
|
200
|
+
minimumRelevance: {
|
|
201
|
+
type: "number",
|
|
202
|
+
description: "Minimum relevance score (0-100) for suggestions",
|
|
203
|
+
},
|
|
204
|
+
site: {
|
|
205
|
+
type: "string",
|
|
206
|
+
description: "Site identifier for multi-site setups",
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
required: ["postId"],
|
|
210
|
+
},
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Perform comprehensive site audit
|
|
214
|
+
*/
|
|
215
|
+
export const performSiteAuditTool = {
|
|
216
|
+
name: "wp_seo_site_audit",
|
|
217
|
+
description: "Perform comprehensive SEO audit of the WordPress site including technical, content, and performance analysis",
|
|
218
|
+
inputSchema: {
|
|
219
|
+
type: "object",
|
|
220
|
+
properties: {
|
|
221
|
+
auditType: {
|
|
222
|
+
type: "string",
|
|
223
|
+
enum: ["technical", "content", "performance", "full"],
|
|
224
|
+
description: "Type of audit to perform (default: full)",
|
|
225
|
+
},
|
|
226
|
+
maxPages: {
|
|
227
|
+
type: "number",
|
|
228
|
+
description: "Maximum number of pages to audit (default: 100)",
|
|
229
|
+
},
|
|
230
|
+
includeExternalLinks: {
|
|
231
|
+
type: "boolean",
|
|
232
|
+
description: "Include external link validation in audit",
|
|
233
|
+
},
|
|
234
|
+
force: {
|
|
235
|
+
type: "boolean",
|
|
236
|
+
description: "Force refresh, bypassing cached audit results",
|
|
237
|
+
},
|
|
238
|
+
site: {
|
|
239
|
+
type: "string",
|
|
240
|
+
description: "Site identifier for multi-site setups",
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
required: [],
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Track SERP positions
|
|
248
|
+
*/
|
|
249
|
+
export const trackSERPPositionsTool = {
|
|
250
|
+
name: "wp_seo_track_serp",
|
|
251
|
+
description: "Track search engine result page positions for target keywords",
|
|
252
|
+
inputSchema: {
|
|
253
|
+
type: "object",
|
|
254
|
+
properties: {
|
|
255
|
+
keywords: {
|
|
256
|
+
type: "array",
|
|
257
|
+
items: { type: "string" },
|
|
258
|
+
description: "Keywords to track positions for",
|
|
259
|
+
},
|
|
260
|
+
url: {
|
|
261
|
+
type: "string",
|
|
262
|
+
description: "Specific URL to track (optional, uses site home if not provided)",
|
|
263
|
+
},
|
|
264
|
+
searchEngine: {
|
|
265
|
+
type: "string",
|
|
266
|
+
enum: ["google", "bing", "yahoo"],
|
|
267
|
+
description: "Search engine to track positions on",
|
|
268
|
+
},
|
|
269
|
+
location: {
|
|
270
|
+
type: "string",
|
|
271
|
+
description: "Geographic location for localized results",
|
|
272
|
+
},
|
|
273
|
+
site: {
|
|
274
|
+
type: "string",
|
|
275
|
+
description: "Site identifier for multi-site setups",
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
required: ["keywords"],
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
/**
|
|
282
|
+
* Keyword research and suggestions
|
|
283
|
+
*/
|
|
284
|
+
export const keywordResearchTool = {
|
|
285
|
+
name: "wp_seo_keyword_research",
|
|
286
|
+
description: "Research keywords and get suggestions based on topic and competition analysis",
|
|
287
|
+
inputSchema: {
|
|
288
|
+
type: "object",
|
|
289
|
+
properties: {
|
|
290
|
+
seedKeyword: {
|
|
291
|
+
type: "string",
|
|
292
|
+
description: "Seed keyword or topic to research",
|
|
293
|
+
},
|
|
294
|
+
includeVariations: {
|
|
295
|
+
type: "boolean",
|
|
296
|
+
description: "Include keyword variations and long-tail keywords",
|
|
297
|
+
},
|
|
298
|
+
includeQuestions: {
|
|
299
|
+
type: "boolean",
|
|
300
|
+
description: "Include question-based keywords",
|
|
301
|
+
},
|
|
302
|
+
maxResults: {
|
|
303
|
+
type: "number",
|
|
304
|
+
description: "Maximum number of keyword suggestions",
|
|
305
|
+
},
|
|
306
|
+
site: {
|
|
307
|
+
type: "string",
|
|
308
|
+
description: "Site identifier for multi-site setups",
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
required: ["seedKeyword"],
|
|
312
|
+
},
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Test SEO integration with WordPress
|
|
316
|
+
*/
|
|
317
|
+
export const testSEOIntegrationTool = {
|
|
318
|
+
name: "wp_seo_test_integration",
|
|
319
|
+
description: "Test SEO plugin integration and detect available SEO plugins on the WordPress site",
|
|
320
|
+
inputSchema: {
|
|
321
|
+
type: "object",
|
|
322
|
+
properties: {
|
|
323
|
+
checkPlugins: {
|
|
324
|
+
type: "boolean",
|
|
325
|
+
description: "Check which SEO plugins are installed and active",
|
|
326
|
+
},
|
|
327
|
+
testMetadataAccess: {
|
|
328
|
+
type: "boolean",
|
|
329
|
+
description: "Test ability to read/write SEO metadata",
|
|
330
|
+
},
|
|
331
|
+
site: {
|
|
332
|
+
type: "string",
|
|
333
|
+
description: "Site identifier for multi-site setups",
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
required: [],
|
|
337
|
+
},
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* Get live SEO data from WordPress
|
|
341
|
+
*/
|
|
342
|
+
export const getLiveSEODataTool = {
|
|
343
|
+
name: "wp_seo_get_live_data",
|
|
344
|
+
description: "Retrieve live SEO data from WordPress including plugin-specific metadata and configurations",
|
|
345
|
+
inputSchema: {
|
|
346
|
+
type: "object",
|
|
347
|
+
properties: {
|
|
348
|
+
postId: {
|
|
349
|
+
type: "number",
|
|
350
|
+
description: "WordPress post ID to get SEO data for",
|
|
351
|
+
},
|
|
352
|
+
includeAnalysis: {
|
|
353
|
+
type: "boolean",
|
|
354
|
+
description: "Include SEO analysis of the live data",
|
|
355
|
+
},
|
|
356
|
+
includeRecommendations: {
|
|
357
|
+
type: "boolean",
|
|
358
|
+
description: "Include optimization recommendations",
|
|
359
|
+
},
|
|
360
|
+
site: {
|
|
361
|
+
type: "string",
|
|
362
|
+
description: "Site identifier for multi-site setups",
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
required: ["postId"],
|
|
366
|
+
},
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* Export all SEO tool definitions
|
|
370
|
+
*/
|
|
371
|
+
export const seoToolDefinitions = [
|
|
372
|
+
analyzeContentTool,
|
|
373
|
+
generateMetadataTool,
|
|
374
|
+
bulkUpdateMetadataTool,
|
|
375
|
+
generateSchemaTool,
|
|
376
|
+
validateSchemaTool,
|
|
377
|
+
suggestInternalLinksTool,
|
|
378
|
+
performSiteAuditTool,
|
|
379
|
+
trackSERPPositionsTool,
|
|
380
|
+
keywordResearchTool,
|
|
381
|
+
testSEOIntegrationTool,
|
|
382
|
+
getLiveSEODataTool,
|
|
383
|
+
];
|
|
384
|
+
export default seoToolDefinitions;
|
|
385
|
+
//# sourceMappingURL=SEOToolDefinitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SEOToolDefinitions.js","sourceRoot":"","sources":["../../../src/tools/seo/SEOToolDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAS;IACtC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EACT,4IAA4I;IAC9I,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;aAC5C;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,CAAC;gBACtD,WAAW,EAAE,iDAAiD;aAC/D;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB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aACpD;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAW;IACxC,kBAAkB;IAClB,oBAAoB;IACpB,sBAAsB;IACtB,kBAAkB;IAClB,kBAAkB;IAClB,wBAAwB;IACxB,oBAAoB;IACpB,sBAAsB;IACtB,mBAAmB;IACnB,sBAAsB;IACtB,kBAAkB;CACnB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress SEO Tools - Main Module
|
|
3
|
+
*
|
|
4
|
+
* This module provides comprehensive SEO management functionality for WordPress
|
|
5
|
+
* through the MCP protocol. It combines content analysis, metadata generation,
|
|
6
|
+
* schema markup, and optimization capabilities in a modular architecture.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Content analysis for readability and keyword optimization
|
|
10
|
+
* - Metadata generation with AI assistance and safety filters
|
|
11
|
+
* - Schema markup generation and validation
|
|
12
|
+
* - Internal linking optimization
|
|
13
|
+
* - Site audits and Core Web Vitals monitoring
|
|
14
|
+
* - Bulk operations with progress tracking
|
|
15
|
+
*
|
|
16
|
+
* @since 2.7.0
|
|
17
|
+
*/
|
|
18
|
+
import type { SEOAnalysisResult, SEOMetadata, SchemaMarkup, SEOToolParams, BulkOperationResult, SiteAuditResult } from "../../types/seo.js";
|
|
19
|
+
/**
|
|
20
|
+
* Main SEOTools class that provides WordPress SEO management functionality.
|
|
21
|
+
*
|
|
22
|
+
* This class serves as the interface between the MCP framework and WordPress
|
|
23
|
+
* SEO operations. It follows the established pattern of other tool classes
|
|
24
|
+
* while providing SEO-specific capabilities.
|
|
25
|
+
*
|
|
26
|
+
* The class is designed with a modular architecture:
|
|
27
|
+
* - Analyzers for content evaluation
|
|
28
|
+
* - Generators for metadata and schema creation
|
|
29
|
+
* - Validators for ensuring compliance
|
|
30
|
+
* - Optimizers for performance improvements
|
|
31
|
+
*
|
|
32
|
+
* @since 2.7.0
|
|
33
|
+
*/
|
|
34
|
+
export declare class SEOTools {
|
|
35
|
+
private logger;
|
|
36
|
+
private clients;
|
|
37
|
+
private seoClients;
|
|
38
|
+
private contentAnalyzer;
|
|
39
|
+
private metaGenerator;
|
|
40
|
+
private schemaGenerator;
|
|
41
|
+
private cacheManager;
|
|
42
|
+
constructor();
|
|
43
|
+
/**
|
|
44
|
+
* Analyzes content for SEO optimization opportunities.
|
|
45
|
+
*
|
|
46
|
+
* Performs comprehensive analysis including:
|
|
47
|
+
* - Readability scoring (Flesch-Kincaid)
|
|
48
|
+
* - Keyword density and distribution
|
|
49
|
+
* - Content structure evaluation
|
|
50
|
+
* - Meta tag optimization suggestions
|
|
51
|
+
*
|
|
52
|
+
* @param params - Analysis parameters including post ID and analysis type
|
|
53
|
+
* @returns Detailed SEO analysis with scores and recommendations
|
|
54
|
+
*/
|
|
55
|
+
analyzeContent(params: SEOToolParams): Promise<SEOAnalysisResult>;
|
|
56
|
+
/**
|
|
57
|
+
* Generates optimized metadata for posts.
|
|
58
|
+
*
|
|
59
|
+
* Creates SEO-friendly metadata including:
|
|
60
|
+
* - Title tags (60 character limit)
|
|
61
|
+
* - Meta descriptions (155-160 characters)
|
|
62
|
+
* - OpenGraph tags
|
|
63
|
+
* - Twitter Card metadata
|
|
64
|
+
*
|
|
65
|
+
* @param params - Generation parameters including content and constraints
|
|
66
|
+
* @returns Generated metadata with safety filters applied
|
|
67
|
+
*/
|
|
68
|
+
generateMetadata(params: SEOToolParams): Promise<SEOMetadata>;
|
|
69
|
+
/**
|
|
70
|
+
* Performs bulk metadata updates with progress tracking.
|
|
71
|
+
*
|
|
72
|
+
* Handles large-scale metadata updates with:
|
|
73
|
+
* - Batch processing (10 posts per batch)
|
|
74
|
+
* - Progress event streaming
|
|
75
|
+
* - Retry logic with exponential backoff
|
|
76
|
+
* - Dry-run mode for validation
|
|
77
|
+
*
|
|
78
|
+
* @param params - Bulk operation parameters
|
|
79
|
+
* @returns Operation results with success/failure counts
|
|
80
|
+
*/
|
|
81
|
+
bulkUpdateMetadata(params: SEOToolParams): Promise<BulkOperationResult>;
|
|
82
|
+
/**
|
|
83
|
+
* Generates structured data schema markup.
|
|
84
|
+
*
|
|
85
|
+
* Creates JSON-LD schema for:
|
|
86
|
+
* - Article, Product, FAQ, HowTo
|
|
87
|
+
* - Organization, Website, BreadcrumbList
|
|
88
|
+
* - Event, Recipe, Course, and more
|
|
89
|
+
*
|
|
90
|
+
* @param params - Schema generation parameters
|
|
91
|
+
* @returns Valid JSON-LD schema markup
|
|
92
|
+
*/
|
|
93
|
+
generateSchema(params: SEOToolParams): Promise<SchemaMarkup>;
|
|
94
|
+
/**
|
|
95
|
+
* Validates schema markup for correctness.
|
|
96
|
+
*
|
|
97
|
+
* Performs validation using:
|
|
98
|
+
* - Local validation rules
|
|
99
|
+
* - Google Rich Results Test API (optional)
|
|
100
|
+
* - Schema.org specifications
|
|
101
|
+
*
|
|
102
|
+
* @param params - Validation parameters including schema JSON
|
|
103
|
+
* @returns Validation results with errors and warnings
|
|
104
|
+
*/
|
|
105
|
+
validateSchema(params: SEOToolParams): Promise<unknown>;
|
|
106
|
+
/**
|
|
107
|
+
* Suggests internal linking opportunities.
|
|
108
|
+
*
|
|
109
|
+
* Analyzes content to suggest:
|
|
110
|
+
* - Related posts for contextual linking
|
|
111
|
+
* - Anchor text recommendations
|
|
112
|
+
* - Hub-and-spoke content architectures
|
|
113
|
+
* - Topical cluster connections
|
|
114
|
+
*
|
|
115
|
+
* @param params - Linking parameters including post ID
|
|
116
|
+
* @returns Internal linking suggestions with confidence scores
|
|
117
|
+
*/
|
|
118
|
+
suggestInternalLinks(params: SEOToolParams): Promise<unknown>;
|
|
119
|
+
/**
|
|
120
|
+
* Performs comprehensive site SEO audit.
|
|
121
|
+
*
|
|
122
|
+
* Audits include:
|
|
123
|
+
* - Technical SEO issues
|
|
124
|
+
* - Content quality analysis
|
|
125
|
+
* - Core Web Vitals assessment
|
|
126
|
+
* - Mobile usability checks
|
|
127
|
+
* - Structured data validation
|
|
128
|
+
*
|
|
129
|
+
* @param params - Audit parameters including scope and depth
|
|
130
|
+
* @returns Detailed audit results with prioritized recommendations
|
|
131
|
+
*/
|
|
132
|
+
performSiteAudit(params: SEOToolParams): Promise<SiteAuditResult>;
|
|
133
|
+
/**
|
|
134
|
+
* Retrieves all SEO tool definitions for MCP registration.
|
|
135
|
+
*
|
|
136
|
+
* @returns Array of SEO tool definitions with handlers
|
|
137
|
+
*/
|
|
138
|
+
getTools(): unknown[];
|
|
139
|
+
/**
|
|
140
|
+
* Maps tool names to their corresponding handler methods.
|
|
141
|
+
*
|
|
142
|
+
* @param toolName - Name of the tool
|
|
143
|
+
* @returns Handler function for the tool
|
|
144
|
+
* @private
|
|
145
|
+
*/
|
|
146
|
+
private getHandlerForTool;
|
|
147
|
+
/**
|
|
148
|
+
* Gets or creates a WordPress client for the specified site.
|
|
149
|
+
*
|
|
150
|
+
* @param site - Site identifier
|
|
151
|
+
* @returns WordPress client instance
|
|
152
|
+
* @private
|
|
153
|
+
*/
|
|
154
|
+
private getSiteClient;
|
|
155
|
+
/**
|
|
156
|
+
* Get SEO-enhanced WordPress client for a specific site
|
|
157
|
+
*/
|
|
158
|
+
private getSEOClient;
|
|
159
|
+
/**
|
|
160
|
+
* Retrieves cached result if available.
|
|
161
|
+
*
|
|
162
|
+
* @param key - Cache key
|
|
163
|
+
* @returns Cached result or null
|
|
164
|
+
* @private
|
|
165
|
+
*/
|
|
166
|
+
private getCachedResult;
|
|
167
|
+
/**
|
|
168
|
+
* Caches a result with specified TTL.
|
|
169
|
+
*
|
|
170
|
+
* @param key - Cache key
|
|
171
|
+
* @param result - Result to cache
|
|
172
|
+
* @param ttl - Time to live in seconds
|
|
173
|
+
* @private
|
|
174
|
+
*/
|
|
175
|
+
private cacheResult;
|
|
176
|
+
private performAnalysis;
|
|
177
|
+
private createMetadata;
|
|
178
|
+
private processBulkUpdate;
|
|
179
|
+
private createSchema;
|
|
180
|
+
private performSchemaValidation;
|
|
181
|
+
private findLinkingOpportunities;
|
|
182
|
+
/**
|
|
183
|
+
* Test SEO plugin integration and WordPress API connectivity
|
|
184
|
+
*/
|
|
185
|
+
testSEOIntegration(params: SEOToolParams): Promise<unknown>;
|
|
186
|
+
/**
|
|
187
|
+
* Get live SEO data for multiple posts
|
|
188
|
+
*/
|
|
189
|
+
getLiveSEOData(params: SEOToolParams & {
|
|
190
|
+
maxPosts?: number;
|
|
191
|
+
}): Promise<unknown>;
|
|
192
|
+
private executeSiteAudit;
|
|
193
|
+
/**
|
|
194
|
+
* Generate integration recommendations based on test results
|
|
195
|
+
*/
|
|
196
|
+
private generateIntegrationRecommendations;
|
|
197
|
+
/**
|
|
198
|
+
* Analyze live SEO data for insights
|
|
199
|
+
*/
|
|
200
|
+
private analyzeLiveSEOData;
|
|
201
|
+
}
|
|
202
|
+
export default SEOTools;
|
|
203
|
+
//# sourceMappingURL=SEOTools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SEOTools.d.ts","sourceRoot":"","sources":["../../../src/tools/seo/SEOTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA2BH,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAGxB;;;;;;;;;;;;;;GAcG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,MAAM,CAA6B;IAC3C,OAAO,CAAC,OAAO,CAA2C;IAC1D,OAAO,CAAC,UAAU,CAA8C;IAChE,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAA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