Skip to content

API Reference parrot_tools.o365.mail

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.o365.mail

View source

Office365 Mails Tools.

Specific tools for interacting with Office365 services:

  • CreateDraftMessage: Create email drafts
  • SearchEmail: Search through emails
  • SendEmail: Send emails directly

Class CreateDraftMessageArgs

Arguments for creating a draft email message.

Attributes:

Attribute Type Description
subject str
body str
to_recipients List[str]
cc_recipients Optional[List[str]]
bcc_recipients Optional[List[str]]
importance Optional[str]
is_html bool

Class CreateDraftMessageTool

Tool for creating draft email messages in Office365.

This tool creates a draft email message that can be reviewed and sent later. The draft is saved in the user's Drafts folder.

Attributes:

Attribute Type Description
name str
description str
args_schema Type[BaseModel]

Class DownloadAttachmentArgs

Arguments for downloading an email attachment.

Attributes:

Attribute Type Description
message_id str
attachment_id str
destination str

Class DownloadAttachmentTool

Tool for downloading email attachments to local storage.

This tool downloads a specific attachment from an email message and saves it to a specified location on the local filesystem.

Before downloading, you should:

  1. Use GetMessageTool to retrieve the message and check hasAttachments
  2. List the attachments to get their IDs and names
  3. Use this tool to download specific attachments

The tool will:

  • Create parent directories if they don't exist
  • Decode and save the attachment content
  • Return the path where the file was saved

Attributes:

Attribute Type Description
name str
description str
args_schema Type[BaseModel]

Class GetMessageArgs

Arguments for retrieving a specific message.

Attributes:

Attribute Type Description
message_id str
include_body bool

Class GetMessageTool

Tool for retrieving a specific email message by its ID.

This tool retrieves complete information about a single message, including:

  • Full message headers (subject, sender, recipients, dates)
  • Message body content (if include_body=True)
  • Attachment information
  • Message metadata (read status, importance, conversation ID)

Use this tool when you need detailed information about a specific message, such as reading the full content or checking for attachments.

Attributes:

Attribute Type Description
name str
description str
args_schema Type[BaseModel]

Class ListMessagesArgs

Arguments for listing email messages.

Attributes:

Attribute Type Description
folder str
top int
filter_query Optional[str]
order_by str
select_fields Optional[List[str]]

Class ListMessagesTool

Tool for listing email messages from a specified folder.

This tool allows you to:

  • List messages from any mail folder (Inbox, Sent Items, etc.)
  • Filter messages by various criteria (read status, sender, date, etc.)
  • Limit the number of results
  • Order results by different fields
  • Select specific fields to retrieve

Attributes:

Attribute Type Description
name str
description str
args_schema Type[BaseModel]

Alias O365Client

Re-exported from parrot_tools.o365.base.O365Client.

Alias O365Tool

Re-exported from parrot_tools.o365.base.O365Tool.

Alias O365ToolArgsSchema

Re-exported from parrot_tools.o365.base.O365ToolArgsSchema.

Class SearchEmailArgs

Arguments for searching emails.

Attributes:

Attribute Type Description
query str
folder Optional[str]
max_results int
include_attachments bool
order_by str

Class SearchEmailTool

Tool for searching emails in Office365.

This tool searches through emails with support for:

  • Advanced search queries
  • Folder-specific searches
  • Sorting and limiting results
  • Attachment information

Attributes:

Attribute Type Description
name str
description str
args_schema Type[BaseModel]

Class SendEmailArgs

Arguments for sending an email.

Attributes:

Attribute Type Description
subject str
body str
to_recipients List[str]
cc_recipients Optional[List[str]]
bcc_recipients Optional[List[str]]
importance Optional[str]
is_html bool
save_to_sent_items bool

Class SendEmailTool

Tool for sending emails directly in Office365.

This tool sends an email immediately without creating a draft. The email is sent and optionally saved to the Sent Items folder.

Attributes:

Attribute Type Description
name str
description str
args_schema Type[BaseModel]

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally