Connections
Which mailbox the other tools act on.
Connections tools
| Tool | What it does |
|---|---|
| getConnections | Every mailbox connection on the account. Returned a page at a time. |
| getActiveConnection | The connection requests currently run against. |
| setActiveConnection | Switch the active connection by its slug or workspace name. |
The active connection is server-side state rather than an argument, so a client that switches mailboxes changes the target of every later call in that session. Prefer setting it explicitly at the start of a conversation over assuming it.
Reference
getConnections
Use this tool to get all connections for the user. This helps you know what accounts(connections) the user has available. Each one reports the name and slug that setActiveConnection also accepts. None has a default sending address, so every send has to name the address it goes out as. An app connected over OAuth sees only the one workspace it was approved for. One page at a time: when more follow, the last line gives a cursor to pass back for the next page.
Inputs
limitinteger- At least 1At most 100
cursorstring
getActiveConnection
Get the currently active email connection: its name and its slug. It has no default sending address, so sendEmail and sendWithTemplate always have to be told which address to send as; listWorkspaceMembers names the addresses and whole domains you reach.
Inputs
Takes no input.
setActiveConnection
Set the active email connection by its slug or its workspace name, whichever you have; getConnections lists both for every workspace. Only a mailbox you own can be chosen. An app connected over OAuth is held to the one workspace it was approved for, so it cannot switch to any other. Over the Streamable HTTP endpoint every request opens a fresh session on that approved workspace, so there the switch covers nothing after this call. It lasts for the whole connection only over SSE.
Inputs
emailstringRequired