Skip to content

Add add_area and update_area MCP tools#5

Open
Juxsta wants to merge 1 commit into
rossshannon:mainfrom
Juxsta:feat/area-management
Open

Add add_area and update_area MCP tools#5
Juxsta wants to merge 1 commit into
rossshannon:mainfrom
Juxsta:feat/area-management

Conversation

@Juxsta
Copy link
Copy Markdown

@Juxsta Juxsta commented May 20, 2026

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. Passing tags=[] clears all tags.

Also documents the existing area_id, area_title, and list_name parameters on update_project, which are already implemented in the AppleScript bridge and MCP wrapper but missing from the update_project section of the README.

Why

get_areas exists 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

  • New file tests/test_area_operations.py covers:
    • add_area happy path
    • add_area with tags
    • add_area empty-title rejection
    • update_area rename
    • update_area tag replace + clear
    • update_area invalid-id error path
  • End-to-end smoke test against a live Things 3 install via the @mcp.tool wrappers (add_new_areaupdate_existing_area → cleanup).
  • Full pre-commit gauntlet matching lint.yml: py_compile, ruff check ., ruff format --check ., mypy src/, bandit -r src/ — all pass.
  • Full pytest run: all 6 new tests pass. The 5 unrelated failures in tests/test_list_operations.py are pre-existing on main (format-string assertions tripping on Things 3.20's stock onboarding todos) and unchanged by this PR.

Notes

  • Areas in Things only expose name and tags via AppleScript (no notes, no scheduling, no deadlines), so the surface is intentionally smaller than add_project / update_project.
  • Did not add delete_area for parity with the existing API (no delete_project either) — happy to add it as a follow-up if you'd like.

Test plan

  • pytest tests/test_area_operations.py passes
  • Full suite has no new regressions vs main
  • ruff check . clean
  • ruff format --check . clean
  • mypy src/ clean
  • bandit -r src/ clean
  • Manual end-to-end: create area, rename, retag, clear tags, delete via AppleScript

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant