Skip to main content
Glama
rncz

Nextcloud Notes MCP Server

by rncz

edit_note

Update content in Markdown (.md) files stored in Nextcloud Notes by specifying filename and new text, replacing existing content.

Instructions

Edit a Markdown (.md) file, updating its content. Always overwrites the old file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
new_contentYes
categoryNo

Implementation Reference

  • The 'edit_note' tool handler. Decorated with @mcp.tool() to register it with the MCP server. Downloads to temp, overwrites remote file via WebDAV, uploads new content.
    @mcp.tool() def edit_note(filename: str, new_content: str, category: str | None = None) -> str: """ Edit a Markdown (.md) file, updating its content. Always overwrites the old file. """ full_path = f"/Notes/{category}/{filename}" if category else f"/Notes/{filename}" tmp_path = os.path.join(tempfile.gettempdir(), next(tempfile._get_candidate_names()) + ".tmp") with open(tmp_path, "w", encoding="utf-8") as f: f.write(new_content) # Remove existing file if it exists if client.check(remote_path=full_path): client.clean(remote_path=full_path) # Upload new content client.upload_sync(remote_path=full_path, local_path=tmp_path) os.remove(tmp_path) return f"Note updated successfully: {full_path}"
  • Registration of the 'edit_note' tool using the FastMCP decorator.
    @mcp.tool()

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/rncz/nextcloud-notes-mcp-server'

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