Open Bug 2035321 Opened 7 months ago Updated 13 days ago

MailExtensions Calendar: calendars/items API

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

enhancement
Points:
5

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: Fallen, Assigned: Fallen)

References

(Blocks 2 open bugs)

Details

Attachments

(1 external file)

This issue is to implement the messenger.calendar.calendars and messenger.calendar.items APIs, to make a start into getting calendar APIs into Thunderbird.

Points: --- → 5
No longer blocks: tb-maintenance-2026-q3

Feedback from an add-on that would use this API, following up on comment 2 of bug 2042677.

Commonpost (https://github.com/commonpost/thunderbird-mcp) lets AI assistants list, create
and update calendar events through an Experiment today. I could not open D296842, so this is
based on the calendar Experiment schema in thunderbird/webext-experiments (April 2026); please
correct me where the patch differs.

What the schema already covers for us: calendars.query/get, items.query with
rangeStart/rangeEnd and expand, items.create/update/remove/move, events and tasks. Passing
items as iCal or jCal is a good fit: STATUS and TRANSP travel as they are, which matters to
us (an assistant's "free" event must not become "tentative").

What we would still need:

  1. A way to open Thunderbird's own event or task editor pre-filled with an item, so the user
    reviews it before it is saved, like compose.beginNew for mail. Every event an assistant
    creates goes through that review in Commonpost; items.create alone would make direct
    creation the only option.
  2. A result limit on items.query (we cap results for assistants).
  3. If possible, separate permissions for reading and for writing calendar items, so an add-on
    can be given read-only access to the calendar.

We have a lab that drives a real headless Thunderbird
(https://github.com/commonpost/thunderbird-mcp-lab) and can test the API on Beta or Daily
once it lands.

Feedback from NC Connector for Thunderbird (https://github.com/nc-connector/NC_Connector_for_Thunderbird), following up on a conversation between its maintainer (DeBaschdi on GitHub) and Philipp in the Add-on Developers channel.

Use case: after the user signs in to Nextcloud, the add-on registers their Nextcloud calendars as regular CalDAV calendars, the same way the "New Calendar" dialog does. Thunderbird's own provider then handles synchronization. Work in progress: https://github.com/nc-connector/NC_Connector_for_Thunderbird/pull/54

calendars.create() in D296842 already supports this for type: "caldav". To create a calendar that behaves like one from the dialog, we would also need:

  1. username: proposed in https://github.com/thunderbird/webext-experiments/pull/68
  2. refreshInterval: proposed in https://github.com/thunderbird/webext-experiments/pull/75
  3. A way to enable the offline cache (cache.enabled) at creation time. Setting it afterwards makes CalCalendarManager re-create the calendar under a new id (changeCalendarCache), so an add-on that tracks its calendars by id cannot do it as a follow-up update(). Neither the experiment nor D296842 covers this yet.

Would you take 1 and 2 into D296842 or a follow-up, and where should the cache option go? We are happy to write the patch for whichever part helps.

Credentials (making the server login available without a prompt) are a separate question; we will raise that, and CardDAV creation in addressBooks, in their own bugs.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: