get_user_items
Retrieve articles posted by a specific user on Qiita. Use this tool to fetch user content with pagination support for browsing multiple pages of articles.
Instructions
指定されたユーザーの記事一覧を取得します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ページ番号(1-100) | |
| perPage | No | 1ページあたりの件数(1-100) | |
| userId | Yes | ユーザーID |
Implementation Reference
- src/tools/handlers.ts:65-69 (handler)Handler definition for the 'get_user_items' tool. It validates input using Zod schema and executes by calling QiitaApiClient.getUserItems.get_user_items: { schema: userIdSchema.merge(paginationSchema), execute: async ({ userId, page, perPage }, client) => client.getUserItems(userId, page, perPage), },
- src/tools/definitions.ts:47-70 (schema)MCP Tool definition for 'get_user_items', including name, description, and JSON input schema used for tool listing.{ name: 'get_user_items', description: '指定されたユーザーの記事一覧を取得します', inputSchema: { type: 'object', properties: { userId: { type: 'string', description: 'ユーザーID', }, page: { type: 'number', description: 'ページ番号(1-100)', default: 1, }, perPage: { type: 'number', description: '1ページあたりの件数(1-100)', default: 20, }, }, required: ['userId'], }, },
- src/qiitaApiClient.ts:36-41 (helper)Supporting method in QiitaApiClient that performs the actual API request to fetch the user's items from Qiita v2 API.async getUserItems(userId: string, page = 1, perPage = 20) { const response = await this.client.get(`/users/${userId}/items`, { params: { page, per_page: perPage }, }); return response.data; }