Skip to main content
Glama
Sendmux Email Inbox API + Sending

Sendmux Email Inbox API + Sending

Official
by qubrics

Create Attachment Upload

sending_create_attachment_upload

Creates a short-lived upload URL for an outbound email attachment, letting agents upload file bytes outside model context and pass the returned attachment_id to sending_send_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.

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": {
      "filename": "<filename>",
      "size_bytes": "<size_bytes>"
    },
    "name": "sending_create_attachment_upload"
  }
}

Input 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

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.17
    • changedOutput schema / properties / result / allOf
      Previous value: -[
      -  {
      -    "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"
      -  }
      -]New value: +[
      +  {
      +    "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-Qubrics-Upload-Token": "smx_upload_...",
      +              "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"
      +  }
      +]
  2. 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"
      +]
  3. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, idempotentHint=false, destructiveHint=false and openWorldHint=true. The description adds real behavioral context beyond those: the URL is short-lived, the actual byte transfer must happen outside model context using returned headers, and the call yields an attachment_id rather than a completed upload. It stops short of stating the URL's TTL or whether an expired URL can be recreated, which would have made this a 5.

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?

A single front-loaded sentence starting with the selection condition, then the required inputs, then the operational step, then the handoff target. Every clause carries information and nothing is repeated.

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 annotations, a full schema, and an output schema present, the description needs to explain the two-phase flow and the handoff, which it does. The only gaps are edge behavior the caller might need: what happens when the short-lived URL expires and whether sha256 is validated at creation time or at upload time.

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 schema already documents filename, content_type, size_bytes, sha256, and Idempotency-Key thoroughly. The description only echoes the parameter names and stresses that size_bytes must be exact, adding marginal meaning. This is the expected baseline when the schema does the heavy lifting.

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 ('short-lived upload URL for an outbound Sending API attachment') and scopes it to a caller type ('remote or shell-capable agent'), which implicitly separates it from the sibling sending_upload_attachment that takes bytes inline. An agent can tell which of the two upload paths applies without opening either 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 an explicit when-to-use condition (remote or shell-capable agent, out-of-context bytes), the required preconditions (filename, content_type, exact size_bytes), the operational step (PUT outside model context with returned headers), and the downstream handoff ('pass the returned attachment_id to sending_send_email'). That is a complete routing story rather than a vague hint.

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

Deploy Server

Other Tools