get-magazine
Retrieve detailed information about note.com magazines by providing the magazine ID to access content and metadata.
Instructions
マガジンの詳細情報を取得する
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| magazineId | Yes | マガジンID(例: m75081e161aeb) |
Implementation Reference
- src/tools/magazine-tools.ts:20-31 (handler)Handler function that fetches the magazine details using noteApiRequest, formats the data with formatMagazine, and returns a success response or handles errors.async ({ magazineId }) => { try { const data = await noteApiRequest(`/v1/magazines/${magazineId}`); const magazineData = data.data || {}; const formattedMagazine = formatMagazine(magazineData); return createSuccessResponse(formattedMagazine); } catch (error) { return handleApiError(error, "マガジン取得"); } }
- src/tools/magazine-tools.ts:17-19 (schema)Zod schema defining the input parameter magazineId as a string.{ magazineId: z.string().describe("マガジンID(例: m75081e161aeb)"), },
- src/tools/magazine-tools.ts:14-32 (registration)Registration of the get-magazine tool using McpServer.tool method, including name, description, input schema, and handler function.server.tool( "get-magazine", "マガジンの詳細情報を取得する", { magazineId: z.string().describe("マガジンID(例: m75081e161aeb)"), }, async ({ magazineId }) => { try { const data = await noteApiRequest(`/v1/magazines/${magazineId}`); const magazineData = data.data || {}; const formattedMagazine = formatMagazine(magazineData); return createSuccessResponse(formattedMagazine); } catch (error) { return handleApiError(error, "マガジン取得"); } } );
- src/tools/index.ts:18-18 (registration)Call to registerMagazineTools within registerAllTools, which registers the get-magazine tool among others.registerMagazineTools(server);