get_site_statistics
Retrieve AniList site statistics, including trends and metrics, from the last seven days to analyze user activity and platform usage.
Instructions
Get AniList site statistics over the last seven days
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools/misc.ts:116-143 (registration)Registers the 'get_site_statistics' MCP tool with an inline handler that fetches and returns AniList site statistics over the last seven days as JSON text, handling errors appropriately.server.tool( "get_site_statistics", "Get AniList site statistics over the last seven days", {}, { title: "Get Site Statistics", readOnlyHint: true, openWorldHint: true, }, async () => { try { const statistics = await anilist.siteStatistics(); return { content: [ { type: "text", text: JSON.stringify(statistics, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, );
- tools/misc.ts:125-142 (handler)The handler function for the 'get_site_statistics' tool, which calls anilist.siteStatistics() and formats the response.async () => { try { const statistics = await anilist.siteStatistics(); return { content: [ { type: "text", text: JSON.stringify(statistics, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } },