list_tags
Retrieve all tags in OmniFocus to organize and manage tasks effectively. Use this tool to streamline task categorization and enhance workflow automation within the MCP OmniFocus server.
Instructions
List all tags in OmniFocus.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_omnifocus/server.py:43-46 (handler)MCP tool handler for 'list_tags', registered with @mcp.tool decorator. Delegates to the omnifocus utility function.
@mcp.tool def list_tags() -> list[dict[str, str]]: """List all tags in OmniFocus.""" return omnifocus.list_tags() - Core helper function implementing list_tags logic using JavaScript evaluation to fetch tags from OmniFocus, including hierarchical names.
def list_tags() -> list[dict[str, str]]: """List all tags in OmniFocus. Returns: A list of dictionaries containing tag names and ids, with full hierarchical names. """ script = Template( dedent(""" ${__common_functions__} (() => { return flattenedTags.map(tag => { return { id: tag.id.primaryKey, name: tag.name, fullName: getFullTagName(tag), }; }); })(); """) ) return evaluate_javascript(script.substitute(__common_functions__=__common_functions__))