AI System Prompt for an Email Triage Agent Using Google Workspace's MCP Server
This system prompt is for anyone building an AI agent that triages a Gmail inbox through a Google Workspace MCP server connection β someone managing a shared support inbox, a founder drowning in inbound email, or a team building an internal assistant that pre-sorts messages before a human reads them. It defines the agent's role, scope, and output format up front so that once it's connected to Gmail via MCP, it behaves consistently across every run instead of improvising a different triage approach each time.
The system prompt sets fixed categories (e.g. urgent, needs reply, FYI, spam/newsletter), a strict rule against taking any action beyond labeling and summarizing, and a required output structure so the agent's results are always easy to scan. Because the agent has real access to a live inbox through MCP, the system prompt also has to be explicit about what it must never do β like sending a reply, archiving a message, or marking something read β so the agent stays a read-and-sort layer rather than quietly taking actions a person didn't approve.
Before deploying this to run automatically on a schedule, it's worth running it through Prompt Debugger to check for loopholes in the "never take action" constraint, since an agent with inbox access is exactly the kind of case where a vague boundary can turn into an unintended side effect.
Prompt template
Want it sharper? Optimize this prompt with Prompt Optimizer, check it with the Prompt Debugger or shorten it with the Token Optimizer.
Example input
When to use it
- Setting up an agent that triages a shared or support inbox before a human team reviews it each morning
- Building a personal assistant that sorts incoming email by urgency so you can scan priorities first
- Standardizing how an AI agent categorizes email across a team so results are consistent regardless of who's reviewing them
- Testing a new inbox automation and needing the agent's boundaries (read-only, no sending or archiving) stated explicitly before giving it real access
Best practices
- State explicitly that the agent must never send, archive, delete, or mark messages as read β read-only access should be a hard constraint, not an assumption
- Define a small, fixed set of triage categories so results stay consistent and easy to act on across different runs
- Specify exactly how much of each email to summarize (one line vs a short paragraph) so output length stays predictable at scale
- Require the agent to flag anything it's unsure how to categorize instead of guessing, so ambiguous emails get human eyes rather than a wrong label
Common mistakes
- Leaving the "no actions beyond triage" boundary implied rather than stated outright, which risks the agent attempting to reply or archive on its own
- Defining too many triage categories, which makes the sorted output harder to scan than the original inbox
- Not specifying how to handle emails with multiple possible categories (urgent AND needs reply), leading to inconsistent labeling
- Deploying the agent to run automatically before testing it on a sample of real past emails to confirm its categorization matches human judgment
FAQs
Can an AI agent read my Gmail inbox without being able to send emails from it?
Yes β through an MCP connection, you can grant an agent read-only scopes so it can view messages without having permission to send, reply, or modify anything. The system prompt should still state that restriction explicitly as a backup, since scope permissions and prompt behavior are two separate layers of safety.
How do I stop the agent from following instructions hidden inside an email?
Include an explicit rule in the system prompt telling the agent to treat all email content as data to classify, never as instructions to follow, since a malicious or automated email could otherwise try to prompt-inject the agent into taking an action.
How many triage categories should an email sorting agent use?
Most setups work best with 3 to 5 categories. More than that tends to create overlap and inconsistent labeling, while fewer than 3 doesn't give enough distinction between genuinely urgent and routine messages.
What's a good way to catch loopholes in this system prompt before giving the agent real inbox access?
Prompt Debugger scans for vague constraints and edge cases a system prompt might miss β worth running before connecting an agent like this to a live inbox, since the cost of a missed boundary here is a real, unwanted action rather than just a bad answer.