get_tag_items
Retrieve articles associated with a specific tag from Qiita's developer community platform. Use this tool to fetch tagged content listings with pagination support for efficient browsing.
Instructions
指定されたタグの記事一覧を取得します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ページ番号(1-100) | |
| perPage | No | 1ページあたりの件数(1-100) | |
| tagId | Yes | タグID |
Implementation Reference
- src/tools/handlers.ts:136-140 (handler)The handler definition for the 'get_tag_items' tool. It defines the input schema by merging tagId and pagination schemas, and the execute function that calls QiitaApiClient.getTagItems with the parsed inputs.get_tag_items: { schema: tagIdSchema.merge(paginationSchema), execute: async ({ tagId, page, perPage }, client) => client.getTagItems(tagId, page, perPage), },
- src/tools/definitions.ts:398-421 (schema)The MCP tool definition for 'get_tag_items', including the name, Japanese description, and JSON schema for input validation (tagId required, page and perPage optional with defaults).{ name: 'get_tag_items', description: '指定されたタグの記事一覧を取得します', inputSchema: { type: 'object', properties: { tagId: { type: 'string', description: 'タグID', }, page: { type: 'number', description: 'ページ番号(1-100)', default: 1, }, perPage: { type: 'number', description: '1ページあたりの件数(1-100)', default: 20, }, }, required: ['tagId'], }, },
- src/qiitaApiClient.ts:149-154 (helper)The supporting method in QiitaApiClient that performs the actual HTTP GET request to Qiita API endpoint /tags/{tagId}/items with pagination parameters, returning the response data. This is invoked by the tool handler.async getTagItems(tagId: string, page = 1, perPage = 20) { const response = await this.client.get(`/tags/${tagId}/items`, { params: { page, per_page: perPage }, }); return response.data; }