跳到正文
所有工具

telegram_send_message

Telegram · macOS · Windows

效果: 发送. 状态: 受限可用.

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

macOS

用途

从你自己的账户向一个聊天发送 Telegram 消息。带预览的写入操作:首次调用(confirm=false)返回预览,不发送任何内容;请向用户展示,并仅在他们批准后才使用 confirm=true 再次调用。预览中的收件人名称来自 Telegram 本身(chat_name 是 Telegram 对 chat_id 的名称;当该 id 不在账户最近的聊天中,或在 My apps 的对应行中已关闭读取该账户时,为 chat_name_unresolved),绝不来自调用者传入的内容。chat_id 必须来自 telegram_list_chats——绝不要自行编造。每次调用一条消息;不支持批量发送。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — macOS
{
  "properties": {
    "account": {
      "description": "Which linked Telegram account to use: its label or id from telegram_list_accounts. Leave it out to use the default account.",
      "type": "string"
    },
    "chat_id": {
      "description": "Chat id from telegram_list_chats.",
      "type": "string"
    },
    "chat_name": {
      "description": "Optional: the name you expect for chat_id. It is never shown as the recipient — the preview shows Telegram's own name for chat_id and sets chat_name_mismatch when yours differs.",
      "type": "string"
    },
    "confirm": {
      "description": "Must be true to actually send. Without it, returns a preview.",
      "type": "boolean"
    },
    "message": {
      "description": "Text to send (max 4096 characters).",
      "type": "string"
    },
    "remember": {
      "description": "With confirm: true, also stop asking for this kind of action from now on. Only when the person said so (\"don't ask again\"). The person can revoke it in LMCP or with set_always_allowed.",
      "type": "boolean"
    },
    "reply_to_message_id": {
      "description": "Optional: the id of a message in this chat (from telegram_read_messages) that this message replies to. To acknowledge a message for telegram_delete_message, reply to it with the text ACK.",
      "type": "integer"
    }
  },
  "required": [
    "chat_id",
    "message"
  ],
  "type": "object"
}

文档示例

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

{
  "chat_id": "5550100123",
  "confirm": false,
  "message": "Can we review the launch checklist on Tuesday?"
}

Windows

用途

从你自己的账户向一个聊天发送 Telegram 消息。这是一项写入操作,带预览:首次调用(confirm=false)只返回预览,不会发送任何内容;请将预览展示给用户,仅在用户同意后才使用 confirm=true 再次调用。chat_id 必须来自 telegram_list_chats,绝不能编造。每次调用只发送一条消息,不支持批量发送。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — Windows
{
  "properties": {
    "account": {
      "description": "Which linked Telegram account to use: its label or id from telegram_list_accounts. Leave it out to use the default account.",
      "type": "string"
    },
    "chat_id": {
      "description": "Chat id from telegram_list_chats.",
      "type": "string"
    },
    "chat_name": {
      "description": "Optional: the name you expect that chat to have. The preview shows the name Telegram gives for chat_id, never this one, and says when they differ.",
      "type": "string"
    },
    "confirm": {
      "description": "Must be true to actually send. Without it, returns a preview.",
      "type": "boolean"
    },
    "message": {
      "description": "Text to send (max 4096 characters).",
      "type": "string"
    },
    "remember": {
      "description": "With confirm=true, and only after the person said so: do this kind of action without asking from now on («don't ask me again»). The preview names the family.",
      "type": "boolean"
    },
    "reply_to_message_id": {
      "description": "Optional: the id of a message in this chat (from telegram_read_messages) that this message replies to. To acknowledge a message for telegram_delete_message, reply to it with the text ACK.",
      "type": "integer"
    }
  },
  "required": [
    "chat_id",
    "message"
  ],
  "type": "object"
}

文档示例

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

{
  "chat_id": "5550100123",
  "confirm": false,
  "message": "Can we review the launch checklist on Tuesday?"
}