open-note-editor
Open the editing interface for note.com articles to modify content, update drafts, or manage existing posts using the article ID.
Instructions
記事の編集ページを開く
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | 記事ID(例: n1a2b3c4d5e6) |
Implementation Reference
- src/tools/note-tools.ts:598-614 (handler)Handler function that generates the note editor URL (`https://editor.note.com/notes/${noteId}/edit/`) for the given noteId and returns it. Checks for NOTE_USER_ID environment variable.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:595-597 (schema)Zod input schema for the tool, requiring a single 'noteId' string parameter with description.{ noteId: z.string().describe("記事ID(例: n1a2b3c4d5e6)"), },
- src/tools/note-tools.ts:593-615 (registration)Direct registration of the 'open-note-editor' tool using server.tool(), including name, description, schema, and handler."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/index.ts:15-15 (registration)Top-level tool registration in registerAllTools() that calls registerNoteTools(server), thereby registering 'open-note-editor' among other note tools.registerNoteTools(server);