Skip to main content
Glama
Myk3rinos

MCP Personal Tools Server

by Myk3rinos

add-note

Add text to your notes file using this MCP Personal Tools Server tool. Append new entries to maintain organized personal documentation.

Instructions

Ajoute une nouvelle ligne au fichier de notes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesLe texte à ajouter au fichier de notes

Implementation Reference

  • The main handler logic for the 'add-note' tool. It creates the notes directory if necessary, appends a timestamped entry with the provided text to 'note.txt', and returns a success or error response.
    }, async ({ text }) => { try { const notesDir = path.join(userHomeDir, 'Documents', 'notes'); // Create the directory if it doesn't exist await fs.mkdir(notesDir, { recursive: true }); // Add the new line to the file await fs.appendFile(path.join(notesDir, 'note.txt'), `${new Date().toISOString()} - ${text}\n`); return { content: [{ type: "text", text: `${text},Note added successfully` }] }; } catch (error) { console.error("Error while adding the note:", error); return { content: [{ type: "text", text: `Error while adding the note` }] }; }
  • Zod input schema defining the 'text' parameter as a string.
    text: z.string().describe("The text to add to the notes file"),
  • src/server.ts:89-114 (registration)
    The server.tool registration call for the 'add-note' tool, specifying name, description, input schema, hints, and handler function.
    server.tool("add-note", "Add a new line to the notes file", { text: z.string().describe("The text to add to the notes file"), }, { title: "Add Note", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true, }, async ({ text }) => { try { const notesDir = path.join(userHomeDir, 'Documents', 'notes'); // Create the directory if it doesn't exist await fs.mkdir(notesDir, { recursive: true }); // Add the new line to the file await fs.appendFile(path.join(notesDir, 'note.txt'), `${new Date().toISOString()} - ${text}\n`); return { content: [{ type: "text", text: `${text},Note added successfully` }] }; } catch (error) { console.error("Error while adding the note:", error); return { content: [{ type: "text", text: `Error while adding the note` }] }; } })

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/Myk3rinos/MCP'

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