is_user_followed
Check if you are following a specific user on Qiita to manage your developer community connections and track your network relationships.
Instructions
指定されたユーザーをフォローしているかどうかを確認します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | ユーザーID |
Implementation Reference
- src/tools/handlers.ts:161-164 (handler)The MCP tool handler for 'is_user_followed', which uses userIdSchema for input validation and delegates execution to QiitaApiClient.isUserFollowed(userId).is_user_followed: { schema: userIdSchema, execute: async ({ userId }, client) => client.isUserFollowed(userId), },
- src/tools/definitions.ts:492-505 (schema)Defines the tool metadata including name, description, and JSON input schema requiring 'userId' string for the is_user_followed tool.{ name: 'is_user_followed', description: '指定されたユーザーをフォローしているかどうかを確認します', inputSchema: { type: 'object', properties: { userId: { type: 'string', description: 'ユーザーID', }, }, required: ['userId'], }, },
- src/qiitaApiClient.ts:181-192 (helper)Core implementation that checks if the authenticated user follows the given userId by attempting a GET to Qiita API /users/{userId}/following; returns { following: true/false } based on 200 vs 404.async isUserFollowed(userId: string) { this.assertAuthenticated(); try { await this.client.get(`/users/${userId}/following`); return { following: true }; } catch (error: any) { if (error.response?.status === 404) { return { following: false }; } throw error; } }