Skip to main content
Glama
ravinwebsurgeon

DataForSEO MCP Server

content_analysis_search

Analyze content sentiment and citation data for target keywords to identify trends and filter results by page type, domain, or specific content fields.

Instructions

This endpoint will provide you with detailed citation data available for the target keyword

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYestarget keyword Note: to match an exact phrase instead of a stand-alone keyword, use double quotes and backslashes;
keyword_fieldsNotarget keyword fields and target keywords use this parameter to filter the dataset by keywords that certain fields should contain; you can indicate several fields; Note: to match an exact phrase instead of a stand-alone keyword, use double quotes and backslashes; example: { "snippet": "\"logitech mouse\"", "main_title": "sale" }
page_typeNotarget page types
search_modeNoresults grouping type
limitNomaximum number of results to return
offsetNooffset in the results array of returned keywords
filtersNoarray of results filtering parameters optional field you can add several filters at once (8 filters maximum) you should set a logical operator and, or between the conditions the following operators are supported: regex, not_regex, <, <=, >, >=, =, <>, in, not_in, like,not_like, match, not_match you can use the % operator with like and not_like to match any string of zero or more characters example: ["country","=", "US"] [["domain_rank",">",800],"and",["content_info.connotation_types.negative",">",0.9]] [["domain_rank",">",800], "and", [["page_types","has","ecommerce"], "or", ["content_info.text_category","has",10994]]
order_byNoresults sorting rules optional field you can use the same values as in the filters array to sort the results possible sorting types: asc – results will be sorted in the ascending order desc – results will be sorted in the descending order you should use a comma to set up a sorting type example: ["content_info.sentiment_connotations.anger,desc"] default rule: ["content_info.sentiment_connotations.anger,desc"] note that you can set no more than three sorting rules in a single request you should use a comma to separate several sorting rules example: ["content_info.sentiment_connotations.anger,desc","keyword_data.keyword_info.cpc,desc"]

Implementation Reference

  • The core handler function that executes the tool logic: sends a POST request to the DataForSEO content_analysis/search/live endpoint with formatted parameters and processes the response.
    async handle(params: any): Promise<any> {
      try {
        const response = await this.dataForSEOClient.makeRequest('/v3/content_analysis/search/live', 'POST', [{
          keyword: params.keyword,
          page_type: params.page_type,
          search_mode: params.search_mode,
          limit: params.limit,
          offset: params.offset,
          filters: this.formatFilters(params.filters),
          order_by: this.formatOrderBy(params.order_by),
        }]);
        return this.validateAndFormatResponse(response);
      } catch (error) {
        return this.formatErrorResponse(error);
      }
    }
  • Input schema definition using Zod, specifying parameters like keyword, keyword_fields, page_type, search_mode, limit, offset, filters, and order_by.
      getParams(): z.ZodRawShape {
        return {
          keyword: z.string().describe(`target keyword
            Note: to match an exact phrase instead of a stand-alone keyword, use double quotes and backslashes;`),
          keyword_fields: z.object({
            title: z.string().optional(),
            main_title: z.string().optional(),
            previous_title: z.string().optional(),
            snippet: z.string().optional()
          }).optional().describe(
            `target keyword fields and target keywords
            use this parameter to filter the dataset by keywords that certain fields should contain;
            you can indicate several fields;
            Note: to match an exact phrase instead of a stand-alone keyword, use double quotes and backslashes;
            example:
            {
              "snippet": "\\"logitech mouse\\"",
              "main_title": "sale"
            }`
          ),
          page_type: z.array(z.enum(['ecommerce','news','blogs', 'message-boards','organization'])).optional().describe(`target page types`),
          search_mode: z.enum(['as_is', 'one_per_domain']).optional().describe(`results grouping type`),
          limit: z.number().min(1).max(1000).default(10).describe(`maximum number of results to return`),
          offset: z.number().min(0).default(0).describe(`offset in the results array of returned keywords`),
          filters: z.array(
            z.union([
              z.array(z.union([z.string(), z.number(), z.boolean()])).length(3),
              z.enum(["and", "or"])
            ])
          ).max(8).optional().describe(
            `array of results filtering parameters
    optional field
    you can add several filters at once (8 filters maximum)
    you should set a logical operator and, or between the conditions
    the following operators are supported:
    regex, not_regex, <, <=, >, >=, =, <>, in, not_in, like,not_like, match, not_match
    you can use the % operator with like and not_like to match any string of zero or more characters
    example:
    ["country","=", "US"]
    [["domain_rank",">",800],"and",["content_info.connotation_types.negative",">",0.9]]
    
    [["domain_rank",">",800],
    "and",
    [["page_types","has","ecommerce"],
    "or",
    ["content_info.text_category","has",10994]]`
          ),
          order_by: z.array(z.string()).optional().describe(
            `results sorting rules
    optional field
    you can use the same values as in the filters array to sort the results
    possible sorting types:
    asc – results will be sorted in the ascending order
    desc – results will be sorted in the descending order
    you should use a comma to set up a sorting type
    example:
    ["content_info.sentiment_connotations.anger,desc"]
    default rule:
    ["content_info.sentiment_connotations.anger,desc"]
    note that you can set no more than three sorting rules in a single request
    you should use a comma to separate several sorting rules
    example:
    ["content_info.sentiment_connotations.anger,desc","keyword_data.keyword_info.cpc,desc"]`,
          ),    };
      }
  • Tool registration within the ContentAnalysisApiModule's getTools() method: instantiates ContentAnalysisSearchTool and registers it by name with description, params, and handler.
    getTools(): Record<string, ToolDefinition> {
      const tools = [
        new ContentAnalysisSearchTool(this.dataForSEOClient),
        new ContentAnalysisSummaryTool(this.dataForSEOClient),
        new ContentAnalysisPhraseTrendsTool(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),
        },
      }), {});
    }
  • Defines the tool name 'content_analysis_search' used for registration.
    getName(): string {
      return 'content_analysis_search';
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'detailed citation data' but doesn't clarify what that includes (e.g., format, structure, or limitations). It doesn't address behavioral aspects like rate limits, authentication requirements, pagination behavior (beyond schema parameters), or whether this is a read-only operation. The description provides minimal behavioral context beyond the basic purpose.

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, efficient sentence that states the core purpose without unnecessary words. It's appropriately front-loaded with the main functionality. However, given the complexity of the tool (8 parameters, no annotations), it could benefit from slightly more structure to guide usage.

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?

For a complex search tool with 8 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what 'citation data' includes, doesn't provide examples of typical use cases, and offers no guidance on result interpretation. The agent would struggle to understand what this tool actually returns and how to use it effectively despite the comprehensive parameter schema.

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?

Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description doesn't add any meaningful parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters like 'keyword' and 'keyword_fields', or provide usage examples that combine multiple parameters. With complete schema coverage, the baseline of 3 is appropriate.

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

Purpose2/5

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

The description states 'provide you with detailed citation data available for the target keyword', which gives a general purpose but is vague about what 'citation data' entails and doesn't specify the resource domain (e.g., web content analysis). It doesn't clearly distinguish from sibling tools like 'content_analysis_summary' or 'content_analysis_phrase_trends', leaving ambiguity about when to use this specific search tool versus alternatives.

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

Usage Guidelines1/5

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

There is no guidance on when to use this tool versus alternatives. The description doesn't mention any prerequisites, context, or exclusions. Given the many sibling tools in the content_analysis category, this lack of differentiation is a significant gap that could lead to incorrect 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/ravinwebsurgeon/seo-mcp'

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