update_note
Modify existing notes by adding new content to specified files. Append information to keep your Markdown notes current and organized.
Instructions
Update the content of an existing note
Args: filename: Note filename content: New content (will be appended)
Returns: Confirmation message of update
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| content | Yes |
Implementation Reference
- notes_server.py:145-166 (handler)The core handler function for the 'update_note' tool, registered via @mcp.tool() decorator. Appends new content to the specified note file with an 'Updated' timestamp, or returns error if file not found.@mcp.tool() def update_note(filename: str, content: str) -> str: """ Update the content of an existing note Args: filename: Note filename content: New content (will be appended) Returns: Confirmation message of update """ ensure_notes_dir() filepath = os.path.join(NOTES_DIR, filename) if not os.path.exists(filepath): return f"Note '{filename}' not found" with open(filepath, "a", encoding="utf-8") as f: f.write(f"\n\n**Updated:** {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n{content}\n") return f"Note '{filename}' updated"