Skip to main content
Glama
chatmcp
by chatmcp

write_note

Create and save markdown-formatted notes directly to Flomo using this tool. Ideal for quick text input and organization through the MCP Server Flomo interface.

Instructions

Write note to flomo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesText content of the note with markdown format

Implementation Reference

  • MCP handler for the 'write_note' tool: validates content, instantiates FlomoClient, calls writeNote, checks result, and returns formatted success response.
    case "write_note": { const content = String(request.params.arguments?.content); if (!content) { throw new Error("Content is required"); } const flomo = new FlomoClient({ apiUrl }); const result = await flomo.writeNote({ content }); if (!result.memo || !result.memo.slug) { throw new Error( `Failed to write note to flomo: ${result?.message || "unknown error"}` ); } return { content: [ { type: "text", text: `Write note to flomo success, result: ${JSON.stringify( result )}`, }, ], }; }
  • Input schema for the 'write_note' tool, defining the required 'content' string property.
    name: "write_note", description: "Write note to flomo", inputSchema: { type: "object", properties: { content: { type: "string", description: "Text content of the note with markdown format", }, }, required: ["content"], }, },
  • src/index.ts:44-63 (registration)
    Registers the 'write_note' tool in response to ListToolsRequest by returning its specification.
    server.setRequestHandler(ListToolsRequestSchema, async (request) => { return { tools: [ { name: "write_note", description: "Write note to flomo", inputSchema: { type: "object", properties: { content: { type: "string", description: "Text content of the note with markdown format", }, }, required: ["content"], }, }, ], }; });
  • Helper function in FlomoClient that performs the actual POST request to the Flomo API to create a note and enhances the response with a memo URL.
    async writeNote({ content }: { content: string }) { try { if (!content) { throw new Error("invalid content"); } const req = { content, }; const resp = await fetch(this.apiUrl, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(req), }); if (!resp.ok) { throw new Error(`request failed with status ${resp.statusText}`); } let result = await resp.json(); if (result && result.memo && result.memo.slug) { const memoUrl = `https://v.flomoapp.com/mine/?memo_id=${result.memo.slug}`; result.memo.url = memoUrl; } return result; } catch (e) { throw e; } }

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

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