Skip to main content
Glama
cortex8

DataForSEO MCP Server

by cortex8

on_page_instant_pages

Analyze page-specific SEO optimization data to identify improvements for organic search performance, including technical metrics and content optimization insights.

Instructions

Using this function you will get page-specific data with detailed information on how well a particular page is optimized for organic search

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accept_languageNolanguage header for accessing the website all locale formats are supported (xx, xx-XX, xxx-XX, etc.) Note: if you do not specify this parameter, some websites may deny access; in this case, pages will be returned with the "type":"broken in the response array
custom_jsNoCustom JavaScript code to execute
custom_user_agentNoCustom User-Agent header
enable_javascriptNoEnable JavaScript rendering
urlYesURL to analyze

Implementation Reference

  • Executes the tool by making a POST request to DataForSEO's /v3/on_page/instant_pages endpoint with the provided parameters, handles response and errors using base tool methods.
    async handle(params: { url: string; enable_javascript?: boolean; custom_js?: string; custom_user_agent?: string; accept_language?: string; }): Promise<any> { try { const response = await this.dataForSEOClient.makeRequest('/v3/on_page/instant_pages', 'POST', [{ url: params.url, enable_javascript: params.enable_javascript, custom_js: params.custom_js, custom_user_agent: params.custom_user_agent, accept_language: params.accept_language, }]); return this.validateAndFormatResponse(response); } catch (error) { return this.formatErrorResponse(error); } }
  • Defines the Zod schema for the tool's input parameters: required URL and optional JavaScript rendering options.
    getParams(): z.ZodRawShape { return { url: z.string().describe("URL to analyze"), enable_javascript: z.boolean().optional().describe("Enable JavaScript rendering"), custom_js: z.string().optional().describe("Custom JavaScript code to execute"), custom_user_agent: z.string().optional().describe("Custom User-Agent header"), accept_language: z.string().optional().describe(`language header for accessing the website all locale formats are supported (xx, xx-XX, xxx-XX, etc.) Note: if you do not specify this parameter, some websites may deny access; in this case, pages will be returned with the "type":"broken in the response array`), }; }
  • Registers the InstantPagesTool by instantiating it and including it in the module's tools map under its getName(), with description, params, and handler.
    getTools(): Record<string, ToolDefinition> { const tools = [ new ContentParsingTool(this.dataForSEOClient), new InstantPagesTool(this.dataForSEOClient), new LighthouseTool(this.dataForSEOClient), // Add more tools here ]; return tools.reduce((acc, tool) => ({ ...acc, [tool.getName()]: { description: tool.getDescription(), params: tool.getParams(), handler: (params: any) => tool.handle(params), }, }), {}); }

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/cortex8/oyt-dataforseo-mcp-worker'

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