Permissions

send

A message leaves for someone else, under the account's own address. Asked every single time, in every mode, with no « always » — because nothing brings it back.

asked in full toono alwaysone of three
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

askautoplanfull
askedaskedrefusedasked

The tool

send_mail, and only it. Reading mailboxes is read; changing a mailbox's settings is storage. Sending is its own thing.

Why no mode opens it

A sent message is sent

There is no draft to recall, no version to restore and no checkpoint that reaches a recipient's inbox. And it goes out under the customer's own address, so a mistake is theirs in the eyes of whoever receives it.

Returning always is accepted by the callback and treated as once. The next send is asked again.

Review the message, not the tool

onPermission: async ({ category, args }) => {
  if (category !== "send") return "once";

  console.log("To:", args.to);
  console.log("Subject:", args.subject);
  console.log(args.text);

  return await confirmWithTheUser();     // "once" | "deny"
}
def on_permission(request):
    if request["category"] != "send":
        return "once"
    args = request["args"]
    print("To:", args.get("to"))
    print("Subject:", args.get("subject"))
    print(args.get("body") or args.get("html"))
    return confirm_with_the_user()     # "once" | "deny"

The recipients, the subject and the body are all in args. This is the one category where showing the arguments to a person is the whole point of the prompt.

With no callback it cannot send at all

The refusal says so in those terms — « sending needs the user's approval and no one can approve it » — so an unattended run names the limit rather than failing obscurely.

The body is plain text

The tool sends text, escaped on the way out. Caller-supplied HTML is not accepted, which removes a whole class of mistake from something that goes out under the customer's name.