Zum Inhalt
Für Agenten

email_account_list

List Email Accounts

Markdown Tools als JSON

Beschreibung

Lists all Gmail accounts the caller has connected in this oona account, with each account's user-defined labels and current unread-thread count. Use this first to discover account IDs (mail_…) and label IDs (elbl_…) before calling other email tools.

System labels are not returned per-account but can be used directly with their well-known IDs: INBOX, TRASH, SPAM, STARRED, UNREAD, IMPORTANT, CHAT, DRAFT, SENT.

Account-scoped: the same Gmail address connected in another account is a different mail_… ID and is invisible from here.

Zugriff

Zugriffsprofil: gated. Module: email. Die Freigabe im Profil ersetzt keine Account-, Workspace- oder Rollenberechtigung.

Parameter

Name Typ Pflicht Beschreibung
account_id string Ja Account prefix ID (acct_…).

Eingabeschema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "account_id": {
      "type": "string",
      "description": "Account prefix ID (acct_…)."
    }
  },
  "required": [
    "account_id"
  ],
  "type": "object"
}

Ausgabeschema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "accounts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Email-account prefix ID (mail_…)."
          },
          "email_address": {
            "type": "string"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "connecting",
              "active",
              "error",
              "paused",
              "disconnected"
            ]
          },
          "can_organize": {
            "type": "boolean"
          },
          "can_send": {
            "type": "boolean"
          },
          "send_confirmation_required": {
            "type": "boolean"
          },
          "color_hex": {
            "type": [
              "string",
              "null"
            ]
          },
          "unread_count": {
            "type": "integer",
            "description": "Threads with at least one unread message."
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Label prefix ID (elbl_…)."
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "user",
                    "system"
                  ]
                },
                "color_hex": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "kind"
              ]
            }
          }
        },
        "required": [
          "id",
          "email_address",
          "status",
          "unread_count",
          "labels"
        ]
      }
    }
  },
  "required": [
    "accounts"
  ],
  "type": "object"
}
Seiten