like-note
Add a like to a note.com article using its article ID to show appreciation for the content.
Instructions
記事にスキをする
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | 記事ID |
Implementation Reference
- src/tools/note-tools.ts:436-456 (handler)Primary implementation of the 'like-note' tool: registers the tool, defines input schema (noteId: string), and provides the handler function that authenticates, makes a POST request to /v3/notes/{noteId}/likes to like the note, and returns success/error response.server.tool( "like-note", "記事にスキをする", { noteId: z.string().describe("記事ID"), }, async ({ noteId }) => { try { if (!hasAuth()) { return createAuthErrorResponse(); } await noteApiRequest(`/v3/notes/${noteId}/likes`, "POST", {}, true); return createSuccessResponse({ message: "スキをつけました" }); } catch (error) { return handleApiError(error, "スキ"); } }
- src/tools/index.ts:15-15 (registration)Registration of note tools (including 'like-note') via registerNoteTools call in the tools index.registerNoteTools(server);
- src/note-mcp-server-http.ts:339-339 (registration)Overall tools registration in the main HTTP MCP server, which includes note-tools containing 'like-note'.registerAllTools(server);
- src/note-mcp-server-http.ts:170-178 (schema)Schema definition for 'like-note' tool in the static tools/list response for HTTP transport.name: "like-note", description: "記事にスキをつける", inputSchema: { type: "object", properties: { noteId: { type: "string", description: "記事ID" } }, required: ["noteId"] }
- src/note-mcp-server-http.ts:686-702 (handler)Fallback handler implementation for 'like-note' in the HTTP transport tools/call processing (uses /like endpoint).} else if (name === "like-note") { // like-noteツールの実装 const { noteId } = args; const data = await noteApiRequest( `/v3/notes/${noteId}/like`, "POST", null, true ); result = { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };