list_projects
List all SurfRank projects the caller has access to. Returns every tracked website associated with your account or a single project if API key is scoped.
Instructions
List every SurfRank project (tracked website) the caller has access to. If the API key is scoped to a single project, only that one is returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/projects.js:8-15 (handler)The handler function for the 'list_projects' tool. It is an async function that calls api.get('/projects') to retrieve all SurfRank projects.
{ name: 'list_projects', description: 'List every SurfRank project (tracked website) the caller has access to. ' + 'If the API key is scoped to a single project, only that one is returned.', inputSchema: { type: 'object', properties: {}, additionalProperties: false }, handler: async () => api.get('/projects'), }, - src/tools/projects.js:7-15 (schema)The input schema definition for 'list_projects'. It has no required parameters and accepts an empty object (type: object, no properties, additionalProperties: false).
export const projectTools = [ { name: 'list_projects', description: 'List every SurfRank project (tracked website) the caller has access to. ' + 'If the API key is scoped to a single project, only that one is returned.', inputSchema: { type: 'object', properties: {}, additionalProperties: false }, handler: async () => api.get('/projects'), }, - src/index.js:31-39 (registration)The 'list_projects' tool is registered as part of the projectTools array, which is spread into ALL_TOOLS (line 32) and served via the MCP ListToolsRequestSchema handler (line 58). The tool is also looked up by name in the toolByName Map (line 41) for execution via CallToolRequestSchema (line 69).
const ALL_TOOLS = [ ...projectTools, ...keywordTools, ...reportTools, ...quickTestTools, ...keywordResearchTools, ...competitorTools, ...opportunityTools, ]; - src/tools/projects.js:1-1 (helper)The api client used by the handler is imported from '../client.js', which provides the get/post/patch/delete methods that call the SurfRank public API.
import { api } from '../client.js'; - src/tools/projects.js:9-9 (registration)The tool is named 'list_projects' as part of the projectTools array exported from this file.
name: 'list_projects',