Skip to main content
Glama

get_user

Retrieve detailed information about a specific user on the Qiita developer community platform by providing their user ID.

Instructions

指定されたユーザーの詳細情報を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesユーザーID

Implementation Reference

  • Handler definition for the 'get_user' MCP tool. Validates input using userIdSchema and executes by calling QiitaApiClient.getUser(userId). This is the core execution logic invoked when the tool is called.
    get_user: { schema: userIdSchema, execute: async ({ userId }, client) => client.getUser(userId), },
  • Tool schema definition for 'get_user', including name, description, and JSON input schema. Used for MCP listTools response and tool discovery.
    { name: 'get_user', description: '指定されたユーザーの詳細情報を取得します', inputSchema: { type: 'object', properties: { userId: { type: 'string', description: 'ユーザーID', }, }, required: ['userId'], }, },
  • Supporting method in QiitaApiClient that performs the actual API request to fetch user details from Qiita API. Called by the tool handler.
    async getUser(userId: string) { const response = await this.client.get(`/users/${userId}`); return response.data; }
  • Zod schema for userId input validation, used by multiple tools including 'get_user' for runtime parsing in the handler.
    const userIdSchema = z.object({ userId: z.string(), });
  • src/index.ts:26-28 (registration)
    Registration of listTools handler that returns the tools array containing 'get_user' definition for MCP protocol.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });

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