get-reports
Retrieve your Audiense Insights reports to access audience data, demographics, and marketing insights for analysis.
Instructions
Retrieves the list of Audiense insights reports owned by the authenticated user.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:25-47 (handler)Handler function that fetches intelligence reports via getIntelligenceReports and returns formatted JSON response or error message.async () => { const data = await getIntelligenceReports(); if (!data) { return { content: [ { type: "text", text: "Failed to retrieve intelligence reports.", }, ], }; } return { content: [ { type: "text", text: JSON.stringify(data, null, 2) }, ], }; }
- src/index.ts:22-48 (registration)Registration of the 'get-reports' MCP tool with server.tool, including description, empty input schema, and inline handler."get-reports", "Retrieves the list of Audiense insights reports owned by the authenticated user.", {}, async () => { const data = await getIntelligenceReports(); if (!data) { return { content: [ { type: "text", text: "Failed to retrieve intelligence reports.", }, ], }; } return { content: [ { type: "text", text: JSON.stringify(data, null, 2) }, ], }; } );
- src/audienseClient.ts:86-89 (helper)Helper function getIntelligenceReports that performs the authenticated API call to retrieve the list of intelligence reports from Audiense.export async function getIntelligenceReports(): Promise<IntelligenceReportsResponse | null> { return makeAudienseRequest<IntelligenceReportsResponse>("/reports/intelligence"); }