Gmail plugin: search_threads omits some inbox threads; get_thread permission denied while get_message works

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Agent search_threads does not return some inbox threads that are clearly visible in Web Gmail for the same account and query.

For those same thread or message IDs (taken from the Web Gmail URL), get_thread returns “The caller does not have permission”, but get_message returns subject, body, and attachment metadata successfully.

This is selective: other messages from the same automated sender, with the same labels, are returned by search_threads and readable via get_thread.

Plugin path: Cursor Gmail plugin to Google hosted Gmail MCP.

Steps to Reproduce

  1. Connect the Cursor Gmail plugin (OAuth OK; other mail searches work).
  2. In Web Gmail, pick an automated sender that has both:
    • at least one message that MCP search finds, and
    • at least one other message from the same sender that Web Gmail shows but MCP search omits
      Labels on the omitted messages in my case: INBOX, IMPORTANT, CATEGORY_UPDATES.
  3. Call search_threads with a from-query for that sender.
  4. Open an omitted message in Web Gmail, copy its message or thread id from the URL.
  5. Call get_thread with that id → permission denied.
  6. Call get_message with the same id → content OK.
  7. Repeat steps 4–6 on a control message from the same sender that did appear in search_threads → both tools work.

I can share redacted ids privately with Cursor staff if needed.

Expected Behavior

search_threads should match Web Gmail for the same query. get_thread should succeed for ids that get_message can read.

Actual: search_threads omits some matching threads. get_thread → permission denied. get_message → OK. Web Gmail lists the missing threads.

Operating System

Windows 10/11

Version Information

Cursor 3.27.22
Gmail plugin → Google hosted Gmail MCP

Additional Information

Observed 2026-10-29. Re-auth is unlikely: neighboring mail from the same sender already works on the same MCP connection. Looks like inconsistent filtering or ACL between search_threads / get_thread vs get_message.

Same pattern already reported against the shared Google Gmail MCP host: GitHub issue 988 in anthropics/claude-ai-mcp (related issue 298). No identical Cursor Forum report found at filing time.

Question: intentional content filtering, or a bug?

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @AlexeyElizarov, thanks for the report.

To answer your question: Cursor doesn’t filter anything here. The Gmail plugin connects directly to Google’s hosted Gmail server, so the results from search_threads, get_thread and get_message come straight from Google.

We’ve seen Google’s server refuse get_thread for some conversations, most often when one message in the conversation is in Trash or Spam, and its search can skip those same conversations. Its search can also miss mail that Gmail hasn’t finished indexing yet. Reading a single message with get_message often still works, which matches what you’re seeing.

Could you check one of the omitted conversations to help us narrow it down?

  1. In Gmail on the web, open one of the conversations that search_threads leaves out.
  2. Scroll to the bottom and look for a line like 1 deleted message in this conversation, or any message in it marked as spam.
  3. Note when the omitted message arrived (minutes, days or weeks ago).
  4. Open the omitted message, click the three-dot menu, then Show original, and note the SPF, DKIM and DMARC results at the top.
  5. Repeat step 4 for a message from the same sender that search_threads does return.
  6. Ask the agent to run search_threads with the query:
    in:anywhere from:<the sender's full email address>
    
    and check whether the missing conversation shows up.

Please reply with what you find in steps 2 to 6 (no message content needed). In the meantime, get_message on the individual message ids is the reliable way to read these emails. I’ve passed this along to the team.

Thanks @Colin — checked steps 2–6 on two omitted Inbox threads from the same automated utility sender (single-message conversations; labels INBOX, IMPORTANT, CATEGORY_UPDATES). Redacted: no addresses, ids, or subjects.

2. Trash / Spam

- No “deleted message in this conversation” line at the bottom

- No spam-marked message in the thread

- Labels via get_message: INBOX, IMPORTANT, CATEGORY_UPDATES only (no TRASH / SPAM)

3. Age

- One omitted message arrived about 2 days ago and is still omitted

- Another omitted message from the same sender is months old and still omitted

- So this does not look like “Gmail has not finished indexing yet”

4–5. Show original / Authentication-Results (omitted vs a control message from the same sender that search_threads does return)

- Omitted: spf=pass, dmarc=pass (p=NONE); no DKIM-Signature header; Authentication-Results has no dkim= result

- Control: same pattern — spf=pass, dmarc=pass (p=NONE); no DKIM-Signature; no dkim= in Authentication-Results

- SPF / DMARC / DKIM do not distinguish omitted vs working for this sender

6. search_threads with in:anywhere from: that sender

- Still returns only the working subset (about 6 threads)

- Both omitted Inbox threads remain missing

- get_thread on omitted ids still → The caller does not have permission

- get_message on the same ids still OK

Happy to share redacted message/thread ids privately if useful.

Thanks for running all of that, @AlexeyElizarov!

To your original question: this isn’t filtering Cursor does, and it doesn’t look like anything on your account. Google’s hosted Gmail server is holding back certain messages from search_threads and get_thread without saying so in the result, and from what we can see it looks deliberate on Google’s side rather than a glitch. Google doesn’t document what triggers it, and nothing in the headers you checked explains it. Other apps that use the same Google server see the exact same pattern, as you found in that GitHub issue.

For now, get_message is the reliable way to read these. Since your hidden conversations are single messages, get_message on the id from the Gmail URL gives you the same content get_thread would. If you have agent rules or prompts that depend on search, it’s worth telling the agent that an empty search_threads result doesn’t prove an email isn’t there.