Skip to main content
Glama
rncz

Nextcloud Notes MCP Server

by rncz

read_note

Retrieve content from Markdown notes stored in Nextcloud Notes by specifying filename and optional category, enabling access to stored information for processing.

Instructions

Read a Markdown (.md) file.

Args:
    filename: Name of the note file, e.g., "note1.md"
    category: Optional category folder. If None, read from /Notes root.

Returns:
    Content of the note as a string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
categoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'read_note' tool. It constructs the full path to the note file in Nextcloud, downloads it to a temporary local file using WebDAV client, reads the content, cleans up the temp file, and returns the note's content as a string.
    @mcp.tool()
    def read_note(filename: str, category: str | None = None) -> str:
        """
        Read a Markdown (.md) file.
    
        Args:
            filename: Name of the note file, e.g., "note1.md"
            category: Optional category folder. If None, read from /Notes root.
    
        Returns:
            Content of the note as a string.
        """
        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")
    
        client.download_sync(remote_path=full_path, local_path=tmp_path)
        with open(tmp_path, "r", encoding="utf-8") as f:
            content = f.read()
        os.remove(tmp_path)
        return content
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the basic operation (reading a file) and return value (content as a string), but lacks details on error handling (e.g., what happens if the file doesn't exist), permissions, or performance aspects. It adds some context but is not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with a clear purpose statement followed by structured sections for arguments and returns. Every sentence earns its place by providing essential information without redundancy, making it easy to scan and understand.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 parameters, no nested objects) and the presence of an output schema (implied by the 'Returns' section), the description is mostly complete. It covers the purpose, parameters, and return value adequately. However, it could benefit from more behavioral context, such as error handling, to be fully comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% schema description coverage. It explains that 'filename' is the name of the note file with an example ('note1.md') and clarifies that 'category' is an optional folder, defaulting to '/Notes root' if None. This compensates well for the low schema coverage, though it doesn't cover all potential edge cases.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Read') and resource ('a Markdown (.md) file'), making the purpose specific and understandable. However, it doesn't explicitly distinguish this tool from potential siblings like 'list_notes_of_a_category' or 'list_uncategorized_notes', which might also involve reading notes but with different scopes or outputs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying that it reads a single note file and mentions an optional category parameter for folder-based reading, but it doesn't provide explicit guidance on when to use this tool versus alternatives like 'list_notes_of_a_category' or 'edit_note'. No exclusions or prerequisites are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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