get_users
Retrieve user lists from Qiita's developer community platform to access member profiles and information for community engagement.
Instructions
ユーザー一覧を取得します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ページ番号(1-100) | |
| perPage | No | 1ページあたりの件数(1-100) |
Implementation Reference
- src/tools/handlers.ts:61-64 (handler)Handler definition for the 'get_users' tool. It uses paginationSchema for input validation and executes by calling the QiitaApiClient's getUsers method with page and perPage parameters.get_users: { schema: paginationSchema, execute: async ({ page, perPage }, client) => client.getUsers(page, perPage), },
- src/tools/definitions.ts:27-46 (schema)Tool schema definition for 'get_users', specifying the name, description, and input schema with optional page and perPage parameters.{ name: 'get_users', description: 'ユーザー一覧を取得します', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'ページ番号(1-100)', default: 1, }, perPage: { type: 'number', description: '1ページあたりの件数(1-100)', default: 20, }, }, required: [], }, },
- src/qiitaApiClient.ts:29-34 (helper)Implementation of getUsers method in QiitaApiClient class, which makes an API call to retrieve the list of users from Qiita API with pagination support.async getUsers(page = 1, perPage = 20) { const response = await this.client.get('/users', { params: { page, per_page: perPage }, }); return response.data; }
- src/index.ts:11-12 (registration)Imports the toolHandlers and tools definitions, which register the 'get_users' tool for use in the MCP server.import { toolHandlers } from './tools/handlers.js'; import { tools } from './tools/definitions.js';
- src/tools/handlers.ts:10-13 (schema)Zod schema used for input validation of 'get_users' tool (paginationSchema).const paginationSchema = z.object({ page: z.number().int().min(1).max(100).default(1), perPage: z.number().int().min(1).max(100).default(20), });