Skip to main content
Glama
SurfRankAI

SurfRank MCP Server

by SurfRankAI

research_keyword

Research a keyword across AI engines to obtain volume, intent, related prompts, and competitor mentions.

Instructions

Research a keyword across every configured AI engine. Returns volume, intent, related prompts, and competitor mentions. Cost: ~0.5 credits × engines. If the API key is scoped to a project, websiteId must be passed and must match that scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYesThe keyword / prompt to research
countryNoISO-2 country code (optional)
websiteIdNoAssociate the research with a project (optional but recommended)

Implementation Reference

  • The handler for 'research_keyword': sends a POST request to /keyword-research via the SurfRank API client.
    handler: async (input) => api.post('/keyword-research', input),
  • Input schema for 'research_keyword': accepts keyword (required), country (optional ISO-2), and websiteId (optional).
    inputSchema: {
      type: 'object',
      properties: {
        keyword: { type: 'string', description: 'The keyword / prompt to research' },
        country: { type: 'string', description: 'ISO-2 country code (optional)' },
        websiteId: {
          type: 'string',
          description: 'Associate the research with a project (optional but recommended)',
        },
      },
      required: ['keyword'],
    },
  • src/index.js:31-39 (registration)
    Tool registration: keywordResearchTools is spread into ALL_TOOLS and indexed by name in toolByName map.
    const ALL_TOOLS = [
      ...projectTools,
      ...keywordTools,
      ...reportTools,
      ...quickTestTools,
      ...keywordResearchTools,
      ...competitorTools,
      ...opportunityTools,
    ];
  • The tool definition object with name 'research_keyword', description, inputSchema, and handler is exported as part of keywordResearchTools array.
    export const keywordResearchTools = [
      {
        name: 'research_keyword',
        description:
          'Research a keyword across every configured AI engine. Returns volume, intent, related ' +
          'prompts, and competitor mentions. Cost: ~0.5 credits × engines. If the API key is scoped ' +
          'to a project, `websiteId` must be passed and must match that scope.',
        inputSchema: {
          type: 'object',
          properties: {
            keyword: { type: 'string', description: 'The keyword / prompt to research' },
            country: { type: 'string', description: 'ISO-2 country code (optional)' },
            websiteId: {
              type: 'string',
              description: 'Associate the research with a project (optional but recommended)',
            },
          },
          required: ['keyword'],
        },
        handler: async (input) => api.post('/keyword-research', input),
      },
      {
        name: 'list_keyword_research',
        description: 'List past keyword research runs, optionally filtered by project.',
        inputSchema: {
          type: 'object',
          properties: {
            websiteId: { type: 'string' },
            page: { type: 'number', description: '1-based page index' },
            limit: { type: 'number', description: 'Results per page (default 20)' },
          },
        },
        handler: async ({ websiteId, page, limit }) =>
          api.get('/keyword-research', { websiteId, page, limit }),
      },
      {
        name: 'get_keyword_research',
        description: 'Get a single keyword-research run by ID.',
        inputSchema: {
          type: 'object',
          properties: { researchId: { type: 'string' } },
          required: ['researchId'],
        },
        handler: async ({ researchId }) => api.get(`/keyword-research/${researchId}`),
      },
    ];
  • The api.post method (line 80) that the handler delegates to, which calls the SurfRank public API.
    export const api = {
      get: (path, query) => request('GET', path, { query }),
      post: (path, body) => request('POST', path, { body }),
      patch: (path, body) => request('PATCH', path, { body }),
      delete: (path) => request('DELETE', path),
    };
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses cost per usage and scope constraints. No annotations exist, so description carries full burden. Lacks details on idempotency or error scenarios but sufficient for basic behavioral understanding.

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

Conciseness5/5

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

Two concise sentences with no redundancy. Main action upfront, followed by cost and condition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers purpose, outputs, cost, and a key usage condition. No output schema exists, so description sufficiently explains return values.

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?

Schema coverage is 100%, so description adds marginal value. The cost hint and websiteId condition are useful but not deep parameter elaboration.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Research a keyword across every configured AI engine' and lists specific outputs (volume, intent, related prompts, competitor mentions). Distinguishes from siblings like add_keyword or get_keyword_research.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides cost context and a clear condition (websiteId required for project-scoped keys). Does not explicitly exclude alternatives or state when not to use.

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/SurfRankAI/mcp-server'

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