Skip to main content
Glama
xianminx
by xianminx

newNote

Create and save notes in Flomo directly through AI chat interactions using natural language commands. Capture thoughts and information by typing your note content.

Instructions

Create a new note in Flomo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes

Implementation Reference

  • index.ts:47-67 (handler)
    Inline asynchronous handler function for the 'newNote' tool. It calls createFlomoNote with the input value and returns the JSON-stringified response or error as MCP-formatted content.
    async (input) => { try { const response = await createFlomoNote(input.input); return { content: [ { type: "text", text: `${JSON.stringify(response)}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `${JSON.stringify(error)}`, }, ], }; }
  • TypeScript interface defining the structure of the response from the Flomo API when creating a new note.
    interface FlomoNewNoteResponse { code: number; message: string; memo: { creator_id: number; source: string; content: string; tags: string[]; updated_at: string; created_at: string; linked_memos: any[]; linked_count: number; slug: string; }; }
  • index.ts:43-69 (registration)
    Registration of the 'newNote' tool on the MCP server, including name, description, Zod input schema, and handler function.
    server.tool( "newNote", "Create a new note in Flomo", { input: z.string() }, async (input) => { try { const response = await createFlomoNote(input.input); return { content: [ { type: "text", text: `${JSON.stringify(response)}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `${JSON.stringify(error)}`, }, ], }; } } );
  • Helper function that sends a POST request to the Flomo API to create a new note with the provided content.
    async function createFlomoNote(content: string): Promise<FlomoNewNoteResponse> { const body = { content: content, }; return await fetch(flomoApiUrl, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(body), }).then((res) => res.json()); }

Other 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/xianminx/mcp-server-flomo'

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