delete_note
Remove a specific note from the Notes MCP Server by providing its filename to declutter your workspace and manage your Markdown notes efficiently.
Instructions
Delete a note
Args: filename: Note filename
Returns: Confirmation message of deletion
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes |
Implementation Reference
- notes_server.py:168-168 (registration)The @mcp.tool() decorator registers the subsequent delete_note function as an MCP tool named "delete_note".@mcp.tool()
- notes_server.py:169-186 (handler)The handler function for the delete_note tool. It deletes the specified note file from the notes directory and returns a success or not-found message.def delete_note(filename: str) -> str: """ Delete a note Args: filename: Note filename Returns: Confirmation message of deletion """ ensure_notes_dir() filepath = os.path.join(NOTES_DIR, filename) if not os.path.exists(filepath): return f"Note '{filename}' not found" os.remove(filepath) return f"Note '{filename}' deleted"
- notes_server.py:170-178 (schema)The docstring provides the tool schema, describing parameters (filename: str) and return value.""" Delete a note Args: filename: Note filename Returns: Confirmation message of deletion """