get-magazine
Retrieve detailed information about a specific magazine from note.com using its unique magazine ID.
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 from the Note API, formats the data using formatMagazine, and returns a formatted 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 input schema defining the magazineId parameter for the get-magazine tool.{ magazineId: z.string().describe("マガジンID(例: m75081e161aeb)"), },
- src/tools/magazine-tools.ts:14-32 (registration)Direct registration of the get-magazine tool on the MCP server instance within registerMagazineTools.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:21-21 (registration)Invocation of registerMagazineTools which registers the get-magazine tool among others.registerMagazineTools(server);