Skip to content

Feature: MCP search/filter + tool surface improvements #57

Description

@manucompiles

What we're building

Extend GET /api/tasks with optional filter query params, surface them through the MCP list_tasks tool, merge complete_task/uncomplete_task into set_task_completion, and add a text-search box to the web UI filter panel. First of five clubbed patches (v2.10.1-v2.10.5) working through docs/plans/proposal-mcp-and-ui-additions.md.

Scope

In scope: Feature 1 (list_tasks filters), Feature 6 (inbox shorthand), Feature 10 (set_task_completion merge), UI text-search. Dropped: Feature 7 (projectName lookup - marginal value). No new endpoint, no new MCP tool, no schema change.

Plan

docs/plans/_archive/P57-mcp-search-and-tool-improvements.md

Outcome

What was built:

  • GET /api/tasks filter params (projectIds, inbox, labelIds, dueBefore, dueAfter, completed, text). AND across dimensions, OR within id arrays. Arrays bind as repeated keys. No-deadline tasks excluded from date filters. inbox+projectIds → 400.
  • MCP list_tasks extended with the 7 filters (Zod caps: text 200 chars, arrays 50 items). set_task_completion(id, isCompleted) replaces the two completion tools. Tool count 16 → 15.
  • Web UI text-search box on FilterPanel (client-side); sessionStorage restore hardened.

Verified:

  • 54 backend + 60 MCP + 37 frontend tests passing.
  • Real-data curl battery against the live phone exercised every dimension; AND-across/OR-within confirmed.
  • claude.ai connector transcript: filtered list_tasks issued correctly from mobile, new schema (with caps) live.

Two binding-layer bugs found by integration testing (not unit tests):

  • inbox+projectIds 400 guard, and comma-vs-repeated-key array serialization (list_tasks projectIds=[3,5] returned 0 until fixed to repeated keys). Both because unit tests pass args straight to GetAll(), bypassing HTTP query binding. Lesson captured in the plan Outcomes.

Also fixed during this work (latent, affected all prior deploys):

  • deploy-phone.sh sv restart never restarted proot-wrapped services (silent stale deploys). Now kills inner guest processes; runit auto-restarts. Two-parter (proot signal + Next.js process rename). Captured as docs/learnings/proot-signal-propagation.md.

Issues raised during this work: #58 (deferred review findings: deploy pkill breadth, date-only filter contract, sessionStorage coercion).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions