feat(mcp): list and tag tools (create and rename) (#204) #217

Open
maximus wants to merge 4 commits from issue-204-mcp-list-tag-tools into issue-203-mcp-write-tools

4 commits

Author SHA1 Message Date
le king fu
fa7d90be08 docs(review): say which account filters the mutations prove (#204)
The review rules said that every account filter of the list and tag
functions falls under its mutation. Four do: the read of updateList, the
read of updateTag, the name lookup of createTag and the position query of
createList. The filter of the UPDATE statement of updateList and of
updateTag does not: that statement writes the row the function has just
read under the same filter and locked, so removing it leaves every test
green. The sentence now says so.

A comment of route.test.ts no longer speaks of a page that does not exist
yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 20:50:31 -05:00
le king fu
1f257c71c1 test(web): a tag stored with spaces around its name is still the tag of the name (#204)
POST /api/tags stores a name as it receives it. createTag compares the
stored names trimmed too: without that, every test stayed green when the
trim of the comparison key was removed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 20:50:31 -05:00
le king fu
de06158528 docs(review): the list and tag tools in the review rules (#204)
- "Écarts voulus entre l'API REST et les outils MCP": create_tag returns the
  existing tag, how two names are compared and why not in SQL, create_list at
  the end of the lists, update_list and the Inbox, and the palette of the
  tools (palette.ts, compared with the app by a test, kept import-free).
- "Écritures des outils MCP": nine write tools, thirteen tools for a
  read-write token; create_tag on a taken name writes nothing.
- "Références des outils d'écriture": the account checks of updateList,
  updateTag and createTag, and their refusals.
- Sync zone: null is the answer for a task only; a list or a tag an MCP tool
  writes advances its updatedAt.

The "Niveaux" section is untouched.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 20:50:31 -05:00
le king fu
ba38084fd1 feat(mcp): list and tag tools, create and rename (#204)
Four write tools on the envelope of #203, for a read-write token only:
create_list, update_list, create_tag and update_tag. A read-write token now
sees thirteen tools, a read-only token still four. No tool deletes anything.

- palette.ts (new, import-free): LIST_COLORS, TAG_COLORS, LIST_ICONS and their
  defaults, moved out of tagEditing.ts, which re-exports the tag palette. A
  test reads app/(tabs)/lists.tsx and app/(tabs)/settings.tsx and fails when
  the app and the companion differ.
- taskWrites.ts: createList (end of the live lists of the account),
  updateList (live list of the account, never the Inbox), createTag (under the
  account lock; a live tag of the same name is returned as it is) and
  updateTag (updatedAt advanced). A list or a tag that is not a live row of
  the account is refused with list_not_found or tag_not_found: a row of
  another account answers like one that does not exist.
- Tag names are compared in JavaScript (trimmed, NFC, lower case), not with
  SQL lower(), which follows the locale of the database.
- A color outside the palette of the app is refused (invalid_color), an icon
  too (invalid_icon); a color is stored in the spelling of the palette.

Resolves #204

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 20:50:31 -05:00