stock_item
Save articles to your Qiita reading list for later reference by providing the article ID.
Instructions
指定された記事をストックします
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | 記事ID |
Implementation Reference
- src/tools/handlers.ts:108-111 (handler)Handler for the 'stock_item' MCP tool. Validates the input using itemIdSchema and executes by calling the Qiita client's stockItem method.stock_item: { schema: itemIdSchema, execute: async ({ itemId }, client) => client.stockItem(itemId), },
- src/tools/definitions.ts:292-305 (schema)MCP tool definition for 'stock_item', including name, description, and input schema requiring 'itemId'.{ name: 'stock_item', description: '指定された記事をストックします', inputSchema: { type: 'object', properties: { itemId: { type: 'string', description: '記事ID', }, }, required: ['itemId'], }, },
- src/qiitaApiClient.ts:105-109 (helper)Core implementation in QiitaApiClient that authenticates and makes PUT request to Qiita API to stock the specified item.async stockItem(itemId: string) { this.assertAuthenticated(); await this.client.put(`/items/${itemId}/stock`); return { success: true }; }