Skip to content

get_today / get_anytime return project children twice (nested items[] and top-level) #61

Description

@ggfevans

Repro (v0.8.1)
Create a project with child todos and start/schedule it so it appears in Today or Anytime. get_today / get_anytime then return:

  • the project entry with its children nested under items[], and
  • the same children again as top-level entries.

Observed: a Today list with one project (2 due children) + 2 standalone todos reports total: 6 — children counted once nested and once top-level; structured count/total include the duplicates.

Effects

  • count/total inflated; limit/offset paginate duplicates
  • LLM clients double-count tasks and pay for each child twice (notes and checklists serialise in both copies)

Cause
things.today()/things.anytime() return both project rows and child task rows; the server attaches children to project rows (include_items) without removing the top-level copies.

Proposal
Drop top-level entries whose project uuid is itself present in the same result set — keeps the grouped representation and matches the Things UI's project-grouped views. Alternatives: stop attaching items[] in these list views, or a flatten parameter. PR to follow.

Env: things-mcp v0.8.1, things-py >= 0.0.15, macOS, Things 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions