list_competitors
Retrieve all competitors tracked for a given project to analyze competitive landscape.
Instructions
List all tracked competitors for a project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes |
Implementation Reference
- src/tools/competitors.js:12-12 (handler)The handler function that executes the list_competitors tool logic. It calls api.get to fetch competitors for a given projectId.
handler: async ({ projectId }) => api.get(`/projects/${projectId}/competitors`), - src/tools/competitors.js:7-11 (schema)Input schema for list_competitors: requires a projectId string parameter.
inputSchema: { type: 'object', properties: { projectId: { type: 'string' } }, required: ['projectId'], }, - src/tools/competitors.js:4-13 (registration)Tool definition object including name, description, inputSchema, and handler for list_competitors, exported in the competitorTools array.
{ name: 'list_competitors', description: 'List all tracked competitors for a project.', inputSchema: { type: 'object', properties: { projectId: { type: 'string' } }, required: ['projectId'], }, handler: async ({ projectId }) => api.get(`/projects/${projectId}/competitors`), }, - src/index.js:31-39 (registration)The list_competitors tool is registered into the ALL_TOOLS array via spread of competitorTools.
const ALL_TOOLS = [ ...projectTools, ...keywordTools, ...reportTools, ...quickTestTools, ...keywordResearchTools, ...competitorTools, ...opportunityTools, ]; - src/index.js:67-78 (registration)The MCP CallTool handler looks up list_competitors from toolByName map and invokes its handler.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args = {} } = request.params; const tool = toolByName.get(name); if (!tool) { return { isError: true, content: [{ type: 'text', text: `Unknown tool: ${name}` }], }; } try { const result = await tool.handler(args);