Skip to main content
Glama

unfollow_user

Stop following a specific user on Qiita by providing their user ID. This action removes them from your following list on the Japanese developer community platform.

Instructions

指定されたユーザーのフォローを解除します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesユーザーID

Implementation Reference

  • The handler for the 'unfollow_user' tool. It validates input using userIdSchema and executes by calling unfollowUser on the QiitaApiClient instance.
    unfollow_user: { schema: userIdSchema, execute: async ({ userId }, client) => client.unfollowUser(userId), },
  • The MCP tool schema definition for 'unfollow_user', including name, description, and input schema, used for tool listing.
    name: 'unfollow_user', description: '指定されたユーザーのフォローを解除します', inputSchema: { type: 'object', properties: { userId: { type: 'string', description: 'ユーザーID', }, }, required: ['userId'], }, },
  • The core helper function implementing the unfollow logic by sending a DELETE request to the Qiita API.
    async unfollowUser(userId: string) { this.assertAuthenticated(); await this.client.delete(`/users/${userId}/following`); return { success: true }; }
  • src/index.ts:30-65 (registration)
    Server request handler for calling tools, which looks up the handler by name from toolHandlers and executes it with a QiitaApiClient instance.
    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, }; } });
  • src/index.ts:26-28 (registration)
    Server request handler for listing tools, returning the tools array which includes the unfollow_user definition.
    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