unfollow_user
Remove a user from your following list on Qiita to manage your network connections and focus on relevant content.
Instructions
指定されたユーザーのフォローを解除します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | ユーザーID |
Implementation Reference
- src/tools/handlers.ts:157-160 (handler)The handler definition for the 'unfollow_user' tool. It uses the shared userIdSchema for input validation and delegates execution to the QiitaApiClient's unfollowUser method.unfollow_user: { schema: userIdSchema, execute: async ({ userId }, client) => client.unfollowUser(userId), },
- src/tools/definitions.ts:478-491 (schema)The MCP tool schema definition for 'unfollow_user', including name, description, and JSON input schema requiring 'userId'.{ name: 'unfollow_user', description: '指定されたユーザーのフォローを解除します', inputSchema: { type: 'object', properties: { userId: { type: 'string', description: 'ユーザーID', }, }, required: ['userId'], }, },
- src/qiitaApiClient.ts:200-204 (helper)The core implementation in QiitaApiClient that authenticates the request and sends a DELETE to the Qiita API endpoint for unfollowing a user.async unfollowUser(userId: string) { this.assertAuthenticated(); await this.client.delete(`/users/${userId}/following`); return { success: true }; }
- src/index.ts:26-28 (registration)Registration of tool list handler, which returns the tools array including 'unfollow_user'.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
- src/index.ts:42-44 (registration)Tool execution handler that dynamically looks up and invokes the handler for 'unfollow_user' by name from toolHandlers.const parsedArgs = handler.schema.parse(args ?? {}); const result = await handler.execute(parsedArgs, qiita);