Skip to main content
Glama

get_authenticated_user

Retrieve detailed profile information for the currently authenticated Qiita user to access personal account data and user-specific details.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler definition for the 'get_authenticated_user' tool, including its empty input schema (Zod) and execute function that delegates to QiitaApiClient.getAuthenticatedUser().
    get_authenticated_user: { schema: z.object({}), execute: async (_, client) => client.getAuthenticatedUser(), },
  • The MCP tool definition schema, used for tool listing and validation, specifying the tool name, description, and empty input schema.
    { name: 'get_authenticated_user', description: '認証されたユーザーの詳細情報を取得します', inputSchema: { type: 'object', properties: {}, required: [], }, },
  • The core implementation in QiitaApiClient that performs the authenticated GET request to Qiita API endpoint '/authenticated_user'.
    async getAuthenticatedUser() { this.assertAuthenticated(); const response = await this.client.get('/authenticated_user'); return response.data; }
  • src/index.ts:26-28 (registration)
    Registers the handler for MCP ListToolsRequest, which returns the tools list including 'get_authenticated_user'.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • src/index.ts:30-65 (registration)
    Registers the handler for MCP CallToolRequest, which looks up the tool handler by name (including 'get_authenticated_user'), validates input, executes it with Qiita client, and returns the result.
    server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; const accessToken = process.env.QIITA_ACCESS_TOKEN; const qiita = new QiitaApiClient(accessToken); const handler = toolHandlers[name]; try { if (!handler) { throw new Error(`未知のツール: ${name}`); } const parsedArgs = handler.schema.parse(args ?? {}); const result = await handler.execute(parsedArgs, qiita); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } catch (error: any) { const message = error?.message ?? String(error); return { content: [ { type: 'text', text: `エラーが発生しました: ${message}`, }, ], isError: true, }; } });

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