update_note
Modify existing notes by appending new content to specified files, maintaining organized documentation within the Notes MCP Server.
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 handler function for the 'update_note' tool. It appends new content to an existing note file, including a timestamp, and returns a confirmation message.@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"