Skip to main content
Glama
langmail-mcp

langmail-mcp

Official
by langmail

Upload attachments

upload_attachments

Create short-lived upload URLs for local files, then use the returned blobId to attach PDFs, scans, or spreadsheets to email drafts without sending file bytes through the conversation.

Instructions

Get short-lived upload URLs for files on your own disk that should go out as email attachments, so their bytes never pass through the conversation. Use it for any local file — a PDF, a scan, a spreadsheet — instead of reading it as base64 into create_draft’s content; use blobId straight away instead when the file is already in the mailbox. The result is one URL and curl command per file: PUT the file to it (curl -sS -T '<file>' '<url>'), and the response is JSON with a blobId. Pass that blobId with the filename and mimeType the result lists in the attachments of create_draft or update_draft within 60 minutes. Up to 10 files per call; a file over 25 MB is named and skipped while the rest get URLs. Each URL takes one file and expires after 15 minutes. The URLs are credentials: never echo them to the user.

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": {
      "files": "<files>"
    },
    "name": "upload_attachments"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesThe local files to upload, at most 10 per call. Each gets its own URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior3/5

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

The annotations already flag a non-read-only, non-destructive, non-idempotent, non-open-world operation, and the description adds substantial behaviour beyond them: URLs expire after 15 minutes, blobIds are valid for 60 minutes, oversized files are named and skipped while the rest succeed, and the URLs are credentials that must never be echoed to the user. What it does not cover is where the bytes land or whether the upload is reversible, which matters for a write operation.

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?

The purpose is front-loaded in the first clause, and the rest is a tight sequence of exclusion, usage steps, limits, and the credential warning; almost nothing is padding. It is still a dense single paragraph that mixes workflow steps with an inline curl template, which costs a little scannability.

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?

With no output schema, the description takes on the job of describing the return value — one URL and curl command per file, and a JSON response containing blobId — plus expiry windows and limits. Nothing an agent needs to call this correctly and to hand off the result is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: filename is the name the recipient sees and must be reused in create_draft, mimeType comes back in the result for the attachments handoff, and the 25 MB ceiling is described in terms of the skip behaviour rather than just a maximum. It does not explain how sizeBytes interacts with the pre-upload refusal beyond what the schema already says.

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 states a specific verb and resource — get short-lived upload URLs for files on local disk destined to be email attachments — and immediately distinguishes this path from reading bytes as base64 into create_draft's content or using an existing blobId. An agent can separate it from create_draft, update_draft and download_attachment without opening a schema.

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 positive selection criteria (any local file: PDF, scan, spreadsheet), an explicit exclusion with the alternative (use blobId directly when the file is already in the mailbox), and the downstream handoff (pass blobId with filename and mimeType into attachments of create_draft or update_draft within 60 minutes). Per-call limits of 10 files and the 25 MB skip rule are also stated.

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