Skip to main content
Glama

post-comment

Add comments to note.com articles by providing the article ID and comment text. This tool enables user engagement and feedback on published content.

Instructions

記事にコメントを投稿する

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteIdYes記事ID
textYesコメント本文

Implementation Reference

  • Registers the 'post-comment' MCP tool. Includes the input schema (noteId: string, text: string), description, and the complete handler function that checks authentication, calls the note.com API to post the comment, and returns success/error responses.
    server.tool( "post-comment", "記事にコメントを投稿する", { noteId: z.string().describe("記事ID"), text: z.string().describe("コメント本文"), }, async ({ noteId, text }) => { try { if (!hasAuth()) { return createAuthErrorResponse(); } const data = await noteApiRequest(`/v1/note/${noteId}/comments`, "POST", { text }, true); return createSuccessResponse({ message: "コメントを投稿しました", data: data }); } catch (error) { return handleApiError(error, "コメント投稿"); } } );
  • The handler function for the post-comment tool. Performs authentication check, makes POST request to /v1/note/{noteId}/comments with the comment text, and handles response or errors using utility functions.
    async ({ noteId, text }) => { try { if (!hasAuth()) { return createAuthErrorResponse(); } const data = await noteApiRequest(`/v1/note/${noteId}/comments`, "POST", { text }, true); return createSuccessResponse({ message: "コメントを投稿しました", data: data }); } catch (error) { return handleApiError(error, "コメント投稿"); } }
  • Input schema for post-comment tool defined using Zod: requires noteId (string) and text (string).
    { noteId: z.string().describe("記事ID"), text: z.string().describe("コメント本文"), },
  • Higher-level registration that calls registerNoteTools(server), which includes the post-comment tool.
    export function registerAllTools(server: McpServer): void { // 各カテゴリのツールを登録 registerSearchTools(server); registerNoteTools(server); registerUserTools(server); registerMembershipTools(server); registerMagazineTools(server); registerImageTools(server); registerObsidianTools(server); registerPublishTools(server);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shimayuz/note-com-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server