Skip to main content
Glama

get-stats

Retrieve page view statistics from your note.com dashboard with customizable filters for time periods, sorting options, and pagination to analyze content performance.

Instructions

ダッシュボードのPV統計情報を取得する

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNo期間フィルターall
pageNoページ番号
sortNoソート方法(pv: PV数順, date: 日付順)pv

Implementation Reference

  • The main handler function for the 'get-stats' tool. It fetches PV (page view) statistics from the note.com dashboard API endpoint '/v1/stats/pv', supporting filters like 'all', 'day', etc., pagination, and sorting by PV or date.
    async ({ filter, page, sort }) => { try { const data = await noteApiRequest(`/v1/stats/pv?filter=${filter}&page=${page}&sort=${sort}`, "GET", null, true); return createSuccessResponse(data); } catch (error) { return handleApiError(error, "統計情報取得"); } }
  • Zod input schema defining parameters for the 'get-stats' tool: filter (enum: all/day/week/month), page (number), sort (enum: pv/date).
    filter: z.enum(["all", "day", "week", "month"]).default("all").describe("期間フィルター"), page: z.number().default(1).describe("ページ番号"), sort: z.enum(["pv", "date"]).default("pv").describe("ソート方法(pv: PV数順, date: 日付順)"), },
  • Registration of the 'get-stats' tool on the MCP server using server.tool(), including name, description, input schema, and handler function.
    server.tool( "get-stats", "ダッシュボードのPV統計情報を取得する", { filter: z.enum(["all", "day", "week", "month"]).default("all").describe("期間フィルター"), page: z.number().default(1).describe("ページ番号"), sort: z.enum(["pv", "date"]).default("pv").describe("ソート方法(pv: PV数順, date: 日付順)"), }, async ({ filter, page, sort }) => { try { const data = await noteApiRequest(`/v1/stats/pv?filter=${filter}&page=${page}&sort=${sort}`, "GET", null, true); return createSuccessResponse(data); } catch (error) { return handleApiError(error, "統計情報取得"); } } );
  • Higher-level registration call to registerUserTools as part of registerAllTools.
    registerUserTools(server); registerMembershipTools(server);
  • Call to registerAllTools in the main refactored MCP server initialization.
    registerAllTools(server);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shimayuz/note-com-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server