Skip to main content
Glama
SEO-Review-Tools

SEO Review Tools - MCP server

Official

get_backlinks

Retrieve backlinks for a specific URL using SEO Review Tools. Analyze link data with options to filter by unique domains for enhanced SEO strategy insights.

Instructions

Get backlinks for a specified URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unique_domainsNoWhether to return unique domains (1 for yes, 0 for no).
urlYesThe URL for which to retrieve backlinks.

Implementation Reference

  • Implements the core logic of the get_backlinks tool by making an API request to SEO Review Tools to fetch backlinks for the specified URL.
    const executeFunction = async ({ url, unique_domains = 1 }) => { const baseUrl = 'https://api.seoreviewtools.com/backlinks/'; const apiKey = process.env.SEO_API_WORKSPACE_API_KEY; try { // Construct the URL with query parameters const urlWithParams = new URL(baseUrl); urlWithParams.searchParams.append('url', url); urlWithParams.searchParams.append('unique_domains', unique_domains.toString()); urlWithParams.searchParams.append('key', apiKey); // Perform the fetch request const response = await fetch(urlWithParams.toString(), { method: 'GET', headers: { 'Content-Type': 'application/json' } }); // Check if the response was successful if (!response.ok) { const errorData = await response.json(); throw new Error(errorData); } // Parse and return the response data const data = await response.json(); return data; } catch (error) { console.error('Error getting backlinks:', error); return { error: 'An error occurred while getting backlinks.' }; } };
  • Defines the input schema for the get_backlinks tool, including parameters url (required) and optional unique_domains.
    name: 'get_backlinks', description: 'Get backlinks for a specified URL.', parameters: { type: 'object', properties: { url: { type: 'string', description: 'The URL for which to retrieve backlinks.' }, unique_domains: { type: 'integer', description: 'Whether to return unique domains (1 for yes, 0 for no).' } }, required: ['url'] } }
  • tools/paths.js:6-6 (registration)
    Lists the file path for the get_backlinks tool, enabling its discovery during tool loading.
    'seo-api-workspace/seo-ap-is-seo-review-tools/get-backlinks.js',
  • lib/tools.js:7-16 (registration)
    Dynamically discovers and loads the get_backlinks tool (and others) by importing from paths listed in toolPaths.
    export async function discoverTools() { const toolPromises = toolPaths.map(async (file) => { const module = await import(`../tools/${file}`); return { ...module.apiTool, path: file, }; }); return Promise.all(toolPromises); }

Other Tools

Related 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/SEO-Review-Tools/SEO-API-MCP'

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