Skip to main content
Glama

Hand a file to mailmcp

upload_attachment

Stores a file you have (text, or base64 for binary, up to policy.max_upload_bytes) in the mailbox folder "mailmcp-uploads" so it can be attached to a draft or a sent message. Returns {folder, uid, part} to use in the attachments parameter. The file is removed once attached. For large files or files on the user's disk use request_upload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesAccount id from list_accounts
contentYesUTF-8 text or base64
encodingNo
filenameYes
content_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations are all false, so the description carries full burden. It discloses key behaviors: the file is stored in a specific folder, the return structure {folder, uid, part} for the attachments parameter, and the file is removed once attached. It also mentions the size limit (policy.max_upload_bytes). It does not cover error handling or permissions, but the disclosed lifecycle is a significant behavioral detail.

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?

Two sentences with no filler. The primary purpose and behavior are front-loaded, and the alternative is given in the second sentence. Every word adds value.

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?

With no output schema, the description provides the return structure and usage context (attachments parameter). It also explains the file's lifecycle. Missing details include error cases (e.g., exceeding the byte limit) and any prerequisites like account setup, but these are minor for this tool. Overall, it is quite complete for an agent to invoke correctly.

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 low (40%). The description clarifies content and encoding by explaining text vs base64, and mentions the size limit. However, it does not add meaning for account, filename, or content_type parameters. It partially compensates for the schema gaps, but not fully.

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 description clearly states the verb (Stores), the resource (a file), and the purpose (to be attached to a draft or sent message). It also distinguishes itself from the sibling tool request_upload by explicitly naming the alternative for large files, making it unambiguous which tool to select.

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

Usage Guidelines5/5

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

It gives explicit when-to-use guidance: when you already have the file content as text or base64 and want to attach it. It also provides a clear when-not: for large files or files on disk, use request_upload. This directly routes the agent to the correct tool.

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.