Skip to content

Expose MCP content actions and diagnose stuck Busy operations - #22

Merged
mrinc merged 5 commits into
masterfrom
improve/mcp-capability-guide
Sep 13, 2026
Merged

mrinc merged 5 commits into
masterfrom
improve/mcp-capability-guide

Conversation

@bcbetterninja

@bcbetterninja bcbetterninja commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

MCP clients could mistake a missing attachment parameter or stale tool inventory for missing server support. Content actions in Calendar, People, To Do and Notes were also absent, and mail had no provider-backed reply/forward draft tool. This change exposes the app’s content operations and supplies documentation that clients can query directly.

  • get_capabilities reports server version, permissions, account allowlists, registered tool names and workflows. get_action_guide(topic) provides current tool descriptions for mail, calendar, people, tasks, notes and Drive, including discovery recovery and provider limits.
  • Mail gains explicit reply/forward draft tools (plus a general response tool), read/flag/pin state, provider headers, Busy diagnostics, retry controls and cancellation, discovered-person search, draft receipt/importance options and sync issue metadata. Response recipients are explicit; empty CC/BCC remains empty. Microsoft 365 creates provider response drafts; Gmail preserves thread ID and reply headers through attachment edits. Nothing is sent by creating a draft.
  • Calendar gains calendar/event listing, event creation/editing/deletion, and creation from full cached email content. People gains saved-contact CRUD including separately allowed shared address books. To Do gains list/task CRUD and completion. Notes gains notebook/section/page navigation and page read/create/update/delete. Drive gains provider search alongside existing file operations.
  • Settings adds an independent workspace-account allowlist. Existing mailbox/Drive access grants no new workspace access. Edit permission gates mutations; send permission also gates calendar operations that can send invitations/updates/cancellations. Navigation, app settings, sign-in and granting MCP access remain human actions.

The action matrix and usage guide explains required steps, permissions, recipient control, local file accessibility, retries, and unsupported provider/app operations. Cross-account mail moves, Google Drive, and OneNote notebook/section creation/deletion remain unsupported. Workspace operations call providers and need connectivity; UI caches refresh through normal sync. Provider workspace updates generally do not offer atomic version checks. Interrupted remote mutations must be inspected before retrying.

Validation: Release build has zero warnings/errors; all 515 tests pass. A real MCP HTTP client verifies the new tools are registered and the guide can be called. Regression tests cover independent workspace authorization, scoped CRUD dispatch, event send permissions, stale Notes edits, exact reply recipients, attaching a ZIP to a provider-linked draft, and Gmail thread/header preservation when changing attachments. Tests use fictional data/fake providers; no real mail was sent or account content changed.

Busy now shows the provider error, failure count, attempt/failure timestamps and recovery guidance inline. Automatic retries pause after three failures, including legacy high-count items; an explicit retry preserves history. Earlier pending actions for the same message block later actions. Unconfirmed sends cannot be retried through this path. check_mail_action and the app’s Check status button investigate saved IDs and bounded exact-identity matches without altering queued actions. Changed server IDs are reported with provider-side recovery guidance, not automatically rebound; inconclusive results never discard mail. The app displays check results beneath the affected item.

Additional validation covers pause persistence after restart, legacy payloads, dependent moves, one explicit attempt after a pause, unconfirmed-send protection, MCP write permissions, and exact-identity versus subject-only matches. Native Xvfb captures use fictional data only. Live inspection was read-only; no live pending actions were retried or cancelled.

Busy light theme, fictional data
Busy dark theme, fictional data

Pending move visibility follows the latest requested destination, including failed/retrying/paused actions. Archive from Unified Inbox removes the row from Inbox and shows it as pending in Archive. Stale source-folder sync pages cannot put it back, and startup repairs source projections left by older versions. Cancellation restores the previous pending destination, or the original source when no move remains. Duplicate destination requests are no-ops; explicitly choosing a different destination permits a retry without losing history. Regression coverage includes blocked provider calls, Unified Inbox navigation, stale sync, failures, restart, cancellation, and chained moves.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 17dbe3c3-5951-41a7-9c84-8e0b60c5ed2a


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bcbetterninja bcbetterninja changed the title Explain MCP attachment workflows and tool discovery Expose MCP content actions across workspaces with usage guidance Sep 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9f32db7ba

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/BetterMail.Google/GoogleGmailProvider.cs Outdated
@bcbetterninja bcbetterninja changed the title Expose MCP content actions across workspaces with usage guidance Expose MCP content actions and diagnose stuck Busy operations Sep 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be87c1e918

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/BetterMail.Core/EncryptedMailStore.Actions.cs
@mrinc
mrinc merged commit e7ec497 into master Sep 13, 2026
8 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92d3cb57e5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

var content = remote.Message;
// Explicit recipients override provider reply-all defaults, including an empty CC/BCC.
var local = new LocalDraft(Guid.NewGuid().ToString("N"), sender.Account.AccountId, mailboxId,
Recipients(to), Recipients(cc), Recipients(bcc), content.Subject, content.Body, content.Attachments ?? [], now,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Drop Microsoft inline parts after embedding them

When forwarding a Microsoft 365 message that contains both CID images and a regular attachment, PrepareQuotedMessageHtml embeds the images as data URIs, while Graph's createForward draft returns the original inline and regular attachments and this line stores all of them locally. send_draft subsequently retains those inline parts and creates new ones for the data URIs, duplicating every embedded image and potentially exceeding provider size limits. The Gmail follow-up now filters copied inline parts, but this Microsoft-backed path still needs to retain only the non-inline attachments.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants