Skip to main content
Glama
SurfRankAI

SurfRank MCP Server

by SurfRankAI

add_keyword

Add a keyword to a project to monitor AI engine visibility across all configured engines on the next report run.

Instructions

Add a single keyword (prompt) to a project. SurfRank will query every configured AI engine with this prompt on the next report run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes
phraseYesThe prompt text, e.g. "best crm software"

Implementation Reference

  • The handler function for the 'add_keyword' tool. It calls api.post with the projectId and phrase to add a single keyword/prompt to a project.
    handler: async ({ projectId, phrase }) =>
      api.post(`/projects/${projectId}/keywords`, { phrase }),
  • The input schema for the 'add_keyword' tool, requiring projectId and phrase properties.
    inputSchema: {
      type: 'object',
      properties: {
        projectId: { type: 'string' },
        phrase: { type: 'string', description: 'The prompt text, e.g. "best crm software"' },
      },
      required: ['projectId', 'phrase'],
    },
  • src/index.js:31-39 (registration)
    The 'add_keyword' tool is registered as part of keywordTools array which is spread into ALL_TOOLS and indexed by name in the toolByName Map.
    const ALL_TOOLS = [
      ...projectTools,
      ...keywordTools,
      ...reportTools,
      ...quickTestTools,
      ...keywordResearchTools,
      ...competitorTools,
      ...opportunityTools,
    ];
  • src/index.js:24-24 (registration)
    The import of keywordTools from the keywords.js file into the main index.js entry point.
    import { keywordTools } from './tools/keywords.js';
  • The api.post method used by the add_keyword handler to make the HTTP POST request to the SurfRank 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),
    };
Behavior3/5

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

With no annotations, the description carries full burden. It discloses the effect (future queries) but does not mention behavior on duplicate phrases, error conditions, or side effects on existing keywords.

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?

Single concise sentence that front-loads the action and consequence. No wasted words.

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

Completeness4/5

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

For a simple add operation with two params and no output schema, the description adequately explains what it does and its effect. Missing details like allowed duplicates or return values, but sufficient for basic use.

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 50% (phrase has description, projectId does not). The description adds a useful example for phrase but does not compensate for the missing projectId documentation. Overall partial value.

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?

The description clearly states the action 'Add a single keyword (prompt) to a project' and explains the consequence: it will be queried on the next report run. This distinguishes it from siblings like add_keywords_bulk, which handles multiple keywords.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool vs alternatives like add_keywords_bulk. It does not mention prerequisites (e.g., project existence) or when not to use it.

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