Observed
When tags are auto-created during write operations, their position in the OmniFocus Tags view depends on which tool created them:
- Tags created via
add_omnifocus_task with tags=[...] appeared near the top of the Tags view.
- Tags created via
edit_item with add_tags=[...] or replace_tags=[...] appeared near the bottom of the Tags view.
Reproduction
# Creates tags "mcp-test-a" and "mcp-test-b" — observed at top of Tags view
add_omnifocus_task(
name="Test task",
project="MCP Sandbox",
tags=["mcp-test-a", "mcp-test-b"]
)
# Creates tag "mcp-test-c" — observed at bottom of Tags view
edit_item(current_name="Test task", add_tags=["mcp-test-c"])
# Creates tag "mcp-test-final" — observed at bottom of Tags view
edit_item(current_name="Test task", replace_tags=["mcp-test-final"])
(Witnessed live with OmniFocus open in parallel during the operations.)
Expected
Consistent placement regardless of which tool path created the tag. Either always-bottom (matches OmniFocus's UI default when adding a new tag manually) or alphabetical insertion would both be reasonable.
Why it matters
Beyond cosmetics, the inconsistent placement makes it harder to find and clean up test/orphan tags after the fact — you have to scan both ends of the tag tree rather than expecting them in a known location.
Speculation on cause
Without having traced the code paths, the difference suggests add_omnifocus_task and edit_item's tag-handling go through different AppleScript code paths. The tags.py module's generate_add_tags_applescript looks identical in both contexts, so the difference may be in where in the surrounding AppleScript the tag creation happens (e.g., before vs. after the task itself is created and committed).
Observed
When tags are auto-created during write operations, their position in the OmniFocus Tags view depends on which tool created them:
add_omnifocus_taskwithtags=[...]appeared near the top of the Tags view.edit_itemwithadd_tags=[...]orreplace_tags=[...]appeared near the bottom of the Tags view.Reproduction
(Witnessed live with OmniFocus open in parallel during the operations.)
Expected
Consistent placement regardless of which tool path created the tag. Either always-bottom (matches OmniFocus's UI default when adding a new tag manually) or alphabetical insertion would both be reasonable.
Why it matters
Beyond cosmetics, the inconsistent placement makes it harder to find and clean up test/orphan tags after the fact — you have to scan both ends of the tag tree rather than expecting them in a known location.
Speculation on cause
Without having traced the code paths, the difference suggests
add_omnifocus_taskandedit_item's tag-handling go through different AppleScript code paths. Thetags.pymodule'sgenerate_add_tags_applescriptlooks identical in both contexts, so the difference may be in where in the surrounding AppleScript the tag creation happens (e.g., before vs. after the task itself is created and committed).