Skip to main content
Glama

create_note

Generate a micro-note with customizable privacy settings (public or private) to store concise information efficiently. Integrates with Emlog MCP Server for streamlined content management.

Instructions

Create a new micro-note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
privateNoWhether the note is private (y) or public (n)
tYesThe content of the micro-note

Implementation Reference

  • MCP tool handler for 'create_note': calls emlogClient.publishNote with input parameters and returns a formatted success or error message.
    async ({ t, private: isPrivate }) => {
      try {
        await emlogClient.publishNote(t, isPrivate);
        return {
          content: [{
            type: "text",
            text: `Successfully created micro-note: ${t.substring(0, 50)}${t.length > 50 ? '...' : ''}`
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: `Error: ${error instanceof Error ? error.message : String(error)}`
          }],
          isError: true
        };
      }
    }
  • Zod input schema defining parameters 't' (note content) and optional 'private' flag for the create_note tool.
    inputSchema: {
      t: z.string().describe("The content of the micro-note"),
      private: z.enum(["y", "n"]).optional().describe("Whether the note is private (y) or public (n)")
    }
  • src/index.ts:482-511 (registration)
    Registration of the 'create_note' tool using server.registerTool, including schema and inline handler function.
    server.registerTool(
      "create_note",
      {
        title: "Create Note",
        description: "Create a new micro-note",
        inputSchema: {
          t: z.string().describe("The content of the micro-note"),
          private: z.enum(["y", "n"]).optional().describe("Whether the note is private (y) or public (n)")
        }
      },
      async ({ t, private: isPrivate }) => {
        try {
          await emlogClient.publishNote(t, isPrivate);
          return {
            content: [{
              type: "text",
              text: `Successfully created micro-note: ${t.substring(0, 50)}${t.length > 50 ? '...' : ''}`
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: "text",
              text: `Error: ${error instanceof Error ? error.message : String(error)}`
            }],
            isError: true
          };
        }
      }
    );
  • EmlogClient.publishNote method: constructs form data with note content and privacy flag, posts to Emlog API endpoint /?rest-api=note_post to create the note.
    async publishNote(content: string, isPrivate?: string): Promise<{ note_id: number }> {
      const note = {
        t: content,
        private: isPrivate || 'n'
      };
      const formData = this.buildFormData(note);
      const response = await this.api.post('/?rest-api=note_post', formData);
      return response.data.data;
    }
Install Server

Other Tools

Related Tools

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/eraincc/emlog-mcp'

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