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),
        },
      }), {});
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that the tool returns 'page-specific data' about SEO optimization, but fails to describe critical behaviors: what the output format looks like, whether it's a read-only operation, potential rate limits, authentication needs, or error handling. The description is too high-level to guide an agent effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the core function. However, it could be slightly more structured by explicitly separating purpose from context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a 5-parameter tool with no annotations and no output schema, the description is incomplete. It doesn't explain the return format, error conditions, or how parameters interact with the SEO analysis. For a tool that likely returns structured data about page optimization, more context is needed to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema—it doesn't explain how parameters like 'custom_js' or 'enable_javascript' affect the SEO analysis. This meets the baseline of 3 when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'get page-specific data with detailed information on how well a particular page is optimized for organic search'. It specifies the verb ('get') and resource ('page-specific data'), and distinguishes it from sibling tools like 'on_page_content_parsing' or 'on_page_lighthouse' by focusing on SEO optimization assessment. However, it doesn't explicitly differentiate from all siblings, so it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'on_page_content_parsing' or 'on_page_lighthouse' that might serve similar purposes, nor does it specify prerequisites or exclusions. The only implied usage is for analyzing page SEO, but this is too vague for effective tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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