list-categories
Retrieve all available categories from note.com to organize content and filter articles by topic.
Instructions
カテゴリー一覧を取得する
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/user-tools.ts:129-141 (registration)Registers the 'list-categories' MCP tool. Includes empty input schema {}, description in Japanese, and handler function that calls the Note API `/v2/categories` endpoint to retrieve category list, formats response with createSuccessResponse, and handles errors.server.tool( "list-categories", "カテゴリー一覧を取得する", {}, async () => { try { const data = await noteApiRequest(`/v2/categories`, "GET"); return createSuccessResponse(data.data || data); } catch (error) { return handleApiError(error, "カテゴリー取得"); } } );
- src/tools/user-tools.ts:133-140 (handler)The handler function for 'list-categories' tool. Fetches categories via API and returns formatted success response or error.async () => { try { const data = await noteApiRequest(`/v2/categories`, "GET"); return createSuccessResponse(data.data || data); } catch (error) { return handleApiError(error, "カテゴリー取得"); } }