Skip to main content
Glama
mariomosca

NotesKeep MCP Server

by mariomosca

create_note

Create and organize text or checklist notes with titles, content, colors, and optional images for effective note management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the note
contentNoContent/body of the note (for text notes)
typeNoType of note: 'text' for regular notes, 'list' for checkliststext
checklistNoChecklist items (for list notes). Each item has 'text' and optional 'checked' boolean
colorNoNote background colorwhite
imageUrlNoURL of an image to attach to the note

Implementation Reference

  • The handler function for 'create_note' which constructs the note object and performs an API request to create it.
    async ({ title, content, type, checklist, color, imageUrl }) => {
        try {
            const body: Record<string, any> = { title, type, color };
    
            if (type === "text") {
                body.content = content || "";
            } else if (type === "list" && checklist) {
                body.checklist = checklist;
            }
    
            if (imageUrl) {
                body.imageUrl = imageUrl;
            }
    
            const data = await apiRequest("/api/notes", {
                method: "POST",
                body: JSON.stringify(body),
            });
    
            return {
                content: [{
                    type: "text",
                    text: `Note created successfully!\nID: ${data.note.id}\nTitle: ${data.note.title}`
                }]
            };
  • The Zod schema defining the input parameters for the 'create_note' tool.
    {
        title: z.string().describe("Title of the note"),
        content: z.string().optional().describe("Content/body of the note (for text notes)"),
        type: z.enum(["text", "list"]).optional().default("text").describe("Type of note: 'text' for regular notes, 'list' for checklists"),
        checklist: z.array(z.object({
            text: z.string(),
            checked: z.boolean().optional().default(false)
        })).optional().describe("Checklist items (for list notes). Each item has 'text' and optional 'checked' boolean"),
        color: z.enum(["white", "gray", "yellow", "orange", "teal", "blue", "purple", "pink"]).optional().default("white").describe("Note background color"),
        imageUrl: z.string().url().optional().describe("URL of an image to attach to the note"),
    },
  • src/index.ts:105-117 (registration)
    The registration of the 'create_note' tool using the server.tool method.
    server.tool(
        "create_note",
        {
            title: z.string().describe("Title of the note"),
            content: z.string().optional().describe("Content/body of the note (for text notes)"),
            type: z.enum(["text", "list"]).optional().default("text").describe("Type of note: 'text' for regular notes, 'list' for checklists"),
            checklist: z.array(z.object({
                text: z.string(),
                checked: z.boolean().optional().default(false)
            })).optional().describe("Checklist items (for list notes). Each item has 'text' and optional 'checked' boolean"),
            color: z.enum(["white", "gray", "yellow", "orange", "teal", "blue", "purple", "pink"]).optional().default("white").describe("Note background color"),
            imageUrl: z.string().url().optional().describe("URL of an image to attach to the note"),
        },

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/mariomosca/noteskeep-mcp'

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