UNPKG

dataforseo-mcp-server

Version:

A Model Context Protocol (MCP) server for the DataForSEO API, enabling modular and extensible integration of DataForSEO endpoints with support for both HTTP and SSE transports.

41 lines (40 loc) 1.91 kB
import { z } from 'zod'; import { BaseTool } from '../../base.tool.js'; export class BacklinksBulkPagesSummaryTool extends BaseTool { client; constructor(client) { super(client); this.client = client; } getName() { return 'backlinks_bulk_pages_summary'; } getDescription() { return "This endpoint will provide you with a comprehensive overview of backlinks and related data for a bulk of up to 1000 pages, domains, or subdomains. If you indicate a single page as a target, you will get comprehensive summary data on all backlinks for that page."; } getParams() { return { targets: z.array(z.string()).describe(`domains, subdomains or webpages to get summary data for required field a domain or a subdomain should be specified without https:// and www. a page should be specified with absolute URL (including http:// or https://) you can specify up to 1000 pages, domains, or subdomains in each request. note that the URLs you set in a single request cannot belong to more than 100 different domains.`), include_subdomains: z.boolean().optional().describe(`indicates if indirect links to the target will be included in the results if set to true, the results will include data on indirect links pointing to a page that either redirects to the target, or points to a canonical page if set to false, indirect links will be ignored`).default(true) }; } async handle(params) { try { const response = await this.client.makeRequest('/v3/backlinks/bulk_pages_summary/live', 'POST', [{ targets: params.targets, include_subdomains: params.include_subdomains, }]); return this.validateAndFormatResponse(response); } catch (error) { return this.formatErrorResponse(error); } } }