Skip to main content
Glama
rncz

Nextcloud Notes MCP Server

by rncz

ensure_notes_folder_exists

Create the /Notes folder in Nextcloud if it doesn't exist, ensuring a location for storing notes.

Instructions

Ensure that the /Notes folder exists in Nextcloud. Creates it if it doesn't exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the ensure_notes_folder_exists tool. It is decorated with @mcp.tool(), which registers it with the MCP server. The function calls the helper _ensure_remote_dir to create the /Notes folder if it does not exist.
    def ensure_notes_folder_exists() -> str:
        """
        Ensure that the /Notes folder exists in Nextcloud.
        Creates it if it doesn't exist.
        """
        _ensure_remote_dir("/Notes")
        return "/Notes folder exists or created successfully."
  • Helper function used by the ensure_notes_folder_exists tool to create a remote directory using the WebDAV client, ignoring if it already exists.
    def _ensure_remote_dir(path: str):
        """Ensure that a remote directory exists in Nextcloud."""
        try:
            client.mkdir(path)
        except Exception:
            # Folder probably already exists → ignore
            pass

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