Add add_area and update_area MCP tools#5
Open
Juxsta wants to merge 1 commit into
Open
Conversation
Rounds out area parity with projects: - add_area(title, tags) creates a new area, optionally tagged. - update_area(id, title, tags) renames an area and/or replaces its tags. Passing tags=[] clears all tags. Also documents the existing area_id, area_title, and list_name parameters on update_project, which were already implemented in the AppleScript bridge and MCP tool wrapper but missing from the README. Tests live in tests/test_area_operations.py and use the existing mcp-test-namespaced fixtures for cleanup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new modification operations to round out area parity with projects:
add_area(title, tags=None)— create a new area, optionally with tags.update_area(id, title=None, tags=None)— rename an area and/or replace its tags. Passingtags=[]clears all tags.Also documents the existing
area_id,area_title, andlist_nameparameters onupdate_project, which are already implemented in the AppleScript bridge and MCP wrapper but missing from theupdate_projectsection of the README.Why
get_areasexists but there was no way to create or modify areas via the MCP server — clients have to drop down to raw AppleScript or click around in the app. With this PR, an AI client can set up a fresh Things workspace end-to-end through the MCP.Tested
tests/test_area_operations.pycovers:add_areahappy pathadd_areawith tagsadd_areaempty-title rejectionupdate_arearenameupdate_areatag replace + clearupdate_areainvalid-id error path@mcp.toolwrappers (add_new_area→update_existing_area→ cleanup).lint.yml:py_compile,ruff check .,ruff format --check .,mypy src/,bandit -r src/— all pass.tests/test_list_operations.pyare pre-existing onmain(format-string assertions tripping on Things 3.20's stock onboarding todos) and unchanged by this PR.Notes
nameandtagsvia AppleScript (no notes, no scheduling, no deadlines), so the surface is intentionally smaller thanadd_project/update_project.delete_areafor parity with the existing API (nodelete_projecteither) — happy to add it as a follow-up if you'd like.Test plan
pytest tests/test_area_operations.pypassesmainruff check .cleanruff format --check .cleanmypy src/cleanbandit -r src/clean