Skip to main content
Glama
Sendmux Email Inbox API + Sending

Sendmux Email Inbox API + Sending

Official
by qubrics

Wait For Message

mailbox_wait_for_message
Read-onlyIdempotent

Wait briefly for new email instead of polling manually; returns a matching message with attachment metadata when found or a clean no_message result so you can call again.

Instructions

Use this to wait briefly for new mail instead of manual polling. It polls for up to 25 seconds, returns a matching message with attachment metadata when found, or a clean no_message result so you can call again.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mailbox_wait_for_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoOptional full-text query to match.
afterNoISO 8601 lower bound for received_at. Omit to wait for messages received after this call starts.
keywordNoOptional keyword/label that the message must have, such as $seen.
subjectNoOptional subject text filter.
folder_idNoOptional folder ID filter.
from_emailNoOptional sender email address or display-name filter.
mailbox_idNoMailbox public ID when the credential can access more than one mailbox.
has_attachmentNoWhen true, wait only for messages with attachments.
timeout_secondsNoMaximum seconds to wait. Capped at 25 seconds so MCP clients do not hold a tool call open indefinitely.

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": {
      -          "matched": {
      -            "type": "boolean"
      -          },
      -          "message": {
      -            "oneOf": [
      -              {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "attachments": {
      -                    "items": {
      -                      "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"
      -                    },
      -                    "type": "array"
      -                  },
      -                  "id": {
      -                    "type": "string"
      -                  },
      -                  "received_at": {
      -                    "type": [
      -                      "string",
      -                      "null"
      -                    ]
      -                  }
      -                },
      -                "required": [
      -                  "id",
      -                  "received_at",
      -                  "attachments"
      -                ],
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "next_after": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "matched",
      -          "message",
      -          "next_after"
      -        ],
      -        "type": "object"
      -      },
      -      "meta": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "request_id": {
      -            "type": "string"
      -          },
      -          "sync_state": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "request_id"
      -        ],
      -        "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"
      -          },
      -          "sync_state": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "request_id"
      -        ],
      -        "type": "object"
      -      },
      -      "ok": {
      -        "const": false
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "matched": {
      +            "type": "boolean"
      +          },
      +          "message": {
      +            "oneOf": [
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "attachments": {
      +                    "items": {
      +                      "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"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "id": {
      +                    "type": "string"
      +                  },
      +                  "received_at": {
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "received_at",
      +                  "attachments"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "next_after": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "matched",
      +          "message",
      +          "next_after"
      +        ],
      +        "type": "object"
      +      },
      +      "meta": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "request_id": {
      +            "type": "string"
      +          },
      +          "sync_state": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "request_id"
      +        ],
      +        "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"
      +          },
      +          "sync_state": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "request_id"
      +        ],
      +        "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": {
      +          "matched": {
      +            "type": "boolean"
      +          },
      +          "message": {
      +            "oneOf": [
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "attachments": {
      +                    "items": {
      +                      "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"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "id": {
      +                    "type": "string"
      +                  },
      +                  "received_at": {
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "received_at",
      +                  "attachments"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "next_after": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "matched",
      +          "message",
      +          "next_after"
      +        ],
      +        "type": "object"
      +      },
      +      "meta": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "request_id": {
      +            "type": "string"
      +          },
      +          "sync_state": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "request_id"
      +        ],
      +        "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"
      +          },
      +          "sync_state": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "request_id"
      +        ],
      +        "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 already declare readOnly, non-destructive, idempotent, open-world behavior, so the safety bar is low; the description adds genuine context beyond them: a bounded 25-second poll window and the existence of a distinct no_message outcome versus a matched message. It does not say whether the returned message is consumed or merely observed, which matters for repeated calls.

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 filler: the wait duration and return contract come first, then the no_message loop behavior. Nothing could be removed without losing an operative detail.

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?

An output schema exists, so return shape needn't be spelled out, and the description still sketches it usefully; all 9 filters are optional and fully documented in schema. The only gap is the lifecycle question — whether a matched message is consumed or remains visible to subsequent list calls.

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% across all 9 parameters, so the schema already documents every filter, the timeout cap, and the after-bound default. The description's only parameter-adjacent detail ('up to 25 seconds') merely restates the schema's maximum, adding no new semantics.

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?

States a specific verb and resource ('wait briefly for new mail') and describes what comes back ('a matching message with attachment metadata' or 'a clean no_message result'). It distinguishes itself from the generic polling pattern but never names the sibling read tools (mailbox_list_messages, mailbox_get_message) an agent might otherwise pick, so sibling differentiation is only implicit.

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?

Explicitly frames the use case as an alternative to 'manual polling' and gives actionable follow-up guidance ('call again' after a no_message result), which is real when-to-use direction. It stops short of stating when NOT to use it — e.g. that it is not for reading already-received mail, where list/get tools apply.

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