open-note-editor
Open the editing page for a specific note.com article using its unique ID to modify content directly.
Instructions
記事の編集ページを開く
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | 記事ID(例: n1a2b3c4d5e6) |
Implementation Reference
- src/tools/note-tools.ts:808-832 (registration)Registers the 'open-note-editor' MCP tool using server.tool(), including schema and handler function.// 9. 記事編集ページを開くツール server.tool( "open-note-editor", "記事の編集ページを開く", { noteId: z.string().describe("記事ID(例: n1a2b3c4d5e6)"), }, async ({ noteId }) => { try { if (!env.NOTE_USER_ID) { return createErrorResponse("環境変数 NOTE_USER_ID が設定されていません。.envファイルを確認してください。"); } const editUrl = `https://editor.note.com/notes/${noteId}/edit/`; return createSuccessResponse({ status: "success", editUrl: editUrl, message: `編集ページのURLを生成しました。以下のURLを開いてください:\n${editUrl}` }); } catch (error) { return handleApiError(error, "編集ページURL生成"); } } );
- src/tools/note-tools.ts:815-831 (handler)The handler function for 'open-note-editor' tool. Generates and returns the Note.com editor URL for the given noteId, or error if NOTE_USER_ID env var is missing.async ({ noteId }) => { try { if (!env.NOTE_USER_ID) { return createErrorResponse("環境変数 NOTE_USER_ID が設定されていません。.envファイルを確認してください。"); } const editUrl = `https://editor.note.com/notes/${noteId}/edit/`; return createSuccessResponse({ status: "success", editUrl: editUrl, message: `編集ページのURLを生成しました。以下のURLを開いてください:\n${editUrl}` }); } catch (error) { return handleApiError(error, "編集ページURL生成"); } }
- src/tools/note-tools.ts:812-814 (schema)Input schema for 'open-note-editor' tool using Zod: requires noteId as string.{ noteId: z.string().describe("記事ID(例: n1a2b3c4d5e6)"), },