Skip to main content
Glama
mailkite

MailKite

Official

mailkite_upload_attachment

Upload a file to get a secure, time-limited URL for email attachments or inline HTML links, avoiding large base64 payloads in every send.

Instructions

Upload a file to MailKite storage and get back a secure, time-limited URL. Reference the returned url as an attachment in send() ({ filename, url }) or link it inline in your HTML — instead of base64-inlining large files on every send. Give the file ONE of four ways: a local path (read and streamed as raw bytes by the CLI/SDK/local MCP), a remote url (MailKite fetches and re-hosts it), base64 content, or — over raw HTTP — the file bytes as the POST body with ?filename=. retentionDays (7/30/90/365, default 7) sets how long the file and URL live. Requires an API key (mk_live_…).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoA remote http(s) URL. MailKite fetches it and re-hosts the bytes under your account. Max 25 MB.
pathNoLocal filesystem path to the file. Read client-side by the CLI, SDKs, and the local MCP server, then uploaded as raw bytes. Not available on the hosted MCP (no filesystem).
contentNoThe file bytes, base64-encoded. The lowest-common-denominator fallback when you can't send a path, URL, or raw bytes.
filenameNoThe file's name, e.g. "invoice.pdf". Shown to recipients on download. Optional when it can be derived from `path` or `url`.
contentTypeNoMIME type, e.g. "application/pdf". Defaults to application/octet-stream (or is inferred from the file extension / fetched response).
retentionDaysNoHow long the file (and its signed URL) stays valid. One of 7, 30, 90, 365. Defaults to 7.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A5/5.0
Behavior5/5

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

Annotations only indicate non-read-only/non-idempotent/non-destructive, but the description adds substantial behavioral context: the uploaded file is re-hosted, the URL is time-limited, retentionDays controls its lifetime, and an API key (mk_live_…) is required. It also clarifies transport-specific behavior (raw bytes vs base64). No contradiction with annotations.

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?

Five sentences, each earning its place: outcome, usage, input methods, retention, and auth. The most important information is front-loaded, and the dense parentheticals add needed detail without fluff.

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?

For an upload action with no output schema and no required parameters, the description gives the agent everything needed: how to supply the file (one of four ways), what is returned (a URL), how to use the return value, how long it lasts, and what credentials are required. The 'ONE of four ways' guidance prevents invalid calls with zero parameters.

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 100%, but the description adds the crucial 'ONE of four ways' mutual-exclusivity constraint that the schema cannot express, plus the raw-HTTP body alternative that has no JSON parameter. It also clarifies retentionDays defaults and the returned URL's format for send().

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 opens with a specific verb and resource: 'Upload a file to MailKite storage and get back a secure, time-limited URL.' It also explains the returned URL's role in send() and contrasts with base64-inlining, making it distinct from sending tools like mailkite_send.

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 explicitly frames the tool as the preferred path over 'base64-inlining large files on every send', and gives concrete usage: reference the URL in send() or inline in HTML. It also details when each of the four file-input methods applies (local path for CLI/SDK/local MCP, remote URL for fetch-and-re-host, content as fallback, raw POST body over HTTP).

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

Install Server

Other Tools