get_latest_analyses
Retrieve per-keyword analyses from the most recent completed report to inspect which prompts mention your brand and which engines surfaced it.
Instructions
Get the per-keyword analyses from the project's most recent completed report. Useful for inspecting which prompts mention the brand and which engines surfaced it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes |
Implementation Reference
- src/tools/reports.js:54-56 (handler)Handler function for the 'get_latest_analyses' tool. Calls the SurfRank API endpoint GET /projects/{projectId}/reports/latest/analyses to fetch per-keyword analyses from the most recent completed report.
handler: async ({ projectId }) => api.get(`/projects/${projectId}/reports/latest/analyses`), }, - src/tools/reports.js:49-53 (schema)Input schema for the tool. Accepts a single required string parameter 'projectId'.
inputSchema: { type: 'object', properties: { projectId: { type: 'string' } }, required: ['projectId'], }, - src/index.js:34-34 (registration)The 'get_latest_analyses' tool is registered in the MCP server by spreading the 'reportTools' array into 'ALL_TOOLS'. The server's ListTools handler exposes it, and the CallTool handler dispatches to it via toolByName lookup.
...reportTools, - src/client.js:78-78 (helper)The HTTP client helper used by the handler. 'api.get' delegates to the 'request' function which sends authenticated GET requests to the SurfRank API.
export const api = {