본문으로 건너뛰기
모든 도구

search_emails

이메일 · macOS

효과: 읽기. 상태: 조건부 제공.

‘조건부 제공’은 도구가 버전, 플랫폼, 권한, 계정 또는 설정에 따라 달라질 수 있음을 뜻하며 모든 설치에서 활성화되었다는 의미는 아닙니다.

macOS

목적

사용자가 이 Mac(Apple Mail, Mail.app에 추가된 모든 계정)에서 특정 이메일을 찾으려고 할 때 사용합니다. 기본적으로 제목과 보낸 사람을 검색하며, 본문도 검색하려면 scope="body" 또는 scope="all"을 전달하세요(응답의 search_coverage를 참조하세요. 로컬 색인을 구축하는 동안에는 본문 검색이 일부만 될 수 있습니다). 휴지통과 정크 폴더는 include_trash=true이거나 mailbox가 해당 폴더를 지정하지 않는 한 제외됩니다. Mail.app에 추가되지 않은 Microsoft 365 사서함에는 m365_search_emails를 사용하세요. 중요: 계정이 2개 이상인 컴퓨터에서는 account=<name>(list_email_accounts에서 가져옴)을 전달하여 호출하세요. 전달하지 않고 빠른 색인으로 답할 수 없으면 search_emails는 모든 계정을 스캔하지 않고 계정 목록을 반환합니다. 한 번의 호출로 모든 계정을 스캔하면 시간 제한이 없고 다른 요청에 대해서도 Mail이 차단될 수 있기 때문입니다. 계정이 정확히 1개이면 영향이 없습니다.

필수 입력

입력 이름은 도구가 요구하는 정확한 형태로 유지됩니다. 영문 정식 기술 정의는 아래 펼칠 수 있는 스키마에 있습니다.

권한 및 확인

스키마에 명시적 확인 매개변수가 없습니다. 이는 무단 작업을 허용하지 않습니다. 효과를 검토하고 승인을 받으세요.

영문 정식 기술 스키마 — macOS
{
  "properties": {
    "account": {
      "description": "Mail.app account to search (from list_email_accounts). On a Mac with 2+ accounts this is effectively required: without it, and when the fast index cannot answer, the tool returns the account list instead of scanning them all.",
      "type": "string"
    },
    "include_trash": {
      "default": "false",
      "description": "Also return matches from trash and junk folders. Default false: a search of every folder leaves them out. Not needed when mailbox names the folder.",
      "type": "boolean"
    },
    "limit": {
      "default": "20",
      "description": "Maximum number of matches to return.",
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    },
    "mailbox": {
      "description": "Restrict the search to one folder, by name (see list_email_folders). Defaults to every folder of the account.",
      "type": "string"
    },
    "query": {
      "description": "What to look for. Matched against subject and sender, or also the body when scope is \"body\" or \"all\".",
      "type": "string"
    },
    "recipient": {
      "description": "Only messages sent to this address or name (To or Cc), e.g. one of the user's own aliases. Narrows the matches of query.",
      "type": "string"
    },
    "scope": {
      "default": "metadata",
      "description": "\"metadata\" (default, subject+sender — fast, unchanged behavior), \"body\" (message body only, via a local index — see search_coverage in the response), or \"all\" (subject+sender+body).",
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}

문서 예시

search_emails 문서 예시입니다. 이 예시를 실행하지 마세요. 표시된 인수는 가상 데이터 세트에 속합니다. 실제 호출 전에 실제 식별자를 확인하고 승인을 받으세요.

{
  "query": "launch checklist"
}