Skip to main content
Glama
Sendmux Email Inbox API + Sending

Sendmux Email Inbox API + Sending

Official
by qubrics

Get Attachment Metadata

mailbox_get_attachment
Read-onlyIdempotent

Returns metadata and a fresh short-lived download URL for a specific email attachment, so agents can fetch the file promptly and re-request access if the link expires.

Instructions

Use this after finding a message attachment. It returns metadata plus a fresh short-lived download_url for that exact attachment; fetch the URL promptly, and call this tool again if it expires.

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": {
      "message_id": "<message_id>",
      "attachment_id": "<attachment_id>"
    },
    "name": "mailbox_get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
mailbox_idNoMailbox public ID when the credential can access more than one mailbox.
message_idYesMessage ID containing the attachment.
attachment_idYesAttachment ID from message metadata.

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": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "content_id": {
      -            "description": "Content ID for inline attachments, when present.",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "content_type": {
      -            "example": "application/pdf",
      -            "type": "string"
      -          },
      -          "disposition": {
      -            "example": "attachment",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "download_url": {
      -            "description": "Short-lived URL for this exact attachment. Fetch it promptly; if it expires, call the message or attachment metadata endpoint again to receive a fresh URL.",
      -            "example": "https://app.sendmux.ai/api/v1/mailbox/messages/msg_123/attachment-downloads/attref_abc123?download_token=...",
      -            "type": "string"
      -          },
      -          "filename": {
      -            "example": "invoice.pdf",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "id": {
      -            "description": "Attachment blob ID.",
      -            "type": "string"
      -          },
      -          "size_bytes": {
      -            "example": 12345,
      -            "type": [
      -              "integer",
      -              "null"
      -            ]
      -          }
      -        },
      -        "required": [
      -          "id",
      -          "filename",
      -          "content_type",
      -          "size_bytes",
      -          "disposition",
      -          "content_id"
      -        ],
      -        "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": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "content_id": {
      +            "description": "Content ID for inline attachments, when present.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "content_type": {
      +            "example": "application/pdf",
      +            "type": "string"
      +          },
      +          "disposition": {
      +            "example": "attachment",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "download_url": {
      +            "description": "Short-lived URL for this exact attachment. Fetch it promptly; if it expires, call the message or attachment metadata endpoint again to receive a fresh URL.",
      +            "example": "https://app.qubrics.com/api/v1/mailbox/messages/msg_123/attachment-downloads/attref_abc123?download_token=...",
      +            "type": "string"
      +          },
      +          "filename": {
      +            "example": "invoice.pdf",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "id": {
      +            "description": "Attachment blob ID.",
      +            "type": "string"
      +          },
      +          "size_bytes": {
      +            "example": 12345,
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "filename",
      +          "content_type",
      +          "size_bytes",
      +          "disposition",
      +          "content_id"
      +        ],
      +        "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. Changed3 schema fields changedv1.0.8
    • 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": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "content_id": {
      +            "description": "Content ID for inline attachments, when present.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "content_type": {
      +            "example": "application/pdf",
      +            "type": "string"
      +          },
      +          "disposition": {
      +            "example": "attachment",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "download_url": {
      +            "description": "Short-lived URL for this exact attachment. Fetch it promptly; if it expires, call the message or attachment metadata endpoint again to receive a fresh URL.",
      +            "example": "https://app.sendmux.ai/api/v1/mailbox/messages/msg_123/attachment-downloads/attref_abc123?download_token=...",
      +            "type": "string"
      +          },
      +          "filename": {
      +            "example": "invoice.pdf",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "id": {
      +            "description": "Attachment blob ID.",
      +            "type": "string"
      +          },
      +          "size_bytes": {
      +            "example": 12345,
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "filename",
      +          "content_type",
      +          "size_bytes",
      +          "disposition",
      +          "content_id"
      +        ],
      +        "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

A3.8/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive behavior, so the description clears the lower bar and still adds real context: the returned download_url is short-lived and must be fetched promptly, and expiration is handled by re-calling rather than by retrying the URL. That is exactly the operational detail an agent cannot get from the hint flags.

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, zero filler, with the prerequisite stated first and the expiration caveat second. Every clause carries actionable information.

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 three-parameter read tool with an output schema and full annotation coverage, this tells an agent what it gets back and how to handle URL expiry, which is the main failure mode. Only the choice between this tool and the read/text siblings is left unaddressed.

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 coverage is 100%, so the schema already documents all three parameters, and the description adds only the idea that message_id plus attachment_id pin down 'that exact attachment'. It says nothing about when mailbox_id is required, but with full schema documentation a baseline 3 is appropriate.

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 states a specific verb and resource ('returns metadata plus a fresh short-lived download_url for that exact attachment'), which implicitly separates it from content-fetching siblings like mailbox_read_attachment or mailbox_get_attachment_text. It never names those siblings, so the differentiation is inferable rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a sequencing prerequisite ('use this after finding a message attachment') and a re-invocation rule ('call this tool again if it expires'), which is useful. However, it never states when to prefer this over mailbox_read_attachment or mailbox_get_attachment_text, leaving that routing decision to inference.

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