edit_category
Rename an existing category in Nextcloud Notes to reorganize your note structure. Specify the current category name and the new name to update.
Instructions
Rename an existing category inside Notes.
Args:
old_name: Current name of the category.
new_name: New name for the category.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| old_name | Yes | ||
| new_name | Yes |
Implementation Reference
- nextcloud_notes_mcp/server.py:201-217 (handler)The handler function for the 'edit_category' tool, registered via @mcp.tool(). It renames a category directory using the WebDAV client's move method.@mcp.tool() def edit_category(old_name: str, new_name: str) -> str: """ Rename an existing category inside Notes. Args: old_name: Current name of the category. new_name: New name for the category. """ old_path = f"Notes/{old_name}" new_path = f"Notes/{new_name}" try: client.move(old_path, new_path) except Exception as e: return f"Failed to rename category: {str(e)}" return f"Category renamed successfully: {old_path} → {new_path}"
- nextcloud_notes_mcp/server.py:201-201 (registration)Registers the edit_category tool with the FastMCP server using the @mcp.tool() decorator.@mcp.tool()
- Docstring providing input schema (arguments old_name and new_name) and description for the tool.""" Rename an existing category inside Notes. Args: old_name: Current name of the category. new_name: New name for the category. """