Skip to main content
Glama

add-magazine-note

Add articles to magazines on note.com by specifying magazine and article IDs to organize content collections.

Instructions

マガジンに記事を追加する

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
magazineIdYesマガジンID(例: mxxxx)
noteIdYes記事ID(例: nxxxx)

Implementation Reference

  • The handler function that authenticates the user, performs a POST API request to add the specified note to the magazine, and returns a success response or handles errors.
    async ({ magazineId, noteId }) => {
      try {
        if (!hasAuth()) {
          return createAuthErrorResponse();
        }
    
        const data = await noteApiRequest(`/v1/our/magazines/${magazineId}/notes`, "POST", { id: noteId }, true);
        
        return createSuccessResponse({
          message: "マガジンに記事を追加しました",
          data: data
        });
      } catch (error) {
        return handleApiError(error, "マガジンへの記事追加");
      }
    }
  • Zod input schema defining magazineId and noteId as required string parameters with descriptions.
      magazineId: z.string().describe("マガジンID(例: mxxxx)"),
      noteId: z.string().describe("記事ID(例: nxxxx)")
    },
  • Direct registration of the 'add-magazine-note' tool on the MCP server, including name, Japanese description, input schema, and handler function.
    server.tool(
      "add-magazine-note",
      "マガジンに記事を追加する",
      {
        magazineId: z.string().describe("マガジンID(例: mxxxx)"),
        noteId: z.string().describe("記事ID(例: nxxxx)")
      },
      async ({ magazineId, noteId }) => {
        try {
          if (!hasAuth()) {
            return createAuthErrorResponse();
          }
    
          const data = await noteApiRequest(`/v1/our/magazines/${magazineId}/notes`, "POST", { id: noteId }, true);
          
          return createSuccessResponse({
            message: "マガジンに記事を追加しました",
            data: data
          });
        } catch (error) {
          return handleApiError(error, "マガジンへの記事追加");
        }
      }
    );
  • Higher-level registration call to registerMagazineTools, which includes the 'add-magazine-note' tool among others.
    registerMagazineTools(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