Skip to main content
Glama

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
NameRequiredDescriptionDefault
pageNoページ番号(1-100)
perPageNo1ページあたりの件数(1-100)

Implementation Reference

  • 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), },
  • 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: [], }, },
  • 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';
  • 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), });

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/Selenium39/mcp-server-qiita'

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