list_opportunities
Identify content and keyword opportunities flagged for a project, showing under-mention relative to competitors, ranked by expected impact.
Instructions
List content / keyword opportunities flagged for a project — prompts where the brand is under-mentioned relative to competitors, ranked by expected impact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ||
| status | No | Filter by status (e.g. "open", "addressed"). Optional. | |
| sortBy | No | Sort field (optional) | |
| page | No | ||
| limit | No |
Implementation Reference
- src/tools/opportunities.js:23-24 (handler)The handler function that executes the list_opportunities tool logic. It calls api.get(`/projects/${projectId}/opportunities`, query) to fetch opportunities from the SurfRank API.
handler: async ({ projectId, ...query }) => api.get(`/projects/${projectId}/opportunities`, query), - src/tools/opportunities.js:9-21 (schema)Input schema for list_opportunities: requires projectId, with optional status, sortBy, page, and limit parameters.
inputSchema: { type: 'object', properties: { projectId: { type: 'string' }, status: { type: 'string', description: 'Filter by status (e.g. "open", "addressed"). Optional.', }, sortBy: { type: 'string', description: 'Sort field (optional)' }, page: { type: 'number' }, limit: { type: 'number' }, }, required: ['projectId'], - src/index.js:29-38 (registration)Import and registration of opportunityTools (including list_opportunities) into the ALL_TOOLS array and toolByName map on the MCP server.
import { opportunityTools } from './tools/opportunities.js'; const ALL_TOOLS = [ ...projectTools, ...keywordTools, ...reportTools, ...quickTestTools, ...keywordResearchTools, ...competitorTools, ...opportunityTools, - src/client.js:78-83 (helper)The api.get helper method used by the handler, which calls the low-level request function with HTTP GET.
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), };