Skip to content

Add categoryId/parentId to Time Block API response #65

Description

@YoungR25

Feature Request

The /api/todayTimeBlocks endpoint returns time blocks without any reference to the category or project they belong to. The response includes title, date, time, duration, and calData, but no parentId, categoryId, or similar field.

However, in the Marvin UI, each time block clearly shows which category/project it belongs to (e.g., "in #Category Name"). This means the mapping exists internally but isn't exposed through the API.

The Request

Could you add a categoryId or parentId field to the time block documents returned by /api/todayTimeBlocks? This would allow API consumers to programmatically know which project/category each time block belongs to, without having to guess by matching titles (which is fragile and breaks with renamed or similarly-named items).

Use Case

I'm building an MCP (Model Context Protocol) server for Amazing Marvin. One of the features is an AI assistant that helps with daily planning — it needs to pull tasks for a specific time block and match them with the right project. Right now the only workaround is fuzzy-matching block titles to category names, which is unreliable.

Current Response (example)

{
  "_id": "TzC4sQ5wqs6D4WGN8uiz",
  "title": "Бизнес-анализ и CRM",
  "date": "2026-03-02",
  "time": "09:30",
  "duration": 45,
  "note": "",
  "db": "PlannerItems",
  "calId": "...",
  "calURL": "...",
  "calData": "..."
}

Desired Response

{
  "_id": "TzC4sQ5wqs6D4WGN8uiz",
  "title": "Бизнес-анализ и CRM",
  "date": "2026-03-02",
  "time": "09:30",
  "duration": 45,
  "categoryId": "category-id-here",
  "note": "",
  "db": "PlannerItems",
  "calId": "...",
  "calURL": "...",
  "calData": "..."
}

Thank you for considering this!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions