|
@@ -27,71 +27,159 @@ class McpRpc extends API {
|
|
|
"tools": [
|
|
"tools": [
|
|
|
{
|
|
{
|
|
|
"name": "bind_account",
|
|
"name": "bind_account",
|
|
|
- "description": "绑定账号",
|
|
|
|
|
|
|
+ "description": "Bind a user account when the user provides a bind code",
|
|
|
"inputSchema": {
|
|
"inputSchema": {
|
|
|
"type": "object",
|
|
"type": "object",
|
|
|
"properties": {
|
|
"properties": {
|
|
|
- "sender": { "type": "string" },
|
|
|
|
|
- "bind_code": { "type": "string" }
|
|
|
|
|
|
|
+ "sender": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "description": "Unique user identifier from the chat platform"
|
|
|
|
|
+ },
|
|
|
|
|
+ "bind_code": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "description": "Binding code provided by the user"
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
"required": ["sender", "bind_code"]
|
|
"required": ["sender", "bind_code"]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- "name": "get_account_info",
|
|
|
|
|
- "description": "获取账号信息,包含姓名学号、帐号状态、乐跑时间次数等",
|
|
|
|
|
|
|
+ "name": "unbind_account",
|
|
|
|
|
+ "description": "Unbind the currently linked user account",
|
|
|
"inputSchema": {
|
|
"inputSchema": {
|
|
|
"type": "object",
|
|
"type": "object",
|
|
|
- "properties": { "sender": { "type": "string" } },
|
|
|
|
|
|
|
+ "properties": {
|
|
|
|
|
+ "sender": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "description": "Unique user identifier from the chat platform"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
"required": ["sender"]
|
|
"required": ["sender"]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- "name": "unbind_account",
|
|
|
|
|
- "description": "解绑账号",
|
|
|
|
|
|
|
+ "name": "get_account_info",
|
|
|
|
|
+ "description": "Retrieve user account information such as name, student ID, account status, and running statistics",
|
|
|
"inputSchema": {
|
|
"inputSchema": {
|
|
|
"type": "object",
|
|
"type": "object",
|
|
|
- "properties": { "sender": { "type": "string" } },
|
|
|
|
|
|
|
+ "properties": {
|
|
|
|
|
+ "sender": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "description": "Unique user identifier from the chat platform"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
"required": ["sender"]
|
|
"required": ["sender"]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
"name": "set_notification",
|
|
"name": "set_notification",
|
|
|
- "description": "消息通知设置,mode参数为:bot:智能机器人通知、email:邮件通知、none:关闭通知",
|
|
|
|
|
|
|
+ "description": "Set notification preference when the user wants to enable or disable notifications",
|
|
|
"inputSchema": {
|
|
"inputSchema": {
|
|
|
"type": "object",
|
|
"type": "object",
|
|
|
"properties": {
|
|
"properties": {
|
|
|
- "sender": { "type": "string" },
|
|
|
|
|
- "mode": { "type": "string" }
|
|
|
|
|
|
|
+ "sender": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "description": "Unique user identifier from the chat platform"
|
|
|
|
|
+ },
|
|
|
|
|
+ "mode": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "enum": ["bot", "email", "none"],
|
|
|
|
|
+ "description": "Notification mode: bot (chat bot), email (email notification), none (disable notifications)"
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
"required": ["sender", "mode"]
|
|
"required": ["sender", "mode"]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
"name": "change_email",
|
|
"name": "change_email",
|
|
|
- "description": "更换通知邮箱,需传入合法邮箱地址:email",
|
|
|
|
|
|
|
+ "description": "Update the user's notification email address",
|
|
|
"inputSchema": {
|
|
"inputSchema": {
|
|
|
"type": "object",
|
|
"type": "object",
|
|
|
"properties": {
|
|
"properties": {
|
|
|
- "sender": { "type": "string" },
|
|
|
|
|
- "email": { "type": "string" }
|
|
|
|
|
|
|
+ "sender": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "description": "Unique user identifier from the chat platform"
|
|
|
|
|
+ },
|
|
|
|
|
+ "email": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "format": "email",
|
|
|
|
|
+ "description": "New email address for notifications"
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
"required": ["sender", "email"]
|
|
"required": ["sender", "email"]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
"name": "create_work_order",
|
|
"name": "create_work_order",
|
|
|
- "description": "创建客服工单,遇到问题或建议可创建并等待人工处理,参数email为联系方式,工单标题title不超过20字,内容content不超过100字,标题和内容最好由你总结生成,且包含用户账号的基本信息",
|
|
|
|
|
|
|
+ "description": "Create a customer support ticket when the user reports a problem or suggestion",
|
|
|
"inputSchema": {
|
|
"inputSchema": {
|
|
|
"type": "object",
|
|
"type": "object",
|
|
|
"properties": {
|
|
"properties": {
|
|
|
- "sender": { "type": "string" },
|
|
|
|
|
- "email": { "type": "string" },
|
|
|
|
|
- "title": { "type": "string" },
|
|
|
|
|
- "content": { "type": "string" }
|
|
|
|
|
|
|
+ "sender": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "description": "Unique user identifier from the chat platform"
|
|
|
|
|
+ },
|
|
|
|
|
+ "email": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "format": "email",
|
|
|
|
|
+ "description": "User contact email"
|
|
|
|
|
+ },
|
|
|
|
|
+ "title": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "maxLength": 20,
|
|
|
|
|
+ "description": "Short title of the issue (max 20 characters)"
|
|
|
|
|
+ },
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "maxLength": 100,
|
|
|
|
|
+ "description": "Detailed description of the issue (max 100 characters)"
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
"required": ["sender", "email", "title", "content"]
|
|
"required": ["sender", "email", "title", "content"]
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "name": "change_auto_time",
|
|
|
|
|
+ "description": "Set the automatic running start hour when the user wants to schedule running time",
|
|
|
|
|
+ "inputSchema": {
|
|
|
|
|
+ "type": "object",
|
|
|
|
|
+ "properties": {
|
|
|
|
|
+ "sender": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "description": "Unique user identifier from the chat platform"
|
|
|
|
|
+ },
|
|
|
|
|
+ "auto_time": {
|
|
|
|
|
+ "type": "integer",
|
|
|
|
|
+ "minimum": 7,
|
|
|
|
|
+ "maximum": 23,
|
|
|
|
|
+ "description": "Hour of day to start running (7-23)"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "required": ["sender", "auto_time"]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "name": "change_auto_day",
|
|
|
|
|
+ "description": "Set the days of the week for automatic running",
|
|
|
|
|
+ "inputSchema": {
|
|
|
|
|
+ "type": "object",
|
|
|
|
|
+ "properties": {
|
|
|
|
|
+ "sender": {
|
|
|
|
|
+ "type": "string",
|
|
|
|
|
+ "description": "Unique user identifier from the chat platform"
|
|
|
|
|
+ },
|
|
|
|
|
+ "auto_day": {
|
|
|
|
|
+ "type": "array",
|
|
|
|
|
+ "items": {
|
|
|
|
|
+ "type": "integer",
|
|
|
|
|
+ "minimum": 0,
|
|
|
|
|
+ "maximum": 6
|
|
|
|
|
+ },
|
|
|
|
|
+ "description": "Days of week to run (0=Sunday, 6=Saturday)"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "required": ["sender", "auto_day"]
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
@@ -119,6 +207,12 @@ class McpRpc extends API {
|
|
|
case "create_work_order":
|
|
case "create_work_order":
|
|
|
output = await MCP.create_work_order(args)
|
|
output = await MCP.create_work_order(args)
|
|
|
break
|
|
break
|
|
|
|
|
+ case "change_auto_time":
|
|
|
|
|
+ output = await MCP.change_auto_time(args)
|
|
|
|
|
+ break
|
|
|
|
|
+ case "change_auto_day":
|
|
|
|
|
+ output = await MCP.change_auto_day(args)
|
|
|
|
|
+ break
|
|
|
default:
|
|
default:
|
|
|
output = "未知工具"
|
|
output = "未知工具"
|
|
|
}
|
|
}
|