Skip to main content
Glama
ravinwebsurgeon

DataForSEO MCP Server

backlinks_available_filters

Discover available filters for DataForSEO Backlinks API endpoints to refine search results and analyze link data effectively.

Instructions

Here you will find all the necessary information about filters that can be used with DataForSEO Backlinks API endpoints.

Please, keep in mind that filters are associated with a certain object in the result array, and should be specified accordingly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolNoThe name of the tool to get filters for

Implementation Reference

  • The main handler function that fetches cached or fresh available filters from DataForSEO Backlinks API and returns them, either all or specific to the provided tool name.
    async handle(params: any): Promise<any> {
      try {
        const filters = await this.fetchAndCacheFilters();
        
        if (!params.tool) {
          return this.formatResponse(filters);
        }
    
        const toolFilters = filters[params.tool];
        if (!toolFilters) {
          throw new Error(`No filters found for tool: ${params.tool}`);
        }
    
        return this.formatResponse(toolFilters);
      } catch (error) {
        return this.formatErrorResponse(error);
      }
    }
  • Defines the input schema using Zod: optional 'tool' parameter as string.
    getParams(): z.ZodRawShape {
      return {
        tool: z.string().optional().describe('The name of the tool to get filters for')
      };
  • Instantiates BacklinksFiltersTool and registers it along with other tools into a dictionary keyed by tool name, exposing description, params, and handler function.
    getTools(): Record<string, ToolDefinition> {
      const tools = [
        new BacklinksTool(this.dataForSEOClient),
        new BacklinksAnchorTool(this.dataForSEOClient),
        new BacklinksBulkBacklinksTool(this.dataForSEOClient),
        new BacklinksBulkNewLostReferringDomainsTool(this.dataForSEOClient),
        new BacklinksBulkNewLostBacklinksTool(this.dataForSEOClient),
        new BacklinksBulkRanksTool(this.dataForSEOClient),
        new BacklinksBulkReferringDomainsTool(this.dataForSEOClient),
        new BacklinksBulkSpamScoreTool(this.dataForSEOClient),
        new BacklinksCompetitorsTool(this.dataForSEOClient),
        new BacklinksDomainIntersectionTool(this.dataForSEOClient),
        new BacklinksDomainPagesSummaryTool(this.dataForSEOClient),
        new BacklinksDomainPagesTool(this.dataForSEOClient),
        new BacklinksPageIntersectionTool(this.dataForSEOClient),
        new BacklinksReferringDomainsTool(this.dataForSEOClient),
        new BacklinksReferringNetworksTool(this.dataForSEOClient),
        new BacklinksSummaryTool(this.dataForSEOClient),
        new BacklinksTimeseriesNewLostSummaryTool(this.dataForSEOClient),
        new BacklinksTimeseriesSummaryTool(this.dataForSEOClient),
        new BacklinksBulkPagesSummaryTool(this.dataForSEOClient),
        new BacklinksFiltersTool(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),
        },
      }), {});
    }
  • Fetches available filters from DataForSEO API if cache expired, parses response using TOOL_TO_FILTER_MAP to extract filters for each backlinks tool, and caches the result for 24 hours.
    private async fetchAndCacheFilters(): Promise<ToolFilters> {
      const now = Date.now();
      
      // Return cached data if it's still valid
      if (BacklinksFiltersTool.cache && 
          (now - BacklinksFiltersTool.lastFetchTime) < BacklinksFiltersTool.CACHE_TTL) {
        return BacklinksFiltersTool.cache;
      }
    
      // Fetch fresh data
      const response = await this.client.makeRequest('/v3/backlinks/available_filters', 'GET', null, true) as DataForSEOFullResponse;
      this.validateResponseFull(response);
    
      // Transform the response into our cache format
      const filters: ToolFilters = {};
      const result = response.tasks[0].result[0];
    
      // Process each tool's filters
      for (const [toolName, filterPath] of Object.entries(BacklinksFiltersTool.TOOL_TO_FILTER_MAP)) {
        const pathParts = filterPath.split('.');
        let current = result;
        
        // Navigate to the correct filter object
        for (const part of pathParts) {
          if (current && current[part]) {
            current = current[part];
          } else {
            current = null;
            break;
          }
        }
    
        if (current) {
          filters[toolName] = current;
        }
      }
    
      // Update cache
      BacklinksFiltersTool.cache = filters;
      BacklinksFiltersTool.lastFetchTime = now;
    
      return filters;
    }
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 hints at behavioral aspects by noting filters are 'associated with a certain object,' but fails to disclose key traits like whether this is a read-only operation, what the output format is, any rate limits, or authentication needs. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness3/5

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

The description is two sentences and avoids unnecessary length, but it's not optimally front-loaded—the first sentence is somewhat generic, and the second adds context but could be more direct. It's concise but lacks the crispness of higher-scoring examples, with room for improvement in structure.

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 tool's complexity (providing filter information for API endpoints) and lack of annotations or output schema, the description is incomplete. It doesn't explain what the tool returns, how to interpret the filters, or any dependencies, making it inadequate for effective use without additional context.

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 input schema has 1 parameter with 100% description coverage ('tool' parameter is documented), so the baseline is 3. The description does not add any meaning beyond the schema, as it doesn't explain the 'tool' parameter's purpose or usage in context, but the schema adequately covers it, resulting in a minimal viable score.

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 it provides 'information about filters that can be used with DataForSEO Backlinks API endpoints,' which gives a general purpose but is vague about what specific action the tool performs (e.g., list, retrieve, describe). It doesn't clearly distinguish from sibling tools like 'backlinks_available_filters' vs. 'dataforseo_labs_available_filters' or other filter-related tools, making it tautological in restating the tool name's implication without specificity.

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 mentions that 'filters are associated with a certain object in the result array, and should be specified accordingly,' which offers some implied context but lacks explicit guidance on when to use this tool versus alternatives (e.g., other filter tools or backlinks endpoints). No when-not-to-use or prerequisite information is provided, leaving usage unclear.

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