Skip to main content
Glama
Sendmux Email Inbox API + Sending

Sendmux Email Inbox API + Sending

Official
by qubrics

Upload Attachment

mailbox_upload_attachment

Prepare an email attachment for sending: get a short-lived presigned PUT URL for real files or accept tiny inline base64 content, then include the returned blob ID in the message.

Instructions

Use this before sending a mailbox attachment. For real files set presign_upload_url=true with filename, content_type, and size_bytes, then PUT the file to the returned short-lived URL promptly and send the returned blob_id. Inline content_base64 is a last resort for tiny agent-authored files only and is capped at 32 KiB decoded.

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>"
    },
    "name": "mailbox_upload_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesFilename to use when sending the uploaded attachment.
mailbox_idNoMailbox public ID when the credential can access more than one mailbox.
size_bytesNoExact byte size required when presign_upload_url=true.
content_typeNoMIME type to store with the upload, for example application/pdf.application/octet-stream
content_base64NoLast-resort inline base64 for tiny agent-authored files only. Decoded content must be at most 32 KiB; use presign_upload_url for real files.
presign_upload_urlNoWhen true, return a short-lived signed PUT URL instead of reading bytes. Provide size_bytes and upload with a shell/client promptly.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.17
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "data": {
      -        "oneOf": [
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "blob_id": {
      -                "description": "Uploaded attachment blob ID for a later send request.",
      -                "type": "string"
      -              },
      -              "content_type": {
      -                "example": "application/pdf",
      -                "type": "string"
      -              },
      -              "filename": {
      -                "example": "invoice.pdf",
      -                "type": "string"
      -              },
      -              "size_bytes": {
      -                "example": 12345,
      -                "type": "integer"
      -              }
      -            },
      -            "required": [
      -              "blob_id",
      -              "filename",
      -              "content_type",
      -              "size_bytes"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "expires_at": {
      -                "description": "Upload URL expiry time.",
      -                "format": "date-time",
      -                "type": "string"
      -              },
      -              "headers": {
      -                "additionalProperties": false,
      -                "description": "Headers that must be sent exactly with the PUT request.",
      -                "properties": {
      -                  "Content-Length": {
      -                    "type": "string"
      -                  },
      -                  "Content-Type": {
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "Content-Type",
      -                  "Content-Length"
      -                ],
      -                "type": "object"
      -              },
      -              "max_size_bytes": {
      -                "description": "Maximum accepted attachment size in bytes.",
      -                "type": "integer"
      -              },
      -              "method": {
      -                "description": "HTTP method to use with `upload_url`.",
      -                "enum": [
      -                  "PUT"
      -                ],
      -                "type": "string"
      -              },
      -              "upload_id": {
      -                "description": "Short-lived upload intent ID.",
      -                "type": "string"
      -              },
      -              "upload_url": {
      -                "description": "Short-lived signed PUT URL for this exact attachment. Upload promptly; if it expires, create a new upload URL.",
      -                "example": "https://app.sendmux.ai/api/v1/mailbox/attachment-uploads/upl_123?upload_token=...",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "upload_id",
      -              "upload_url",
      -              "method",
      -              "expires_at",
      -              "headers",
      -              "max_size_bytes"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "meta": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "request_id": {
      -            "type": "string"
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "ok": {
      -        "const": true
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "data"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "type": "string"
      -          },
      -          "doc_url": {
      -            "type": "string"
      -          },
      -          "errors": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "code": {
      -                  "type": "string"
      -                },
      -                "field": {
      -                  "type": "string"
      -                },
      -                "message": {
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "field",
      -                "code",
      -                "message"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "message": {
      -            "type": "string"
      -          },
      -          "param": {
      -            "type": "string"
      -          },
      -          "retryable": {
      -            "type": "boolean"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "meta": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "request_id": {
      -            "type": "string"
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "ok": {
      -        "const": false
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "oneOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "blob_id": {
      +                "description": "Uploaded attachment blob ID for a later send request.",
      +                "type": "string"
      +              },
      +              "content_type": {
      +                "example": "application/pdf",
      +                "type": "string"
      +              },
      +              "filename": {
      +                "example": "invoice.pdf",
      +                "type": "string"
      +              },
      +              "size_bytes": {
      +                "example": 12345,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "blob_id",
      +              "filename",
      +              "content_type",
      +              "size_bytes"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "expires_at": {
      +                "description": "Upload URL expiry time.",
      +                "format": "date-time",
      +                "type": "string"
      +              },
      +              "headers": {
      +                "additionalProperties": false,
      +                "description": "Headers that must be sent exactly with the PUT request.",
      +                "properties": {
      +                  "Content-Length": {
      +                    "type": "string"
      +                  },
      +                  "Content-Type": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "Content-Type",
      +                  "Content-Length"
      +                ],
      +                "type": "object"
      +              },
      +              "max_size_bytes": {
      +                "description": "Maximum accepted attachment size in bytes.",
      +                "type": "integer"
      +              },
      +              "method": {
      +                "description": "HTTP method to use with `upload_url`.",
      +                "enum": [
      +                  "PUT"
      +                ],
      +                "type": "string"
      +              },
      +              "upload_id": {
      +                "description": "Short-lived upload intent ID.",
      +                "type": "string"
      +              },
      +              "upload_url": {
      +                "description": "Short-lived signed PUT URL for this exact attachment. Upload promptly; if it expires, create a new upload URL.",
      +                "example": "https://app.qubrics.com/api/v1/mailbox/attachment-uploads/upl_123?upload_token=...",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "upload_id",
      +              "upload_url",
      +              "method",
      +              "expires_at",
      +              "headers",
      +              "max_size_bytes"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "meta": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "request_id": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": true
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "data"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "doc_url": {
      +            "type": "string"
      +          },
      +          "errors": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "code": {
      +                  "type": "string"
      +                },
      +                "field": {
      +                  "type": "string"
      +                },
      +                "message": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "field",
      +                "code",
      +                "message"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "param": {
      +            "type": "string"
      +          },
      +          "retryable": {
      +            "type": "boolean"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "meta": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "request_id": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": false
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed5 schema fields changedv1.0.8
    • changedInput schema / properties / content_base64 / description
      Previous value: -"Last-resort inline base64 for tiny agent-authored files only. Decoded content must be at most 32 KiB; use file_path or presign_upload_url for real files."New value: +"Last-resort inline base64 for tiny agent-authored files only. Decoded content must be at most 32 KiB; use presign_upload_url for real files."
    • removedInput schema / properties / file_path
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Local file path for stdio MCP only. The path must be inside a client-declared MCP root; hosted MCP rejects it."
      -}
    • addedOutput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / oneOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "oneOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "blob_id": {
      +                "description": "Uploaded attachment blob ID for a later send request.",
      +                "type": "string"
      +              },
      +              "content_type": {
      +                "example": "application/pdf",
      +                "type": "string"
      +              },
      +              "filename": {
      +                "example": "invoice.pdf",
      +                "type": "string"
      +              },
      +              "size_bytes": {
      +                "example": 12345,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "blob_id",
      +              "filename",
      +              "content_type",
      +              "size_bytes"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "expires_at": {
      +                "description": "Upload URL expiry time.",
      +                "format": "date-time",
      +                "type": "string"
      +              },
      +              "headers": {
      +                "additionalProperties": false,
      +                "description": "Headers that must be sent exactly with the PUT request.",
      +                "properties": {
      +                  "Content-Length": {
      +                    "type": "string"
      +                  },
      +                  "Content-Type": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "Content-Type",
      +                  "Content-Length"
      +                ],
      +                "type": "object"
      +              },
      +              "max_size_bytes": {
      +                "description": "Maximum accepted attachment size in bytes.",
      +                "type": "integer"
      +              },
      +              "method": {
      +                "description": "HTTP method to use with `upload_url`.",
      +                "enum": [
      +                  "PUT"
      +                ],
      +                "type": "string"
      +              },
      +              "upload_id": {
      +                "description": "Short-lived upload intent ID.",
      +                "type": "string"
      +              },
      +              "upload_url": {
      +                "description": "Short-lived signed PUT URL for this exact attachment. Upload promptly; if it expires, create a new upload URL.",
      +                "example": "https://app.sendmux.ai/api/v1/mailbox/attachment-uploads/upl_123?upload_token=...",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "upload_id",
      +              "upload_url",
      +              "method",
      +              "expires_at",
      +              "headers",
      +              "max_size_bytes"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "meta": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "request_id": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": true
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "data"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "doc_url": {
      +            "type": "string"
      +          },
      +          "errors": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "code": {
      +                  "type": "string"
      +                },
      +                "field": {
      +                  "type": "string"
      +                },
      +                "message": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "field",
      +                "code",
      +                "message"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "param": {
      +            "type": "string"
      +          },
      +          "retryable": {
      +            "type": "boolean"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "meta": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "request_id": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": false
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare this is a non-destructive, non-idempotent, open-world write. The description adds genuinely new behavioral facts: the signed PUT URL is short-lived and must be used promptly, inline content is capped at 32 KiB decoded, and the artifact returned is a blob_id to be passed to the send call. It does not say what happens if the URL expires or whether abandoned uploads are retained, but it materially exceeds the annotation content.

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?

Three sentences, each doing work: the trigger condition first, then the primary path, then the fallback path with its limit. No preamble, no restatement of the title, and the recommended mode is front-loaded ahead of the discouraged one.

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 two-mode upload tool with six parameters, an output schema covering the blob_id/URL, and full schema coverage, the description supplies the essential end-to-end flow. Remaining gaps (URL expiry behavior, mailbox_id selection, cleanup of orphaned uploads) are secondary and partly mitigated by the output schema.

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 filename, size_bytes, content_type, content_base64 and presign_upload_url are already documented in the schema, including the 32 KiB cap and the size_bytes dependency. The description largely restates those relationships; its only genuine addition is the operational step of PUTting the bytes to the returned URL. Baseline 3 fits.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description establishes the operation as a preparation step for sending an attachment and speaks of a 'returned blob_id', so the upload-and-register semantics come through clearly. It does not, however, distinguish itself from the many near-identical siblings (qubrics_mailbox_upload_attachment, sending_upload_attachment, qubrics_sending_create_attachment_upload), leaving an agent to guess which duplicate to call.

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?

It gives a clear when-to-use anchor ('before sending a mailbox attachment') and explicitly routes between two modes: presigned URL for real files, inline base64 as a 'last resort for tiny agent-authored files only'. It states no exclusions relative to sibling tools, and gives no guidance on when mailbox_id is needed, which is the one missing usage axis.

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