get-report-info
Retrieve intelligence report details including status, segmentation, audience size, and access links from Audiense Insights to analyze marketing data.
Instructions
Retrieves detailed information about a specific intelligence report, including its status, segmentation type, audience size, segments, and access links.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| report_id | Yes | The ID of the intelligence report. |
Implementation Reference
- src/index.ts:59-92 (handler)MCP tool handler that invokes getReportInfo, handles errors, pending status, and formats the response as JSON text.async ({ report_id }) => { const data = await getReportInfo(report_id); if (!data) { return { content: [ { type: "text", text: `Failed to retrieve report info for ID: ${report_id}.`, }, ], }; } if (data.status === "pending") { return { content: [ { type: "text", text: `Report ${report_id} is still processing. Try again later.`, }, ], }; } return { content: [ { type: "text", text: JSON.stringify(data, null, 2) } ] }; }
- src/index.ts:56-58 (schema)Zod input schema defining the required 'report_id' parameter.{ report_id: z.string().describe("The ID of the intelligence report."), },
- src/index.ts:53-93 (registration)Registers the 'get-report-info' MCP tool with server, including name, description, schema, and handler.server.tool( "get-report-info", "Retrieves detailed information about a specific intelligence report, including its status, segmentation type, audience size, segments, and access links.", { report_id: z.string().describe("The ID of the intelligence report."), }, async ({ report_id }) => { const data = await getReportInfo(report_id); if (!data) { return { content: [ { type: "text", text: `Failed to retrieve report info for ID: ${report_id}.`, }, ], }; } if (data.status === "pending") { return { content: [ { type: "text", text: `Report ${report_id} is still processing. Try again later.`, }, ], }; } return { content: [ { type: "text", text: JSON.stringify(data, null, 2) } ] }; } );
- src/audienseClient.ts:93-95 (helper)Core helper function that performs the authenticated API request to retrieve specific report information.export async function getReportInfo(report_id: string): Promise<ReportInfoResponse | null> { return makeAudienseRequest<ReportInfoResponse>(`/reports/intelligence/${report_id}`); }
- src/types.ts:24-42 (schema)TypeScript interface defining the structure of the report info response data.export type ReportInfoResponse = { title: string; status: string; segmentation_type: string; full_audience?: { size?: number; audience_influencers_id?: string; }; segments?: { id: string; title: string; size: number; audience_influencers_id?: string; }[]; audience_influencers_id?: string; public: boolean; links?: { app?: string; public?: string }; errors?: string[]; };