Skip to main content
Glama

graph_add_mail_attachment

Attach a file (max 3 MB) to an existing Outlook draft by message ID; specify file name, base64 content, MIME type, and optional shared mailbox.

Instructions

Attach a file to an existing draft message (max 3MB).

Args: message_id: The draft message ID (from graph_create_mail_draft). file_name: File name to show on the attachment. content_base64: File content encoded as base64. content_type: MIME type (default "application/octet-stream"). mailbox: Shared mailbox address or user ID to act on. Empty targets your own mailbox. Requires the delegated Mail.*.Shared permissions.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "message_id": "<message_id>",
      "file_name": "<file_name>",
      "content_base64": "<content_base64>"
    },
    "name": "graph_add_mail_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
mailboxNo
file_nameYes
message_idYes
content_typeNoapplication/octet-stream
content_base64Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does disclose the 3MB size cap, the base64 content requirement, the default MIME type, and that shared mailboxes require delegated Mail.*.Shared permissions — solid behavioral context. It leaves out failure modes, whether existing attachments are affected, and what is returned after the attach succeeds.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose sentence is front-loaded with the size limit, and the Args block is compact with one line per parameter. No redundant or filler sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter mutation tool with no annotations and no output schema, the definition covers prerequisites, limits, and auth needs well. The remaining gap is the absence of any statement about the return value or error behavior on oversized files.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: each of the five parameters is explained, including formatting (base64), the default content_type, and the semantics of an empty mailbox value plus its permission implication.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Attach a file to an existing draft message') plus a hard constraint (max 3MB). The word 'draft' scopes it clearly against the sibling send/read/attachment-listing tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It establishes the prerequisite flow by noting message_id comes from graph_create_mail_draft, which tells the agent this must follow draft creation. It does not explicitly state when to prefer it over related tools or what to do if the message is not a draft, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools