Skip to main content
Glama

wp_seo_test_integration

Test SEO plugin integration on WordPress sites to detect installed plugins and verify metadata access for proper SEO functionality.

Instructions

Test SEO plugin integration and detect available SEO plugins on the WordPress site

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoSite identifier for multi-site setups
checkPluginsNoCheck which SEO plugins are installed and active
testMetadataAccessNoTest ability to read/write SEO metadata

Implementation Reference

  • Core implementation of the wp_seo_test_integration tool logic, performing SEO plugin detection, metadata access tests, and generating recommendations.
    /** * Test SEO plugin integration and WordPress API connectivity */ async testSEOIntegration(params: SEOToolParams): Promise<unknown> { const siteLogger = LoggerFactory.tool("wp_seo_test_integration", params.site); return await siteLogger.time("Test SEO integration", async () => { try { const seoClient = await this.getSEOClient(params.site); // Test the integration const integrationTest = await seoClient.testSEOIntegration(); // Get some sample SEO data let sampleSEOData = null; if (integrationTest.canReadMetadata && integrationTest.samplePostsWithSEO > 0) { try { const posts = await seoClient.getPosts({ per_page: 1, status: ["publish"] }); if (posts && posts.length > 0) { sampleSEOData = await seoClient.getSEOMetadata(posts[0].id); } } catch (_error) { // Sample data fetch failed, but that's okay this.logger.debug("Failed to fetch sample SEO data", { _error: _error }); } } const result = { integrationTest, sampleSEOData, recommendations: this.generateIntegrationRecommendations(integrationTest), testedAt: new Date().toISOString(), }; siteLogger.info("SEO integration test completed", { plugin: integrationTest.pluginDetected, canRead: integrationTest.canReadMetadata, canWrite: integrationTest.canWriteMetadata, postsWithSEO: integrationTest.samplePostsWithSEO, }); return result; } catch (_error) { handleToolError(_error, "test SEO integration", { site: params.site, }); throw _error; } }); }
  • MCP protocol handler entry point for wp_seo_test_integration, parses arguments and delegates to SEOTools.testSEOIntegration method.
    export async function handleTestSEOIntegration( client: WordPressClient, args: Record<string, unknown>, ): Promise<unknown> { const logger = LoggerFactory.tool("wp_seo_test_integration"); try { const seoTools = getSEOToolsInstance(); const params: SEOToolParams = { checkPlugins: args.checkPlugins as boolean, testMetadataAccess: args.testMetadataAccess as boolean, site: args.site as string, }; return await seoTools.testSEOIntegration(params); } catch (error) { logger.error("Failed to test SEO integration", { error, args }); throw error; } }
  • Tool definition including name, description, and input schema for wp_seo_test_integration.
    export const testSEOIntegrationTool: Tool = { name: "wp_seo_test_integration", description: "Test SEO plugin integration and detect available SEO plugins on the WordPress site", inputSchema: { type: "object", properties: { checkPlugins: { type: "boolean", description: "Check which SEO plugins are installed and active", }, testMetadataAccess: { type: "boolean", description: "Test ability to read/write SEO metadata", }, site: { type: "string", description: "Site identifier for multi-site setups", }, }, required: [], }, };
  • Handler mapping registration that associates 'wp_seo_test_integration' with its handler function for MCP tool registration.
    const handlers: Record<string, unknown> = { wp_seo_analyze_content: handleAnalyzeContent, wp_seo_generate_metadata: handleGenerateMetadata, wp_seo_bulk_update_metadata: handleBulkUpdateMetadata, wp_seo_generate_schema: handleGenerateSchema, wp_seo_validate_schema: handleValidateSchema, wp_seo_suggest_internal_links: handleSuggestInternalLinks, wp_seo_site_audit: handlePerformSiteAudit, wp_seo_track_serp: handleTrackSERPPositions, wp_seo_keyword_research: handleKeywordResearch, wp_seo_test_integration: handleTestSEOIntegration, wp_seo_get_live_data: handleGetLiveSEOData, };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/docdyhr/mcp-wordpress'

If you have feedback or need assistance with the MCP directory API, please join our Discord server