get_item_stockers
Retrieve users who have bookmarked a specific Qiita article to analyze engagement and identify interested community members.
Instructions
指定された記事をストックしたユーザー一覧を取得します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | 記事ID | |
| page | No | ページ番号(1-100) | |
| perPage | No | 1ページあたりの件数(1-100) |
Implementation Reference
- src/tools/handlers.ts:120-124 (handler)MCP tool handler for 'get_item_stockers'. Validates input using Zod schema (itemId + pagination) and executes by calling QiitaApiClient.getItemStockers.get_item_stockers: { schema: itemIdSchema.merge(paginationSchema), execute: async ({ itemId, page, perPage }, client) => client.getItemStockers(itemId, page, perPage), },
- src/tools/definitions.ts:334-357 (schema)MCP tool definition including name, description, and JSON input schema for 'get_item_stockers' used in listTools response.{ name: 'get_item_stockers', description: '指定された記事をストックしたユーザー一覧を取得します', inputSchema: { type: 'object', properties: { itemId: { type: 'string', description: '記事ID', }, page: { type: 'number', description: 'ページ番号(1-100)', default: 1, }, perPage: { type: 'number', description: '1ページあたりの件数(1-100)', default: 20, }, }, required: ['itemId'], }, },
- src/qiitaApiClient.ts:130-135 (helper)Core implementation in QiitaApiClient that performs the HTTP GET request to Qiita API endpoint /items/{itemId}/stockers to fetch stockers list.async getItemStockers(itemId: string, page = 1, perPage = 20) { const response = await this.client.get(`/items/${itemId}/stockers`, { params: { page, per_page: perPage }, }); return response.data; }
- src/tools/handlers.ts:10-13 (schema)Shared Zod schema for pagination parameters used in get_item_stockers handler.const paginationSchema = z.object({ page: z.number().int().min(1).max(100).default(1), perPage: z.number().int().min(1).max(100).default(20), });
- src/tools/handlers.ts:19-21 (schema)Shared Zod schema for itemId parameter used in get_item_stockers handler.const itemIdSchema = z.object({ itemId: z.string(), });