dingtalk-mcp 1.1.18 → 1.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
server:
|
|
2
|
+
name: dingtalk-ding-message
|
|
3
|
+
description: DING消息
|
|
4
|
+
default_active: true
|
|
5
|
+
securitySchemes:
|
|
6
|
+
- id: DingTalkAuth
|
|
7
|
+
type: apiKey
|
|
8
|
+
in: header
|
|
9
|
+
name: x-acs-dingtalk-access-token
|
|
10
|
+
tools:
|
|
11
|
+
- name: sendDINGMessageByRobot
|
|
12
|
+
description: >
|
|
13
|
+
使用机器人发送 DING 消息(高优先级提醒)。只有当用户明确提到“发 DING”、“DING 一下”、“钉一下””等关键词时,才调用此工具。
|
|
14
|
+
DING 消息通常带有强提醒,不同于普通消息。未明确要求时,请勿调用。
|
|
15
|
+
args:
|
|
16
|
+
- name: robotCode
|
|
17
|
+
description: 机器人Code
|
|
18
|
+
type: string
|
|
19
|
+
position: body
|
|
20
|
+
system: ROBOT_CODE
|
|
21
|
+
- name: remindType
|
|
22
|
+
type: string
|
|
23
|
+
description: DING消息类型。1:应用内DING,2:短信DING,3:电话DING;默认值为1。
|
|
24
|
+
position: body
|
|
25
|
+
required: true
|
|
26
|
+
- name: receiverUserIdList
|
|
27
|
+
description: 接收人userId列表。应用内DING消息,每次接收人不能超过200个。短信DING和电话DING,每次接收人不能超过20个。
|
|
28
|
+
type: array
|
|
29
|
+
required: true
|
|
30
|
+
position: body
|
|
31
|
+
items:
|
|
32
|
+
type: string
|
|
33
|
+
- name: content
|
|
34
|
+
description: DING消息内容。
|
|
35
|
+
type: string
|
|
36
|
+
required: true
|
|
37
|
+
position: body
|
|
38
|
+
requestTemplate:
|
|
39
|
+
url: https://api.dingtalk.com//v1.0/robot/ding/send
|
|
40
|
+
method: POST
|
|
41
|
+
headers:
|
|
42
|
+
- key: Content-Type
|
|
43
|
+
value: application/json
|
|
44
|
+
security:
|
|
45
|
+
id: DingTalkAuth
|
|
46
|
+
responseTemplate: {}
|
|
47
|
+
|
|
48
|
+
- name: recallDINGMessage
|
|
49
|
+
description: 撤回机器人发送的DING消息
|
|
50
|
+
args:
|
|
51
|
+
- name: robotCode
|
|
52
|
+
description: 机器人Code
|
|
53
|
+
type: string
|
|
54
|
+
position: body
|
|
55
|
+
system: ROBOT_CODE
|
|
56
|
+
- name: openDingId
|
|
57
|
+
type: string
|
|
58
|
+
description: 需要被撤回的DING消息ID。
|
|
59
|
+
position: body
|
|
60
|
+
required: true
|
|
61
|
+
requestTemplate:
|
|
62
|
+
url: https://api.dingtalk.com//v1.0/robot/ding/recall
|
|
63
|
+
method: POST
|
|
64
|
+
headers:
|
|
65
|
+
- key: Content-Type
|
|
66
|
+
value: application/json
|
|
67
|
+
security:
|
|
68
|
+
id: DingTalkAuth
|
|
69
|
+
responseTemplate: { }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
server:
|
|
2
2
|
name: dingtalk-robot-send-message
|
|
3
|
-
description:
|
|
3
|
+
description: 钉钉机器人发消息
|
|
4
4
|
default_active: true
|
|
5
5
|
securitySchemes:
|
|
6
6
|
- id: DingTalkAuth
|
|
@@ -8,66 +8,6 @@ server:
|
|
|
8
8
|
in: header
|
|
9
9
|
name: x-acs-dingtalk-access-token
|
|
10
10
|
tools:
|
|
11
|
-
- name: sendDINGMessageByRobot
|
|
12
|
-
description: >
|
|
13
|
-
使用机器人发送 DING 消息(高优先级提醒)。只有当用户明确提到“发 DING”、“DING 一下”、“钉一下””等关键词时,才调用此工具。
|
|
14
|
-
DING 消息通常带有强提醒,不同于普通消息。未明确要求时,请勿调用。
|
|
15
|
-
args:
|
|
16
|
-
- name: robotCode
|
|
17
|
-
description: 机器人Code
|
|
18
|
-
type: string
|
|
19
|
-
position: body
|
|
20
|
-
system: ROBOT_CODE
|
|
21
|
-
- name: remindType
|
|
22
|
-
type: string
|
|
23
|
-
description: DING消息类型。1:应用内DING,2:短信DING,3:电话DING;默认值为1。
|
|
24
|
-
position: body
|
|
25
|
-
required: true
|
|
26
|
-
- name: receiverUserIdList
|
|
27
|
-
description: 接收人userId列表。应用内DING消息,每次接收人不能超过200个。短信DING和电话DING,每次接收人不能超过20个。
|
|
28
|
-
type: array
|
|
29
|
-
required: true
|
|
30
|
-
position: body
|
|
31
|
-
items:
|
|
32
|
-
type: string
|
|
33
|
-
- name: content
|
|
34
|
-
description: DING消息内容。
|
|
35
|
-
type: string
|
|
36
|
-
required: true
|
|
37
|
-
position: body
|
|
38
|
-
requestTemplate:
|
|
39
|
-
url: https://api.dingtalk.com//v1.0/robot/ding/send
|
|
40
|
-
method: POST
|
|
41
|
-
headers:
|
|
42
|
-
- key: Content-Type
|
|
43
|
-
value: application/json
|
|
44
|
-
security:
|
|
45
|
-
id: DingTalkAuth
|
|
46
|
-
responseTemplate: {}
|
|
47
|
-
|
|
48
|
-
- name: recallDINGMessage
|
|
49
|
-
description: 撤回机器人发送的DING消息
|
|
50
|
-
args:
|
|
51
|
-
- name: robotCode
|
|
52
|
-
description: 机器人Code
|
|
53
|
-
type: string
|
|
54
|
-
position: body
|
|
55
|
-
system: ROBOT_CODE
|
|
56
|
-
- name: openDingId
|
|
57
|
-
type: string
|
|
58
|
-
description: 需要被撤回的DING消息ID。
|
|
59
|
-
position: body
|
|
60
|
-
required: true
|
|
61
|
-
requestTemplate:
|
|
62
|
-
url: https://api.dingtalk.com//v1.0/robot/ding/recall
|
|
63
|
-
method: POST
|
|
64
|
-
headers:
|
|
65
|
-
- key: Content-Type
|
|
66
|
-
value: application/json
|
|
67
|
-
security:
|
|
68
|
-
id: DingTalkAuth
|
|
69
|
-
responseTemplate: { }
|
|
70
|
-
|
|
71
11
|
- name: sendMessageToGroupByRobot
|
|
72
12
|
description: >
|
|
73
13
|
向群聊发送普通消息(非 DING、非待办)。
|
|
@@ -336,7 +336,7 @@ export class DingTalkMCPServer {
|
|
|
336
336
|
timeout: 30000
|
|
337
337
|
});
|
|
338
338
|
if (this.debug) {
|
|
339
|
-
console.
|
|
339
|
+
console.error(response)
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
return {
|
|
@@ -347,7 +347,7 @@ export class DingTalkMCPServer {
|
|
|
347
347
|
};
|
|
348
348
|
} catch (error) {
|
|
349
349
|
if (this.debug) {
|
|
350
|
-
console.
|
|
350
|
+
console.error(error)
|
|
351
351
|
}
|
|
352
352
|
let errorMessage = error.message;
|
|
353
353
|
if (axios.isAxiosError(error) && error.response) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
**条件查询配置**
|
|
2
2
|
---------------------------
|
|
3
|
-
| **字段类型** | **可用操作符** | **查询条件值**
|
|
4
|
-
|
|
5
|
-
| 文本 | equal \| notEqual \| contain \| notContain \| empty \| notEmpty | 示例:`["abc"]`<br/> operator 是 empty/notEmpty 时不需要传值。
|
|
6
|
-
| 数字 | equal \| notEqual \| greater \| greaterEqual \| less \| lessEqual \| empty \| notEmpty | 示例:`["123"]` <br/>operator 是 empty/notEmpty 时不需要传值。
|
|
7
|
-
| 单选 | equal \| notEqual \| contain \| notContain \| empty \| notEmpty | 示例: `["option1", "optionId2"]` <br/>operator 是 contain 时,包含 value 中的任何一个选项即满足条件。<br/>operator 是 notContain 时,不包含 value 中的所有选项即满足条件。<br/> operator 是 empty/notEmpty 时不需要传值。
|
|
8
|
-
| 多选 | 同「单选」 | 同「单选」
|
|
9
|
-
| 日期 | equal \| greater \| less \| empty \| notEmpty | 示例: `["2024-09-27"\| timestamp]` <br/>operator 是 empty/notEmpty 时不需要传值。
|
|
10
|
-
| 人员 | equal \| notEqual \| contain \| notContain \| empty \| notEmpty | 示例: `[{"unionId": "xxx"}, {"unionId": "yyy"}]`<br/>operator 是 contain 时,包含 value 中的任何一个选项即满足条件。<br/> operator 是 notContain 时,不包含 value 中的所有选项即满足条件。<br/>operator 是 empty/notEmpty 时不需要传值。 |
|
|
11
|
-
| 部门 | equal \| notEqual \| contain \| notContain \| empty \| notEmpty | 示例: `[{"deptId": "xxx"}, {"deptId": "yyy"}]`<br/>operator 是 contain 时,包含 value 中的任何一个选项即满足条件。<br/> operator 是 notContain 时,不包含 value 中的所有选项即满足条件。<br/>operator 是 empty/notEmpty 时不需要传值。
|
|
3
|
+
| **字段类型** | **可用操作符** | **查询条件值** |
|
|
4
|
+
|----------|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
5
|
+
| 文本 | equal \| notEqual \| contain \| notContain \| empty \| notEmpty | 示例:`["abc"]`<br/> operator 是 empty/notEmpty 时不需要传值。 |
|
|
6
|
+
| 数字 | equal \| notEqual \| greater \| greaterEqual \| less \| lessEqual \| empty \| notEmpty | 示例:`["123"]` <br/>operator 是 empty/notEmpty 时不需要传值。 |
|
|
7
|
+
| 单选 | equal \| notEqual \| contain \| notContain \| empty \| notEmpty | 示例: `["option1", "optionId2"]` <br/>operator 是 contain 时,包含 value 中的任何一个选项即满足条件。<br/>operator 是 notContain 时,不包含 value 中的所有选项即满足条件。<br/> operator 是 empty/notEmpty 时不需要传值。 |
|
|
8
|
+
| 多选 | 同「单选」 | 同「单选」 |
|
|
9
|
+
| 日期 | equal \| greater \| less \| empty \| notEmpty | 示例: `["2024-09-27"\| timestamp]` <br/>operator 是 empty/notEmpty 时不需要传值。 |
|
|
10
|
+
| 人员 | equal \| notEqual \| contain \| notContain \| empty \| notEmpty | 示例: `[{"unionId": "xxx"}, {"unionId": "yyy"}]`<br/>operator 是 contain 时,包含 value 中的任何一个选项即满足条件。<br/> operator 是 notContain 时,不包含 value 中的所有选项即满足条件。<br/>operator 是 empty/notEmpty 时不需要传值。 特别注意:uniondId是对应人员的unionId. |
|
|
11
|
+
| 部门 | equal \| notEqual \| contain \| notContain \| empty \| notEmpty | 示例: `[{"deptId": "xxx"}, {"deptId": "yyy"}]`<br/>operator 是 contain 时,包含 value 中的任何一个选项即满足条件。<br/> operator 是 notContain 时,不包含 value 中的所有选项即满足条件。<br/>operator 是 empty/notEmpty 时不需要传值。 |
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
不同字段类型所使用的格式请参考下表:
|
|
5
5
|
|
|
6
|
-
| 字段名 | 类型 (type) | 设置值(新增/更新记录时使用的格式) |
|
|
7
|
-
| --- | ---
|
|
8
|
-
| 文本 | text | `"TextString" // 字符串` |
|
|
9
|
-
| 数字 | number | `123 // 支持整数/浮点数/字符串` |
|
|
10
|
-
| 单选 | singleSelect | `"optionName1" // 单选选项名` |
|
|
11
|
-
| 多选 | multipleSelect | `["optionName1", "optionName2"] // 多选选项名` |
|
|
12
|
-
| 日期 | date | `1688601600000 // 时间戳 "2023-12-20 03:00" // 或者 ISO 8601字符串` |
|
|
13
|
-
| 人员 | user | `[ { unionId: "xxx" } ]` |
|
|
14
|
-
| 部门 | department | `[ { deptId: "xxx" } ]` |
|
|
15
|
-
| 附件 | attachment | 具体请参考[上传附件](https://open.dingtalk.com/document/orgapp/notable-upload-attachment) 。 |
|
|
16
|
-
| 单向关联 | unidirectionalLink | `{ "linkedRecordIds": [ "xxx", "yyy" ] }` |
|
|
17
|
-
| 双向关联 | bidirectionalLink | `{ "linkedRecordIds": [ "xxx", "yyy" ] }` |
|
|
18
|
-
| 链接 | url | `{ "text": "Dingtalk", "link": "https://dingtalk.com" }` |
|
|
6
|
+
| 字段名 | 类型 (type) | 设置值(新增/更新记录时使用的格式) |
|
|
7
|
+
| --- | --- |------------------------------------------------------------------------------------|
|
|
8
|
+
| 文本 | text | `"TextString" // 字符串` |
|
|
9
|
+
| 数字 | number | `123 // 支持整数/浮点数/字符串` |
|
|
10
|
+
| 单选 | singleSelect | `"optionName1" // 单选选项名` |
|
|
11
|
+
| 多选 | multipleSelect | `["optionName1", "optionName2"] // 多选选项名` |
|
|
12
|
+
| 日期 | date | `1688601600000 // 时间戳 "2023-12-20 03:00" // 或者 ISO 8601字符串` |
|
|
13
|
+
| 人员 | user | `[ { unionId: "xxx" } ]` |
|
|
14
|
+
| 部门 | department | `[ { deptId: "xxx" } ]` |
|
|
15
|
+
| 附件 | attachment | 具体请参考[上传附件](https://open.dingtalk.com/document/orgapp/notable-upload-attachment) 。 |
|
|
16
|
+
| 单向关联 | unidirectionalLink | `{ "linkedRecordIds": [ "xxx", "yyy" ] }` |
|
|
17
|
+
| 双向关联 | bidirectionalLink | `{ "linkedRecordIds": [ "xxx", "yyy" ] }` |
|
|
18
|
+
| 链接 | url | `{ "text": "Dingtalk", "link": "https://dingtalk.com" }` |
|