跳到正文
所有工具

teams_read_channel_messages

Microsoft Teams · macOS · Windows

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

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

macOS

用途

从 Microsoft 365 读取某个 Microsoft Teams 频道最近的帖子(team_id 来自 teams_list_teams,channel_id 来自 teams_list_channels),按时间从旧到新排列。仅包含顶层帖子:不包含回复。读取频道消息需要由 Microsoft 365 组织管理员批准的权限;没有该权限时,回答为 consent_required,并说明该怎么做。最多读取 20 页,每页 50 条帖子,包含已删除的帖子。当读取被截断(因触及该上限,或因调用超时)时,回答中带有 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"
    },
    "channel_id": {
      "description": "Channel ID from teams_list_channels",
      "type": "string"
    },
    "limit": {
      "description": "Max items to return (default 50)",
      "type": "integer"
    },
    "team_id": {
      "description": "Team ID from teams_list_teams",
      "type": "string"
    }
  },
  "required": [
    "team_id",
    "channel_id"
  ],
  "type": "object"
}

文档示例

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

{
  "channel_id": "demo-channel-001",
  "team_id": "demo-team-001"
}

Windows

用途

读取指定 Teams 频道中的消息(仅顶层帖子;不包含回复)。最多读取 20 页,每页 50 条帖子,包含已删除的帖子。当读取被截断(因触及该上限,或因调用超时)时,回答中带有 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"
    },
    "channel_id": {
      "description": "Channel ID from teams_list_channels (within that team)",
      "type": "string"
    },
    "limit": {
      "description": "Maximum messages (default: 50)",
      "type": "number"
    },
    "team_id": {
      "description": "Team ID from teams_list_teams",
      "type": "string"
    }
  },
  "required": [
    "team_id",
    "channel_id"
  ],
  "type": "object"
}

文档示例

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

{
  "channel_id": "demo-channel-001",
  "team_id": "demo-team-001"
}