get_items
Retrieve articles from Qiita's developer community platform using pagination and search queries to access technical content.
Instructions
記事一覧を取得します
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ページ番号(1-100) | |
| perPage | No | 1ページあたりの件数(1-100) | |
| query | No | 検索クエリ |
Implementation Reference
- src/tools/handlers.ts:85-91 (handler)Handler for the 'get_items' MCP tool: validates input schema and executes by calling QiitaApiClient.getItems(page, perPage, query).
get_items: { schema: paginationSchema.extend({ query: z.string().optional(), }), execute: async ({ page, perPage, query }, client) => client.getItems(page, perPage, query), }, - src/tools/definitions.ts:143-166 (schema)MCP tool definition for 'get_items', including name, description, and input schema (page, perPage, optional query). Used for tool listing.
{ name: 'get_items', description: '記事一覧を取得します', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'ページ番号(1-100)', default: 1, }, perPage: { type: 'number', description: '1ページあたりの件数(1-100)', default: 20, }, query: { type: 'string', description: '検索クエリ', }, }, required: [], }, }, - src/qiitaApiClient.ts:64-69 (helper)QiitaApiClient.getItems method: performs HTTP GET to /items endpoint with pagination and optional query params, returns response data.
async getItems(page = 1, perPage = 20, query?: string) { const response = await this.client.get('/items', { params: { page, per_page: perPage, ...(query && { query }) }, }); return response.data; } - src/tools/handlers.ts:86-88 (schema)Zod input validation schema for 'get_items' handler, extending paginationSchema with optional query.
schema: paginationSchema.extend({ query: z.string().optional(), }),