unfollow_tag
Stop following a specific tag on Qiita to manage your feed content and focus on relevant topics in the developer community.
Instructions
指定されたタグのフォローを解除します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tagId | Yes | タグID |
Implementation Reference
- src/tools/handlers.ts:145-148 (handler)The handler definition for the 'unfollow_tag' tool. It specifies the input schema (tagIdSchema) and the execute function that calls the QiitaApiClient's unfollowTag method.unfollow_tag: { schema: tagIdSchema, execute: async ({ tagId }, client) => client.unfollowTag(tagId), },
- src/tools/definitions.ts:436-449 (schema)The JSON schema definition for the 'unfollow_tag' tool, used in the ListTools MCP response.{ name: 'unfollow_tag', description: '指定されたタグのフォローを解除します', inputSchema: { type: 'object', properties: { tagId: { type: 'string', description: 'タグID', }, }, required: ['tagId'], }, },
- src/tools/handlers.ts:23-25 (schema)Zod schema for tagId input validation, referenced by the unfollow_tag handler and others.const tagIdSchema = z.object({ tagId: z.string(), });
- src/qiitaApiClient.ts:162-166 (helper)The Qiita API client method that implements the unfollow tag logic by sending a DELETE request to /tags/{tagId}/following.async unfollowTag(tagId: string) { this.assertAuthenticated(); await this.client.delete(`/tags/${tagId}/following`); return { success: true }; }
- src/index.ts:30-52 (registration)The CallTool request handler in the MCP server that dispatches to toolHandlers[name].execute, effectively registering all tools in toolHandlers including unfollow_tag.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), }, ], };