Skip to main content
Glama

notion-mcp__notion_attach_file

Destructive

Puts a file on a Notion page, appended at the end of the page: an image as an image block, a PDF as a PDF block, and any other file as a file block. The file is named by a file reference. A reference to a file in Gmail or Drive names where it lives: the gateway fetches it and hands it straight to Notion, so its bytes stay out of the conversation. A gmail_message reference puts a whole email on the page as its original .eml, and a gmail_attachment reference one attachment of an email, named by the part id gmail_read lists for it. A drive_file reference puts a Google Drive file as stored, and a drive_export reference a Google Docs, Sheets or Slides file exported to a format such as pdf. A content reference carries a file the caller already holds, as standard base64 in the call, at most 1 MB decoded. An upload reference names a file the user sent through file_upload_link, up to 25 MB, which goes to one call. One file a call. Notion takes a file of at most 20 MB in one part, which is what this tool sends, and a free Notion workspace accepts files of at most 5 MB; the workspace's own limit is read from Notion before anything is sent, and a larger file is refused with nothing sent. The answer is a receipt with the new block's id and type, the file's name, size and type, the SHA-256 and byte count of what was sent, and the page's id, title and URL. The upload is not sent twice; after a failure, the page shows whether the file arrived.

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": {
      "page_id": "<page_id>",
      "file": "<file>"
    },
    "name": "notion-mcp__notion_attach_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesA file reference. For a whole Gmail message: {"type": "gmail_message", "message_id": "<id>"}. For one attachment of a message: {"type": "gmail_attachment", "message_id": "<id>", "part_id": "<part id>"}. For a Drive file as stored: {"type": "drive_file", "file_id": "<id>"}. For a Google Docs, Sheets or Slides file exported: {"type": "drive_export", "file_id": "<id>", "format": "pdf"}. For a file the caller already holds: {"type": "content", "name": "<file name>", "base64": "<standard base64, one unbroken string>"}, at most 1 MB decoded. For a file sent through file_upload_link: {"type": "upload", "upload_id": "<id from its receipt>"}.
accountNoOptional email address of the connected account to use (e.g. 'user@gmail.com'). If omitted, the default account is used.
page_idYesThe page's Notion id or URL. The file is appended at the end of this page.
filenameNoThe name the file has on the page. Optional; by default the name comes from the source.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=false and destructiveHint=true; the description carries far more, disclosing append-only placement, one file per call, the layered size limits (1 MB content, 25 MB upload, 20 MB Notion part, 5 MB free workspace), that the workspace limit is checked before sending and oversized files are refused with nothing sent, and that a failed upload is not retried. It also describes the receipt fields, so the caller knows what comes back without an output schema.

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

Conciseness4/5

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

Front-loaded with purpose and block behavior, then limits and return shape, with no throat-clearing sentences. It loses a point because roughly half its length re-enumerates the six reference types that the nested schema already describes in equivalent detail.

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

Completeness5/5

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

Despite no output schema and a nested object parameter, the description covers the mutation's effect, all size ceilings, failure semantics, and the exact receipt contents. Nothing an agent needs in order to call it correctly and interpret the result is missing.

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

Parameters3/5

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

Schema description coverage is 100% and the nested file schema already documents every field with examples and a per-type example block, so the schema does the heavy lifting. The description's per-type prose largely restates that enum documentation, adding only the 1 MB content cap and the 20/25 MB ceilings, which are not parameter syntax per se.

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?

The opening sentence names a specific verb and resource ("Puts a file on a Notion page, appended at the end") and immediately states the block-type mapping (image block, PDF block, file block). An agent can distinguish this from notion_update_page_content or drive_upload_file without opening the schema.

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?

The description gives conditional guidance for each of the six reference kinds (gmail_message, gmail_attachment, drive_file, drive_export, content, upload), including that upload requires a prior file_upload_link call. It stops short of naming explicit alternatives or when-not-to-use cases, such as preferring notion_update_page_content for adding non-file blocks.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.