Skip to main content
Glama
SEO-Review-Tools

SEO Review Tools - MCP server

Official

get_website_traffic

Retrieve website traffic estimates and analytics data for any URL to analyze visitor volume and engagement metrics.

Instructions

Get website traffic data from SEO Review Tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL of the website to get traffic data for.

Implementation Reference

  • The main handler function that fetches website traffic data from the SEO Review Tools API endpoint.
    const executeFunction = async ({ url }) => { const baseUrl = 'https://api.seoreviewtools.com'; const apiKey = process.env.SEO_API_WORKSPACE_API_KEY; try { // Construct the URL with query parameters const requestUrl = new URL(`${baseUrl}/website-traffic/`); requestUrl.searchParams.append('url', url); requestUrl.searchParams.append('key', apiKey); // Perform the fetch request const response = await fetch(requestUrl.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 website traffic data:', error); return { error: 'An error occurred while getting website traffic data.' }; } };
  • Tool schema definition including name, description, input parameters (url: string, required), for the get_website_traffic tool.
    definition: { type: 'function', function: { name: 'get_website_traffic', description: 'Get website traffic data from SEO Review Tools.', parameters: { type: 'object', properties: { url: { type: 'string', description: 'The URL of the website to get traffic data for.' } }, required: ['url'] } } }
  • Exports the apiTool object which combines the handler function and schema definition for registration.
    const apiTool = { function: executeFunction, definition: { type: 'function', function: { name: 'get_website_traffic', description: 'Get website traffic data from SEO Review Tools.', parameters: { type: 'object', properties: { url: { type: 'string', description: 'The URL of the website to get traffic data for.' } }, required: ['url'] } } } }; export { apiTool };
  • tools/paths.js:2-2 (registration)
    Lists the file path for the get_website_traffic tool in the toolPaths array used for dynamic loading.
    'seo-api-workspace/seo-ap-is-seo-review-tools/get-website-traffic.js',
  • lib/tools.js:7-16 (registration)
    Dynamically imports and registers all tools, including get_website_traffic, by loading apiTool from each module specified 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); }

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