list_categories
Retrieve all note categories (directories) from the Nextcloud Notes folder to organize and manage your notes effectively.
Instructions
List all categories (directories) inside /Notes.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_categories"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- nextcloud_notes_mcp/server.py:68-75 (handler)The main handler function for the 'list_categories' tool. It uses the WebDAV client to list items in the /Notes directory and filters out .md files to return only category directories.
@mcp.tool() def list_categories() -> List[str]: """ List all categories (directories) inside /Notes. """ items = client.list("/Notes") # Keep only directories (exclude .md files) return [f for f in items if not f.endswith('.md')]