seo_traffic
Analyze website traffic for any domain or URL using ReviewWeb.site API. Specify mode (subdomains or exact) and country code for precise insights on visitor data.
Instructions
Check traffic for a domain or URL using ReviewWeb.site API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | Your ReviewWebsite API key | |
| country | No | Country code (default: None) | |
| domainOrUrl | Yes | The domain or URL to check traffic for | |
| mode | No | Mode to use (default: subdomains) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"api_key": {
"description": "Your ReviewWebsite API key",
"type": "string"
},
"country": {
"description": "Country code (default: None)",
"type": "string"
},
"domainOrUrl": {
"description": "The domain or URL to check traffic for",
"type": "string"
},
"mode": {
"description": "Mode to use (default: subdomains)",
"enum": [
"subdomains",
"exact"
],
"type": "string"
}
},
"required": [
"domainOrUrl"
],
"type": "object"
}
Implementation Reference
- src/tools/reviewwebsite.tool.ts:629-663 (handler)MCP tool handler function that executes the 'seo_traffic' tool logic by calling the ReviewWebsite controller's getTraffic method and formatting the response.async function handleGetTraffic(args: SeoTrafficToolArgsType) { const methodLogger = Logger.forContext( 'tools/reviewwebsite.tool.ts', 'handleGetTraffic', ); methodLogger.debug(`Checking traffic:`, { ...args, api_key: args.api_key ? '[REDACTED]' : undefined, }); try { const result = await reviewWebsiteController.getTraffic( args.domainOrUrl, { mode: args.mode, country: args.country, }, { api_key: args.api_key, }, ); return { content: [ { type: 'text' as const, text: result.content, }, ], }; } catch (error) { methodLogger.error(`Error checking traffic`, error); return formatErrorForMcpTool(error); } }
- src/tools/reviewwebsite.tool.ts:811-816 (registration)Registration of the 'seo_traffic' tool with the MCP server, specifying name, description, input schema, and handler function.server.tool( 'seo_traffic', `Check traffic for a domain or URL using ReviewWeb.site API.`, SeoTrafficToolArgs.shape, handleGetTraffic, );
- Zod schema definition for the input arguments of the 'seo_traffic' tool.export const SeoTrafficToolArgs = z.object({ domainOrUrl: z.string().describe('The domain or URL to check traffic for'), mode: z .enum(['subdomains', 'exact']) .optional() .describe('Mode to use (default: subdomains)'), country: z.string().optional().describe('Country code (default: None)'), api_key: z.string().optional().describe('Your ReviewWebsite API key'), });