add_competitor
Add a competitor domain to a project for side-by-side visibility tracking.
Instructions
Add a competitor domain to a project for side-by-side visibility tracking.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ||
| domain | Yes | Competitor root domain | |
| name | No | Display name (optional) |
Implementation Reference
- src/tools/competitors.js:14-28 (handler)The 'add_competitor' tool definition with its inputSchema and handler function. The handler makes a POST request to `/projects/{projectId}/competitors` with the domain (and optional name) body.
{ name: 'add_competitor', description: 'Add a competitor domain to a project for side-by-side visibility tracking.', inputSchema: { type: 'object', properties: { projectId: { type: 'string' }, domain: { type: 'string', description: 'Competitor root domain' }, name: { type: 'string', description: 'Display name (optional)' }, }, required: ['projectId', 'domain'], }, handler: async ({ projectId, ...body }) => api.post(`/projects/${projectId}/competitors`, body), }, - src/tools/competitors.js:17-25 (schema)Input schema for 'add_competitor': requires projectId (string) and domain (string), with an optional name (string).
inputSchema: { type: 'object', properties: { projectId: { type: 'string' }, domain: { type: 'string', description: 'Competitor root domain' }, name: { type: 'string', description: 'Display name (optional)' }, }, required: ['projectId', 'domain'], }, - src/index.js:28-28 (registration)Import of competitorTools from the competitors.js module.
import { competitorTools } from './tools/competitors.js'; - src/index.js:37-37 (registration)Spread of competitorTools into the ALL_TOOLS array to register all competitor tools, including 'add_competitor'.
...competitorTools,