get_item_comments
Retrieve comments for a specific Qiita article to analyze discussions and gather feedback. Provide the article ID to access all associated comments.
Instructions
Get comments on a specific article.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes | Article ID |
Implementation Reference
- src/index.ts:373-381 (handler)Handles the MCP tool call for 'get_item_comments': validates the item_id argument, calls the QiitaClient method, and returns the JSON-formatted result.case "get_item_comments": { if (!args?.item_id) { throw new Error("item_id is required"); } const result = await qiitaClient.getItemComments(args.item_id as string); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
- src/index.ts:106-108 (helper)QiitaClient helper method that performs the actual API fetch to retrieve comments for the specified item ID.async getItemComments(itemId: string): Promise<any[]> { return this.fetch(`/items/${itemId}/comments`); }
- src/index.ts:247-256 (schema)Input schema definition for the get_item_comments tool, specifying the required item_id parameter.inputSchema: { type: "object", properties: { item_id: { type: "string", description: "Article ID", }, }, required: ["item_id"], },
- src/index.ts:244-257 (registration)Registers the get_item_comments tool in the tools array used for the ListTools MCP request.{ name: "get_item_comments", description: "Get comments on a specific article.", inputSchema: { type: "object", properties: { item_id: { type: "string", description: "Article ID", }, }, required: ["item_id"], }, },