跳到正文
所有工具

teams_search_messages

Microsoft Teams · macOS · Windows

效果: 读取. 状态: 受限可用.

“受限可用”表示工具可能取决于版本、平台、权限、账户或配置,并不表示它在所有安装中都已启用。

macOS

用途

使用 Microsoft Search 搜索某个 Microsoft 365 账户的 Microsoft Teams 聊天和频道消息:按文本搜索,也可选择按发件人和日期范围搜索。无需知道是哪个聊天,即可用它找出某件事是在哪里讨论的。结果按 Microsoft 的相关性排序(不是最新优先),body 是匹配处周围的片段,而不是整条消息;其余内容请用 teams_read_chat_messages 读取该聊天。最多返回 100 条结果,来自搜索的最多 4 页。当读取被截断(因触及该上限,或因调用超时)时,回答中带有 truncated: true。需要使用 connect_m365_account 连接的工作或学校 Microsoft 365 账户(个人 Microsoft 账户无法读取 Teams)。如果完全没有连接任何 Microsoft 365 账户,它会改为读取这台 Mac 上 Teams 应用的本地缓存(需要 “完全磁盘访问权限”,可能滞后数小时或数天);回答中的 source 会说明是由哪一个来源作答(graph 或 local_cache)。

必填输入

此平台的架构未声明必填输入,但仍可能存在可选选择器或运行时要求。

权限与确认

架构未声明明确的确认参数。这并不代表可以未经许可操作;请检查效果并取得授权。

英文规范技术架构 — macOS
{
  "properties": {
    "account": {
      "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      "type": "string"
    },
    "from_sender": {
      "description": "Only messages from this sender (name or email; optional)",
      "type": "string"
    },
    "limit": {
      "description": "Max results (default 25, max 100)",
      "type": "integer"
    },
    "query": {
      "description": "Text to search for",
      "type": "string"
    },
    "since": {
      "description": "Only messages on/after this date, YYYY-MM-DD (optional)",
      "type": "string"
    },
    "until": {
      "description": "Only messages on/before this date, YYYY-MM-DD (optional)",
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}

文档示例

teams_search_messages 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "limit": 5,
  "query": "launch checklist"
}

Windows

用途

按文本、发件人姓名和/或日期范围搜索你的 Microsoft Teams 聊天和私信历史记录(一次涵盖所有会话)。无需知道是哪个聊天,即可用它找出某件事在 Teams 中是在哪里讨论的。返回匹配的消息(最相关的在前),每条都带有片段及其所属聊天。最多返回 100 条结果,来自搜索的最多 4 页。当读取被截断(因触及该上限,或因调用超时)时,回答中带有 truncated: true。

必填输入

此平台的架构未声明必填输入,但仍可能存在可选选择器或运行时要求。

权限与确认

架构未声明明确的确认参数。这并不代表可以未经许可操作;请检查效果并取得授权。

英文规范技术架构 — Windows
{
  "properties": {
    "account": {
      "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      "type": "string"
    },
    "from_sender": {
      "description": "Filter to a sender by name (optional)",
      "type": "string"
    },
    "limit": {
      "description": "Max results (default 25, max 100)",
      "type": "integer"
    },
    "query": {
      "description": "Text to find in messages",
      "type": "string"
    },
    "since": {
      "description": "Only messages on/after this date, YYYY-MM-DD (optional)",
      "type": "string"
    },
    "until": {
      "description": "Only messages on/before this date, YYYY-MM-DD (optional)",
      "type": "string"
    }
  },
  "type": "object"
}

文档示例

teams_search_messages 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "limit": 5,
  "query": "launch checklist"
}