Skip to main content
Glama

get_user

Retrieve detailed user information from Qiita's developer community platform by providing a user ID to access profile data and activity details.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesユーザーID

Implementation Reference

  • The execute handler for the 'get_user' MCP tool. It validates the input using the userIdSchema (Zod) and delegates execution to the QiitaApiClient's getUser method.
    get_user: { schema: userIdSchema, execute: async ({ userId }, client) => client.getUser(userId), },
  • The MCP tool definition for 'get_user', including name, description, and inputSchema (JSON Schema) used for listing tools.
    { name: 'get_user', description: '指定されたユーザーの詳細情報を取得します', inputSchema: { type: 'object', properties: { userId: { type: 'string', description: 'ユーザーID', }, }, required: ['userId'], }, },
  • src/index.ts:26-28 (registration)
    Registration of the listTools capability, which returns the tools array including the 'get_user' tool definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • src/index.ts:35-44 (registration)
    Part of the CallTool request handler where the tool handler (from toolHandlers[name]) is retrieved, input is parsed, and execute is called for 'get_user'.
    const handler = toolHandlers[name]; try { if (!handler) { throw new Error(`未知のツール: ${name}`); } const parsedArgs = handler.schema.parse(args ?? {}); const result = await handler.execute(parsedArgs, qiita);
  • The Qiita API client method called by the get_user handler to fetch user details via the Qiita API.
    async getUser(userId: string) { const response = await this.client.get(`/users/${userId}`); return response.data; }

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