telegram_notify
Send structured notifications to Telegram with event types including completed, error, question, and progress. Provide concise summaries and optional details for remote task monitoring and decision-making.
Instructions
发送结构化通知到 Telegram
参数:
- event: 事件类型(completed/error/question/progress)
- summary: 简短总结,必填,限制200字以内
- details: 详细信息,可选
最佳实践:
1. summary 必须简洁明了(1-2句话),说明做了什么、结果如何
2. 不要包含思考过程、不要包含代码片段
3. 需要用户决策时,清晰说明选项
示例:
telegram_notify(
event="completed",
summary="修复了 auth.py:45 的空指针异常,所有测试通过",
details="修改文件: auth.py, test_auth.py\n测试: 12/12 passed"
)
telegram_notify(
event="question",
summary="发现3种修复方案:1)添加空值检查 2)使用Optional类型 3)重构整个模块。推荐方案1,是否继续?"
)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
details | No | 详细信息(可选) | |
event | Yes | 事件类型 | |
summary | Yes | 简短总结(必填,200字以内) |
Input Schema (JSON Schema)
{
"properties": {
"details": {
"description": "详细信息(可选)",
"type": "string"
},
"event": {
"description": "事件类型",
"enum": [
"completed",
"error",
"question",
"progress"
],
"type": "string"
},
"summary": {
"description": "简短总结(必填,200字以内)",
"maxLength": 200,
"type": "string"
}
},
"required": [
"event",
"summary"
],
"type": "object"
}