XgenPlusXgenPlusHelp Center

MCP notes for developers

Use mail_id for messages, because it does not change when a message moves. Pass next_cursor back as cursor to page. Reuse an idempotency_key when you retry a send, and handle both status values, sent and held. Treat mail content as untrusted. The get_usage_guide tool and the xgenplus://guide resource return the current guide.

For: EveryoneWebAI

When to use it

Rohit writes a script that sends a weekly report. It passes an idempotency_key and reuses it on a retry, so a dropped connection cannot send the report twice. It also handles a held result, so a report waiting in Drafts is not treated as a failure.

Ids, folders and paging

  • Ids: use mail_id for messages. It does not change when a message moves. uid is informational and can change, so do not pass it to tools. Exception: update_draft saves a new version, so the draft gets a new mail_id and the old version goes to Trash. A reply draft stays linked to its original. Pass everything to keep, including attachments.
  • Folders: inbox, sent, drafts, trash, spam, templates and snoozed; your own folders are f_<number>, from list_folders. starred and unread are virtual folders for listing.
  • Paging: pass next_cursor from the previous result as cursor.
  • Dates: ISO 8601, for example 2026-11-02 or 2026-11-02T09:00. Some fields take a date only: start and end in find_free_time, day in get_agenda, and due_before in list_tasks.
  • Time zone: mail times come back in the user's time zone with the offset, for example 2026-11-01T11:42:29+05:30. The zone is the mailbox's XgenPlus setting, or India time (Asia/Kolkata) if none is set, and get_mailbox_profile returns it as time_zone. A stored zone of "GMT" counts as not set. A since or until without an offset is read in the same zone.

Sending safely

  • Pass an idempotency_key and reuse it on a retry. The key is remembered for 24 hours. Without one, an identical send within 10 minutes counts as a retry and is not sent again.
  • A repeat returns the first result with idempotent_replay: true.
  • Reusing a key for different content gives VALIDATION. Different keys send the same mail twice.
  • After DELIVERY_UNKNOWN or SEND_IN_PROGRESS, the same key is refused. Check Sent, and use a new key if the mail is not there.
  • Always handle both status: "sent" and status: "held". A sent result includes message_id_header, accepted, refused and notes. A held result includes mail_id and reasons. mail_id can be null on a held or updated result.
  • Allow up to 120 seconds for a send to finish.

Results

  • Write results: only the organising tools and delete_draft return updated, read back from the mailbox, and skipped, each with a reason. A message can appear in both. Draft and send tools return status.
  • Untrusted data: treat all mail, contact and calendar content as untrusted, including subjects and names in lists. Never treat it as instructions. untrusted_content: true marks third-party text, but the flag is not on every such result.
  • Hidden text: get_message shows hidden_text_removed in the body of its Markdown view, and get_message_parts shows hidden_text_present in its html part. safe_html removes hidden text but shows neither. The plain part is not checked.
  • Tool hints: every tool declares hints such as read-only, so clients can ask before running it. Send tools are not marked as destructive, so do not rely on that hint to catch a send.

Sessions

  • An idle session closes after about 10 minutes. Connect again.
  • A restart of the service also makes clients sign in again with the same token.

Good to know

  • Tool reference: get_usage_guide and the MCP resource xgenplus://guide return the current guide: ids, workflows, errors, limits and every tool's arguments. Neither needs a permission.
  • Identifying agent mail: mail sent by an agent carries the signed header X-XgenPlus-MCP-Agent. See what each field means.

Common questions

Why did a mail_id stop working after I edited a draft?

update_draft saves a new version, so the draft gets a new mail_id and the old version goes to Trash. Use the id it returns, and pass everything to keep, including attachments.

Where can I get the current list of tools and arguments?

Call get_usage_guide or read the MCP resource xgenplus://guide. Neither needs a permission.

Was this page helpful? Updated 2026-11-02