Skip to main content
Glama
Sendmux

Sendmux Email Inbox API + Sending

Official
by Sendmux

Create Attachment Upload

sending_create_attachment_upload

Get a temporary upload URL to prepare an outbound email attachment, then use the returned attachment ID when sending the email.

Instructions

Use this when a remote or shell-capable agent needs a short-lived upload URL for an outbound Sending API attachment. Provide filename, content_type, and exact size_bytes, PUT the file bytes outside model context with the returned headers, then pass the returned attachment_id to sending_send_email.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sha256NoOptional SHA-256 hex digest for the upload bytes.
filenameYesFilename to associate with the uploaded attachment.
size_bytesYesExact byte size that will be uploaded.
content_typeNoMIME type expected for the upload.
Idempotency-KeyNoOptional client-generated key to make the request idempotent for 24 hours. Replays under the same key return the cached response; a reused key with a different body returns 409 idempotency_conflict.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.0.8
    • addedInput schema / properties / Idempotency-Key / example
      Added value: +"order-12345-2026-04-24"
    • addedOutput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / properties
      Added value: +{
      +  "result": {
      +    "allOf": [
      +      {
      +        "properties": {
      +          "meta": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "request_id": {
      +                "description": "Unique request identifier",
      +                "example": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "request_id"
      +            ],
      +            "type": "object"
      +          },
      +          "ok": {
      +            "enum": [
      +              true
      +            ],
      +            "type": "boolean"
      +          }
      +        },
      +        "required": [
      +          "ok",
      +          "meta"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "data": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "expires_at": {
      +                "description": "ISO timestamp when the upload URL expires.",
      +                "example": "2026-07-07T08:15:00.000Z",
      +                "format": "date-time",
      +                "type": "string"
      +              },
      +              "headers": {
      +                "additionalProperties": {
      +                  "type": "string"
      +                },
      +                "description": "Headers that must be sent with the PUT upload request.",
      +                "example": {
      +                  "Content-Length": "20480",
      +                  "Content-Type": "application/pdf",
      +                  "X-Sendmux-Upload-Token": "smx_upload_..."
      +                },
      +                "type": "object"
      +              },
      +              "max_size_bytes": {
      +                "description": "Maximum upload size in bytes",
      +                "example": 18874368,
      +                "type": "integer"
      +              },
      +              "method": {
      +                "description": "HTTP method for upload_url",
      +                "enum": [
      +                  "PUT"
      +                ],
      +                "type": "string"
      +              },
      +              "upload_id": {
      +                "description": "Temporary upload intent ID.",
      +                "example": "upl_tz4a98xxat96iws9zmbrgj3a",
      +                "pattern": "^upl_[a-z0-9]{24}$",
      +                "type": "string"
      +              },
      +              "upload_url": {
      +                "description": "Short-lived URL that accepts a binary PUT with the returned headers.",
      +                "example": "https://smtp.sendmux.ai/api/v1/emails/attachment-uploads/upl_tz4a98xxat96iws9zmbrgj3a",
      +                "format": "uri",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "upload_id",
      +              "upload_url",
      +              "method",
      +              "expires_at",
      +              "max_size_bytes",
      +              "headers"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "data"
      +        ],
      +        "type": "object"
      +      }
      +    ],
      +    "unevaluatedProperties": {
      +      "not": {}
      +    },
      +    "x-fastmcp-top-level-schema": "AttachmentUploadIntentResponse"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "result"
      +]
  2. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses behavior beyond the annotations: the URL is short-lived, the bytes must be PUT outside model context using returned headers, and the returned attachment_id feeds into sending_send_email. This explains the stateful two-step flow that annotations (readOnlyHint=false, openWorldHint=true) do not convey. It adds meaningful operational context without contradicting any annotation.

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 zero waste: the first front-loads the purpose and trigger condition, the second lays out the parameter requirements and the follow-on workflow. Every phrase earns its place; the structure mirrors the order of operations the agent must execute.

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 tool with an output schema and five document parameters, the description covers the full call cycle: what to provide, what happens after invocation (PUT with returned headers), and what to do with the result (pass attachment_id to sending_send_email). It doesn't mention upload size limits or expiry duration, but the output schema covers return values and the essential workflow is fully specified.

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%, so the baseline is 3. The description reinforces which parameters matter ('Provide filename, content_type, and exact size_bytes') and stresses that size_bytes must be exact, which slightly amplifies the schema's 'Exact byte size that will be uploaded'. It doesn't add meaningfully beyond what the schema already states for each parameter.

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: it creates a 'short-lived upload URL' for an 'outbound Sending API attachment'. This distinguishes it from its sibling sending_upload_attachment, which is a different upload mechanism. The workflow (PUT bytes, pass attachment_id to sending_send_email) makes the tool's role unmistakable.

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 opens with an explicit when-to-use condition: 'when a remote or shell-capable agent needs a short-lived upload URL'. It also describes the intended flow (upload outside model context, then pass attachment_id onward), which signals the context where this tool belongs. It doesn't explicitly name an alternative or state when not to use it, even though sending_upload_attachment exists as a likely alternative.

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