dingtalk-mcp 1.1.2 → 1.1.3
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.
- package/README.md +1 -0
- package/dingtalk_calendar_mcp_server.yaml +241 -601
- package/dist/DingTalkMCPServer.js +3 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,715 +1,355 @@
|
|
|
1
1
|
server:
|
|
2
2
|
name: dingtalk-calendar
|
|
3
|
-
description:
|
|
4
|
-
securitySchemes:
|
|
5
|
-
- id: DingTalkAuth
|
|
6
|
-
type: apiKey
|
|
7
|
-
in: header
|
|
8
|
-
name: x-acs-dingtalk-access-token
|
|
3
|
+
description: 钉钉日程
|
|
9
4
|
tools:
|
|
10
|
-
- name:
|
|
11
|
-
description:
|
|
5
|
+
- name: createEvent
|
|
6
|
+
description: 创建一个新的日程,支持设置时间、地点、参与者、提醒、重复规则等
|
|
7
|
+
requestTemplate:
|
|
8
|
+
method: POST
|
|
9
|
+
url: https://api.dingtalk.com/v1.0/calendar/users/{unionId}/calendars/{calendarId}/events
|
|
12
10
|
args:
|
|
13
|
-
- name:
|
|
14
|
-
|
|
15
|
-
type: array
|
|
11
|
+
- name: unionId
|
|
12
|
+
type: string
|
|
16
13
|
required: true
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
position: body
|
|
14
|
+
position: path
|
|
15
|
+
description: 日程组织者的unionId
|
|
20
16
|
- name: calendarId
|
|
21
|
-
description: "日历ID,使用'primary'表示主日历"
|
|
22
17
|
type: string
|
|
23
18
|
required: true
|
|
24
19
|
position: path
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
type: boolean
|
|
28
|
-
position: body
|
|
29
|
-
- name: eventId
|
|
30
|
-
description: "日程ID"
|
|
20
|
+
description: 日程所属的日历ID,统一为primary,表示用户的主日历
|
|
21
|
+
- name: summary
|
|
31
22
|
type: string
|
|
32
23
|
required: true
|
|
33
|
-
position:
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
position: body
|
|
25
|
+
description: 日程标题,最大不超过2048个字符
|
|
26
|
+
- name: description
|
|
36
27
|
type: string
|
|
28
|
+
required: false
|
|
37
29
|
position: body
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
type:
|
|
30
|
+
description: 日程描述,最大不超过5000个字符
|
|
31
|
+
- name: start
|
|
32
|
+
type: object
|
|
33
|
+
required: true
|
|
41
34
|
position: body
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
description: 日程开始时间对象。非全天日程格式示例:{"dateTime":"2025-09-20T10:15:30+08:00","timeZone":"Asia/Shanghai"};全天日程格式:{"date":"2025-09-20"}
|
|
36
|
+
- name: end
|
|
37
|
+
type: object
|
|
38
|
+
required: false
|
|
39
|
+
position: body
|
|
40
|
+
description: 日程结束时间对象。非全天日程格式示例:{"dateTime":"2025-09-20T11:15:30+08:00","timeZone":"Asia/Shanghai"};全天日程格式:{"date":"2025-09-21"}(全天日程结束日期需要+1天)
|
|
41
|
+
- name: isAllDay
|
|
44
42
|
type: boolean
|
|
43
|
+
required: false
|
|
45
44
|
position: body
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
type:
|
|
49
|
-
required:
|
|
50
|
-
position:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
type:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
{{else}}
|
|
89
|
-
❌ **操作失败** - {{.error}}
|
|
90
|
-
|
|
91
|
-
**错误详情**: {{.errorMessage}}
|
|
92
|
-
{{end}}
|
|
45
|
+
description: 是否全天日程
|
|
46
|
+
- name: location
|
|
47
|
+
type: object
|
|
48
|
+
required: false
|
|
49
|
+
position: body
|
|
50
|
+
description: 日程地点对象,包含displayName字段。示例:{"displayName":"会议室A"}
|
|
51
|
+
- name: attendees
|
|
52
|
+
type: array
|
|
53
|
+
required: false
|
|
54
|
+
position: body
|
|
55
|
+
description: 日程参与人列表,最多支持500个参与人。数组中每个对象包含id(用户unionId)和isOptional(是否可选参与人)字段。示例:[{"id":"unionId123","isOptional":false}]
|
|
56
|
+
- name: reminders
|
|
57
|
+
type: array
|
|
58
|
+
required: false
|
|
59
|
+
position: body
|
|
60
|
+
description: 日程提醒设置,数组中每个对象包含method和minutes字段。如不传默认开始前15分钟提醒,传空数组表示不设提醒。method只支持"dingtalk"(钉钉内提醒),minutes为Integer类型表示提前N分钟提醒。示例:[{"method":"dingtalk","minutes":15}]
|
|
61
|
+
- name: recurrence
|
|
62
|
+
type: object
|
|
63
|
+
required: false
|
|
64
|
+
position: body
|
|
65
|
+
description: 日程循环规则对象
|
|
66
|
+
- name: onlineMeetingInfo
|
|
67
|
+
type: object
|
|
68
|
+
required: false
|
|
69
|
+
position: body
|
|
70
|
+
description: 创建日程同时创建线上会议。对象包含type字段,目前只支持"dingtalk"(钉钉视频会议)。示例:{"type":"dingtalk"}
|
|
71
|
+
- name: extra
|
|
72
|
+
type: object
|
|
73
|
+
required: false
|
|
74
|
+
position: body
|
|
75
|
+
description: 扩展配置,如noPushNotification、noChatNotification等。示例:{"noPushNotification":"true","noChatNotification":"false"}
|
|
76
|
+
- name: uiConfigs
|
|
77
|
+
type: array
|
|
78
|
+
required: false
|
|
79
|
+
position: body
|
|
80
|
+
description: UI配置,控制日程详情页内组件的展示
|
|
81
|
+
- name: richTextDescription
|
|
82
|
+
type: object
|
|
83
|
+
required: false
|
|
84
|
+
position: body
|
|
85
|
+
description: 富文本描述对象
|
|
93
86
|
|
|
94
|
-
- name:
|
|
95
|
-
description:
|
|
87
|
+
- name: updateEvent
|
|
88
|
+
description: 修改已存在的日程信息
|
|
89
|
+
requestTemplate:
|
|
90
|
+
method: PUT
|
|
91
|
+
url: https://api.dingtalk.com/v1.0/calendar/users/{unionId}/calendars/{calendarId}/events/{eventId}
|
|
96
92
|
args:
|
|
97
|
-
- name:
|
|
98
|
-
description: "日程创建者的userId"
|
|
93
|
+
- name: unionId
|
|
99
94
|
type: string
|
|
100
95
|
required: true
|
|
101
96
|
position: path
|
|
97
|
+
description: 日程组织者的unionId
|
|
102
98
|
- name: calendarId
|
|
103
|
-
description: "日历ID,使用'primary'表示主日历"
|
|
104
99
|
type: string
|
|
105
100
|
required: true
|
|
106
101
|
position: path
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
description: 日程所属的日历ID,统一为primary
|
|
103
|
+
- name: eventId
|
|
109
104
|
type: string
|
|
110
105
|
required: true
|
|
106
|
+
position: path
|
|
107
|
+
description: 要修改的日程ID
|
|
108
|
+
- name: summary
|
|
109
|
+
type: string
|
|
110
|
+
required: false
|
|
111
111
|
position: body
|
|
112
|
+
description: 日程标题
|
|
113
|
+
- name: description
|
|
114
|
+
type: string
|
|
115
|
+
required: false
|
|
116
|
+
position: body
|
|
117
|
+
description: 日程描述
|
|
112
118
|
- name: start
|
|
113
|
-
description: "日程开始时间"
|
|
114
119
|
type: object
|
|
115
|
-
required:
|
|
120
|
+
required: false
|
|
116
121
|
position: body
|
|
122
|
+
description: 日程开始时间对象。非全天日程格式:{"dateTime":"2021-09-20T10:15:30+08:00","timeZone":"Asia/Shanghai"};全天日程格式:{"date":"2021-09-20"}
|
|
117
123
|
- name: end
|
|
118
|
-
description: "日程结束时间"
|
|
119
124
|
type: object
|
|
120
|
-
required:
|
|
121
|
-
position: body
|
|
122
|
-
- name: description
|
|
123
|
-
description: "日程描述内容"
|
|
124
|
-
type: string
|
|
125
|
+
required: false
|
|
125
126
|
position: body
|
|
127
|
+
description: 日程结束时间对象。非全天日程格式:{"dateTime":"2021-09-20T11:15:30+08:00","timeZone":"Asia/Shanghai"};全天日程格式:{"date":"2021-09-21"}(全天日程结束日期需要+1天)
|
|
126
128
|
- name: isAllDay
|
|
127
|
-
description: "是否为全天日程"
|
|
128
129
|
type: boolean
|
|
130
|
+
required: false
|
|
129
131
|
position: body
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
description: 是否全天日程
|
|
133
|
+
- name: location
|
|
134
|
+
type: object
|
|
135
|
+
required: false
|
|
136
|
+
position: body
|
|
137
|
+
description: 日程地点对象,包含displayName字段。示例:{"displayName":"会议室A"}
|
|
138
|
+
- name: reminders
|
|
132
139
|
type: array
|
|
133
|
-
|
|
134
|
-
type: object
|
|
140
|
+
required: false
|
|
135
141
|
position: body
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
**日程信息**:
|
|
149
|
-
- 📅 标题: {{.summary}}
|
|
150
|
-
- 🆔 日程ID: {{.id}}
|
|
151
|
-
- ⏰ 开始时间: {{.start.dateTime | formatTime}}
|
|
152
|
-
- ⏰ 结束时间: {{.end.dateTime | formatTime}}
|
|
153
|
-
- 📍 类型: {{if .isAllDay}}全天日程{{else}}定时日程{{end}}
|
|
154
|
-
{{if .description}}
|
|
155
|
-
- 📝 描述: {{.description}}
|
|
156
|
-
{{end}}
|
|
157
|
-
{{if .location}}
|
|
158
|
-
- 📍 地点: {{.location.displayName}}
|
|
159
|
-
{{end}}
|
|
160
|
-
|
|
161
|
-
{{if .attendees}}
|
|
162
|
-
**参与者** ({{len .attendees}}人):
|
|
163
|
-
{{range $i, $attendee := .attendees}}
|
|
164
|
-
{{add $i 1}}. {{$attendee.displayName}}{{if $attendee.isOptional}} (可选){{end}}
|
|
165
|
-
{{end}}
|
|
166
|
-
{{end}}
|
|
167
|
-
|
|
168
|
-
**访问方式**:
|
|
169
|
-
- 日程链接: {{.webLink}}
|
|
170
|
-
{{if .onlineMeeting}}
|
|
171
|
-
- 会议链接: {{.onlineMeeting.joinUrl}}
|
|
172
|
-
{{end}}
|
|
173
|
-
|
|
174
|
-
{{else}}
|
|
175
|
-
❌ **日程创建失败** - {{.error}}
|
|
176
|
-
|
|
177
|
-
**错误详情**: {{.errorMessage}}
|
|
178
|
-
{{end}}
|
|
142
|
+
description: 日程提醒设置,数组中每个对象包含method和minutes字段。method只支持"dingtalk"(钉钉内提醒),minutes为Integer类型表示提前N分钟提醒。示例:[{"method":"dingtalk","minutes":15}]
|
|
143
|
+
- name: recurrence
|
|
144
|
+
type: object
|
|
145
|
+
required: false
|
|
146
|
+
position: body
|
|
147
|
+
description: 日程循环规则对象
|
|
148
|
+
- name: extra
|
|
149
|
+
type: object
|
|
150
|
+
required: false
|
|
151
|
+
position: body
|
|
152
|
+
description: 扩展配置,如noPushNotification、noChatNotification等。示例:{"noPushNotification":"true","noChatNotification":"false"}
|
|
179
153
|
|
|
180
154
|
- name: deleteEvent
|
|
181
|
-
description:
|
|
155
|
+
description: 删除指定的日程
|
|
156
|
+
requestTemplate:
|
|
157
|
+
method: DELETE
|
|
158
|
+
url: https://api.dingtalk.com/v1.0/calendar/users/{unionId}/calendars/{calendarId}/events/{eventId}
|
|
182
159
|
args:
|
|
160
|
+
- name: unionId
|
|
161
|
+
type: string
|
|
162
|
+
required: true
|
|
163
|
+
position: path
|
|
164
|
+
description: 日程组织者的unionId
|
|
183
165
|
- name: calendarId
|
|
184
|
-
description: "日历ID,使用'primary'表示主日历"
|
|
185
166
|
type: string
|
|
186
167
|
required: true
|
|
187
168
|
position: path
|
|
169
|
+
description: 日程所属的日历ID,统一为primary
|
|
188
170
|
- name: eventId
|
|
189
|
-
description: "要删除的日程ID"
|
|
190
171
|
type: string
|
|
191
172
|
required: true
|
|
192
173
|
position: path
|
|
174
|
+
description: 要删除的日程ID
|
|
193
175
|
- name: pushNotification
|
|
194
|
-
description: "是否发送弹窗通知"
|
|
195
176
|
type: boolean
|
|
177
|
+
required: false
|
|
196
178
|
position: query
|
|
197
|
-
|
|
198
|
-
description: "执行删除操作的userId"
|
|
199
|
-
type: string
|
|
200
|
-
required: true
|
|
201
|
-
position: path
|
|
202
|
-
- name: x-client-token
|
|
203
|
-
description: "幂等性校验令牌"
|
|
204
|
-
type: string
|
|
205
|
-
position: header
|
|
206
|
-
requestTemplate:
|
|
207
|
-
url: https://api.dingtalk.com/v1.0/calendar/users/{userId}/calendars/{calendarId}/events/{eventId}?pushNotification=Boolean
|
|
208
|
-
method: DELETE
|
|
209
|
-
security:
|
|
210
|
-
id: DingTalkAuth
|
|
211
|
-
responseTemplate:
|
|
212
|
-
body: |
|
|
213
|
-
# 日程删除结果
|
|
214
|
-
|
|
215
|
-
{{if .success}}
|
|
216
|
-
✅ **日程删除成功**
|
|
217
|
-
|
|
218
|
-
**删除信息**:
|
|
219
|
-
- 日程ID: {{.eventId}}
|
|
220
|
-
- 删除者: {{.deletedBy}}
|
|
221
|
-
- 删除时间: {{.deletedAt | formatTime}}
|
|
222
|
-
- 影响范围: {{if .isOrganizer}}所有参与者(组织者删除){{else}}仅自己(参与者退出){{end}}
|
|
179
|
+
description: 是否发送弹窗提醒
|
|
223
180
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
{{if .isOrganizer}}
|
|
227
|
-
- 取消通知已发送给 {{.notifications.notifiedCount}} 位参与者
|
|
228
|
-
{{end}}
|
|
229
|
-
- 弹窗提醒: {{if .notifications.pushSent}}已发送{{else}}未发送{{end}}
|
|
230
|
-
{{end}}
|
|
231
|
-
|
|
232
|
-
{{else}}
|
|
233
|
-
❌ **日程删除失败** - {{.error}}
|
|
234
|
-
|
|
235
|
-
**错误详情**: {{.errorMessage}}
|
|
236
|
-
{{end}}
|
|
237
|
-
|
|
238
|
-
- name: getEventsView
|
|
239
|
-
description: "查询指定时间范围内的日程视图,支持循环日程展开显示"
|
|
240
|
-
args:
|
|
241
|
-
- name: calendarId
|
|
242
|
-
description: "日历ID,使用'primary'表示主日历"
|
|
243
|
-
type: string
|
|
244
|
-
required: true
|
|
245
|
-
position: path
|
|
246
|
-
- name: maxAttendees
|
|
247
|
-
description: "每个日程返回的参与者数量上限(默认100,最大100)"
|
|
248
|
-
type: integer
|
|
249
|
-
position: query
|
|
250
|
-
- name: maxResults
|
|
251
|
-
description: "返回的日程数量上限(默认100,最大100)"
|
|
252
|
-
type: integer
|
|
253
|
-
position: query
|
|
254
|
-
- name: nextToken
|
|
255
|
-
description: "分页标记,用于获取下一页数据"
|
|
256
|
-
type: string
|
|
257
|
-
position: query
|
|
258
|
-
- name: timeMax
|
|
259
|
-
description: "查询结束时间(ISO-8601格式)"
|
|
260
|
-
type: string
|
|
261
|
-
position: query
|
|
262
|
-
- name: timeMin
|
|
263
|
-
description: "查询开始时间(ISO-8601格式)"
|
|
264
|
-
type: string
|
|
265
|
-
position: query
|
|
266
|
-
- name: userId
|
|
267
|
-
description: "要查询的userId"
|
|
268
|
-
type: string
|
|
269
|
-
required: true
|
|
270
|
-
position: path
|
|
181
|
+
- name: getEvent
|
|
182
|
+
description: 查询单个日程的详细信息
|
|
271
183
|
requestTemplate:
|
|
272
|
-
url: https://api.dingtalk.com/v1.0/calendar/users/{userId}/calendars/{calendarId}/eventsview?timeMin=String&timeMax=String&maxResults=Long&nextToken=String
|
|
273
184
|
method: GET
|
|
274
|
-
|
|
275
|
-
id: DingTalkAuth
|
|
276
|
-
responseTemplate:
|
|
277
|
-
body: |
|
|
278
|
-
# 📅 日程视图查询结果
|
|
279
|
-
|
|
280
|
-
{{if .events}}
|
|
281
|
-
**查询范围**: {{.timeMin | formatTime}} 至 {{.timeMax | formatTime}}
|
|
282
|
-
**找到日程**: {{len .events}} 个{{if .hasMore}}(显示部分,还有更多){{end}}
|
|
283
|
-
|
|
284
|
-
{{range $i, $event := .events}}
|
|
285
|
-
## {{add $i 1}}. {{$event.summary}}
|
|
286
|
-
|
|
287
|
-
**⏰ 时间**: {{$event.start.dateTime | formatTime}} - {{$event.end.dateTime | formatTime}}
|
|
288
|
-
{{if $event.isAllDay}}**📅 类型**: 全天日程{{end}}
|
|
289
|
-
{{if $event.location}}**📍 地点**: {{$event.location.displayName}}{{end}}
|
|
290
|
-
{{if $event.description}}**📝 描述**: {{$event.description | truncate 100}}{{end}}
|
|
291
|
-
{{if $event.attendees}}**👥 参与者**: {{len $event.attendees}}人{{end}}
|
|
292
|
-
{{if $event.seriesMasterId}}**🔄 循环**: 这是循环日程的一个实例{{end}}
|
|
293
|
-
|
|
294
|
-
{{end}}
|
|
295
|
-
|
|
296
|
-
{{if .nextToken}}
|
|
297
|
-
---
|
|
298
|
-
**📄 分页信息**: 使用 nextToken "{{.nextToken}}" 获取更多结果
|
|
299
|
-
{{end}}
|
|
300
|
-
|
|
301
|
-
{{else}}
|
|
302
|
-
📭 **暂无日程**
|
|
303
|
-
|
|
304
|
-
指定时间范围内没有找到任何日程。
|
|
305
|
-
{{end}}
|
|
306
|
-
|
|
307
|
-
- name: getEventDetails
|
|
308
|
-
description: "获取指定日程的详细信息,包含完整的参与者、位置、描述等信息"
|
|
185
|
+
url: https://api.dingtalk.com/v1.0/calendar/users/{unionId}/calendars/{calendarId}/events/{eventId}
|
|
309
186
|
args:
|
|
310
|
-
- name:
|
|
311
|
-
description: "日历ID,使用'primary'表示主日历"
|
|
187
|
+
- name: unionId
|
|
312
188
|
type: string
|
|
313
189
|
required: true
|
|
314
190
|
position: path
|
|
315
|
-
|
|
316
|
-
|
|
191
|
+
description: 日程组织者的unionId
|
|
192
|
+
- name: calendarId
|
|
317
193
|
type: string
|
|
318
194
|
required: true
|
|
319
195
|
position: path
|
|
320
|
-
|
|
321
|
-
|
|
196
|
+
description: 日程所属的日历ID,统一为primary
|
|
197
|
+
- name: eventId
|
|
322
198
|
type: string
|
|
323
199
|
required: true
|
|
324
200
|
position: path
|
|
201
|
+
description: 要查询的日程ID
|
|
325
202
|
- name: maxAttendees
|
|
326
|
-
|
|
327
|
-
|
|
203
|
+
type: number
|
|
204
|
+
required: false
|
|
328
205
|
position: query
|
|
329
|
-
|
|
330
|
-
url: https://api.dingtalk.com/v1.0/calendar/users/{userId}/calendars/{calendarId}/events/{eventId}?maxAttendees=Long
|
|
331
|
-
method: GET
|
|
332
|
-
security:
|
|
333
|
-
id: DingTalkAuth
|
|
334
|
-
responseTemplate:
|
|
335
|
-
body: |
|
|
336
|
-
# 📅 日程详情
|
|
206
|
+
description: 返回的参与者列表的最大数量
|
|
337
207
|
|
|
338
|
-
## {{.summary}}
|
|
339
208
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
- 👤 创建者: {{.organizer.displayName}}
|
|
346
|
-
- 📊 状态: {{.status}}
|
|
347
|
-
|
|
348
|
-
{{if .description}}
|
|
349
|
-
**📝 详细描述**:
|
|
350
|
-
{{.description}}
|
|
351
|
-
{{end}}
|
|
352
|
-
|
|
353
|
-
{{if .location}}
|
|
354
|
-
**📍 会议地点**:
|
|
355
|
-
{{.location.displayName}}
|
|
356
|
-
{{end}}
|
|
357
|
-
|
|
358
|
-
{{if .onlineMeeting}}
|
|
359
|
-
**💻 在线会议**:
|
|
360
|
-
- 会议链接: {{.onlineMeeting.joinUrl}}
|
|
361
|
-
- 会议ID: {{.onlineMeeting.conferenceId}}
|
|
362
|
-
{{end}}
|
|
363
|
-
|
|
364
|
-
{{if .attendees}}
|
|
365
|
-
**👥 参与者** ({{len .attendees}}人):
|
|
366
|
-
{{range $i, $attendee := .attendees}}
|
|
367
|
-
{{add $i 1}}. {{$attendee.displayName}}
|
|
368
|
-
- 状态: {{$attendee.responseStatus}}{{if $attendee.isOptional}} (可选参与){{end}}
|
|
369
|
-
{{if $attendee.comment}}- 备注: {{$attendee.comment}}{{end}}
|
|
370
|
-
{{end}}
|
|
371
|
-
{{end}}
|
|
372
|
-
|
|
373
|
-
{{if .recurrence}}
|
|
374
|
-
**🔄 重复设置**:
|
|
375
|
-
{{.recurrence | formatRecurrence}}
|
|
376
|
-
{{end}}
|
|
377
|
-
|
|
378
|
-
{{if .reminders}}
|
|
379
|
-
**⏰ 提醒设置**:
|
|
380
|
-
{{range $reminder := .reminders}}
|
|
381
|
-
- {{$reminder.method}}: 提前{{$reminder.minutes}}分钟
|
|
382
|
-
{{end}}
|
|
383
|
-
{{end}}
|
|
384
|
-
|
|
385
|
-
- name: listAttendees
|
|
386
|
-
description: "获取指定日程的所有参与者列表及其状态信息"
|
|
209
|
+
- name: addAttendee
|
|
210
|
+
description: 添加日程参与者,每次最多支持操作500人
|
|
211
|
+
requestTemplate:
|
|
212
|
+
method: POST
|
|
213
|
+
url: https://api.dingtalk.com/v1.0/calendar/users/{unionId}/calendars/{calendarId}/events/{eventId}/attendees
|
|
387
214
|
args:
|
|
388
|
-
- name:
|
|
389
|
-
description: "日历ID,使用'primary'表示主日历"
|
|
215
|
+
- name: unionId
|
|
390
216
|
type: string
|
|
391
217
|
required: true
|
|
392
218
|
position: path
|
|
393
|
-
|
|
394
|
-
|
|
219
|
+
description: 日程创建者的unionId
|
|
220
|
+
- name: calendarId
|
|
395
221
|
type: string
|
|
396
222
|
required: true
|
|
397
223
|
position: path
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
type: integer
|
|
401
|
-
position: query
|
|
402
|
-
- name: nextToken
|
|
403
|
-
description: "分页标记,用于获取下一页数据"
|
|
404
|
-
type: string
|
|
405
|
-
position: query
|
|
406
|
-
- name: userId
|
|
407
|
-
description: "查询者的userId"
|
|
224
|
+
description: 日程所属的日历ID,统一为primary
|
|
225
|
+
- name: eventId
|
|
408
226
|
type: string
|
|
409
227
|
required: true
|
|
410
228
|
position: path
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
- 📧 邮箱: {{$attendee.email}}
|
|
428
|
-
- 📱 状态: {{if eq $attendee.responseStatus "accepted"}}✅ 已接受{{else if eq $attendee.responseStatus "declined"}}❌ 已拒绝{{else if eq $attendee.responseStatus "tentative"}}❓ 待定{{else}}⏳ 未回复{{end}}
|
|
429
|
-
- 👤 类型: {{if $attendee.isOptional}}可选参与者{{else}}必须参与者{{end}}
|
|
430
|
-
{{if $attendee.comment}}- 💬 备注: {{$attendee.comment}}{{end}}
|
|
431
|
-
{{if $attendee.isOrganizer}}- 🎯 **组织者**{{end}}
|
|
432
|
-
|
|
433
|
-
{{end}}
|
|
434
|
-
|
|
435
|
-
{{if .nextToken}}
|
|
436
|
-
---
|
|
437
|
-
**📄 分页信息**: 使用 nextToken "{{.nextToken}}" 获取更多参与者
|
|
438
|
-
{{end}}
|
|
229
|
+
description: 日程ID
|
|
230
|
+
- name: attendeesToAdd
|
|
231
|
+
type: array
|
|
232
|
+
required: true
|
|
233
|
+
position: body
|
|
234
|
+
description: 需要添加的参与人列表,数组中每个对象包含id(用户unionId)和isOptional(是否可选参与人)字段。示例:[{"id":"unionId123","isOptional":false}]
|
|
235
|
+
- name: pushNotification
|
|
236
|
+
type: boolean
|
|
237
|
+
required: false
|
|
238
|
+
position: body
|
|
239
|
+
description: 是否弹窗提醒
|
|
240
|
+
- name: chatNotification
|
|
241
|
+
type: boolean
|
|
242
|
+
required: false
|
|
243
|
+
position: body
|
|
244
|
+
description: 是否单聊提醒
|
|
439
245
|
|
|
440
|
-
- name:
|
|
441
|
-
description:
|
|
246
|
+
- name: removeAttendee
|
|
247
|
+
description: 删除日程参与者,每次最多支持操作500人
|
|
248
|
+
requestTemplate:
|
|
249
|
+
method: POST
|
|
250
|
+
url: https://api.dingtalk.com/v1.0/calendar/users/{unionId}/calendars/{calendarId}/events/{eventId}/attendees/batchRemove
|
|
442
251
|
args:
|
|
443
|
-
- name:
|
|
444
|
-
description: "日历ID,使用'primary'表示主日历"
|
|
252
|
+
- name: unionId
|
|
445
253
|
type: string
|
|
446
254
|
required: true
|
|
447
255
|
position: path
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
type: integer
|
|
451
|
-
position: query
|
|
452
|
-
- name: maxResults
|
|
453
|
-
description: "返回的日程数量上限(默认100,最大100)"
|
|
454
|
-
type: integer
|
|
455
|
-
position: query
|
|
456
|
-
- name: nextToken
|
|
457
|
-
description: "分页标记,用于获取下一页数据"
|
|
458
|
-
type: string
|
|
459
|
-
position: query
|
|
460
|
-
- name: seriesMasterId
|
|
461
|
-
description: "重复日程的主日程ID,用于查询特定循环日程"
|
|
462
|
-
type: string
|
|
463
|
-
position: query
|
|
464
|
-
- name: showDeleted
|
|
465
|
-
description: "是否包含已删除的日程"
|
|
466
|
-
type: boolean
|
|
467
|
-
position: query
|
|
468
|
-
- name: syncToken
|
|
469
|
-
description: "同步标记,用于增量数据同步"
|
|
470
|
-
type: string
|
|
471
|
-
position: query
|
|
472
|
-
- name: timeMax
|
|
473
|
-
description: "查询结束时间(ISO-8601格式)"
|
|
474
|
-
type: string
|
|
475
|
-
position: query
|
|
476
|
-
- name: timeMin
|
|
477
|
-
description: "查询开始时间(ISO-8601格式)"
|
|
256
|
+
description: 日程创建者的unionId
|
|
257
|
+
- name: calendarId
|
|
478
258
|
type: string
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
description:
|
|
259
|
+
required: true
|
|
260
|
+
position: path
|
|
261
|
+
description: 日程所属的日历ID,统一为primary
|
|
262
|
+
- name: eventId
|
|
482
263
|
type: string
|
|
483
264
|
required: true
|
|
484
265
|
position: path
|
|
266
|
+
description: 日程ID
|
|
267
|
+
- name: attendeesToRemove
|
|
268
|
+
type: array
|
|
269
|
+
required: true
|
|
270
|
+
position: body
|
|
271
|
+
description: 需要删除的参与人列表,数组中每个对象包含id(用户unionId)字段。示例:[{"id":"unionId123"}]
|
|
272
|
+
- name: pushNotification
|
|
273
|
+
type: boolean
|
|
274
|
+
required: false
|
|
275
|
+
position: body
|
|
276
|
+
description: 是否弹窗提醒
|
|
277
|
+
- name: chatNotification
|
|
278
|
+
type: boolean
|
|
279
|
+
required: false
|
|
280
|
+
position: body
|
|
281
|
+
description: 是否单聊提醒
|
|
282
|
+
|
|
283
|
+
- name: getAttendees
|
|
284
|
+
description: 获取日程参与者列表
|
|
485
285
|
requestTemplate:
|
|
486
|
-
url: https://api.dingtalk.com/v1.0/calendar/users/{userId}/calendars/{calendarId}/events?timeMin=String&timeMax=String&showDeleted=Boolean&maxResults=Integer&maxAttendees=Integer&nextToken=String&syncToken=String
|
|
487
286
|
method: GET
|
|
488
|
-
|
|
489
|
-
id: DingTalkAuth
|
|
490
|
-
responseTemplate:
|
|
491
|
-
body: |
|
|
492
|
-
# 📋 日程列表
|
|
493
|
-
|
|
494
|
-
{{if .events}}
|
|
495
|
-
**查询时间**: {{if .timeMin}}{{.timeMin | formatTime}}{{else}}不限{{end}} 至 {{if .timeMax}}{{.timeMax | formatTime}}{{else}}不限{{end}}
|
|
496
|
-
**日程数量**: {{len .events}}个{{if .hasMore}}(显示部分){{end}}
|
|
497
|
-
|
|
498
|
-
{{range $i, $event := .events}}
|
|
499
|
-
## {{add $i 1}}. {{$event.summary}}
|
|
500
|
-
|
|
501
|
-
- 🆔 ID: {{$event.id}}
|
|
502
|
-
- ⏰ 时间: {{$event.start.dateTime | formatTime}} - {{$event.end.dateTime | formatTime}}
|
|
503
|
-
{{if $event.isAllDay}}- 📅 全天日程{{end}}
|
|
504
|
-
{{if $event.location}}- 📍 地点: {{$event.location.displayName}}{{end}}
|
|
505
|
-
{{if $event.attendees}}- 👥 参与者: {{len $event.attendees}}人{{end}}
|
|
506
|
-
{{if $event.recurrenceId}}- 🔄 这是循环日程的实例{{end}}
|
|
507
|
-
{{if $event.status}}- 📊 状态: {{$event.status}}{{end}}
|
|
508
|
-
|
|
509
|
-
{{end}}
|
|
510
|
-
|
|
511
|
-
{{if .nextToken}}
|
|
512
|
-
**📄 分页**: 使用 nextToken "{{.nextToken}}" 获取更多
|
|
513
|
-
{{end}}
|
|
514
|
-
|
|
515
|
-
{{if .syncToken}}
|
|
516
|
-
**🔄 同步**: 使用 syncToken "{{.syncToken}}" 进行增量同步
|
|
517
|
-
{{end}}
|
|
518
|
-
|
|
519
|
-
{{else}}
|
|
520
|
-
📭 **暂无日程**
|
|
521
|
-
|
|
522
|
-
指定时间范围内没有找到任何日程。
|
|
523
|
-
{{end}}
|
|
524
|
-
|
|
525
|
-
- name: updateEvent
|
|
526
|
-
description: "修改现有日程的信息,支持更新标题、时间、参与者、地点等任意字段,仅需要组织者权限"
|
|
287
|
+
url: https://api.dingtalk.com/v1.0/calendar/users/{unionId}/calendars/{calendarId}/events/{eventId}/attendees
|
|
527
288
|
args:
|
|
528
|
-
- name:
|
|
529
|
-
description: "日历ID,使用'primary'表示主日历"
|
|
289
|
+
- name: unionId
|
|
530
290
|
type: string
|
|
531
291
|
required: true
|
|
532
292
|
position: path
|
|
533
|
-
|
|
534
|
-
|
|
293
|
+
description: 日程创建者的unionId
|
|
294
|
+
- name: calendarId
|
|
535
295
|
type: string
|
|
536
296
|
required: true
|
|
537
297
|
position: path
|
|
538
|
-
|
|
539
|
-
|
|
298
|
+
description: 日程所属的日历ID,统一为primary
|
|
299
|
+
- name: eventId
|
|
540
300
|
type: string
|
|
541
301
|
required: true
|
|
542
302
|
position: path
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
type:
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
description:
|
|
549
|
-
|
|
550
|
-
position: body
|
|
551
|
-
- name: start
|
|
552
|
-
description: "日程开始时间"
|
|
553
|
-
type: object
|
|
554
|
-
position: body
|
|
555
|
-
- name: end
|
|
556
|
-
description: "日程结束时间"
|
|
557
|
-
type: object
|
|
558
|
-
position: body
|
|
559
|
-
- name: location
|
|
560
|
-
description: "日程地点"
|
|
561
|
-
type: object
|
|
562
|
-
position: body
|
|
563
|
-
- name: attendees
|
|
564
|
-
description: "参与者列表"
|
|
565
|
-
type: array
|
|
566
|
-
items:
|
|
567
|
-
type: object
|
|
568
|
-
position: body
|
|
569
|
-
- name: isAllDay
|
|
570
|
-
description: "是否为全天日程"
|
|
571
|
-
type: boolean
|
|
572
|
-
position: body
|
|
573
|
-
- name: reminders
|
|
574
|
-
description: "提醒设置"
|
|
575
|
-
type: array
|
|
576
|
-
items:
|
|
577
|
-
type: object
|
|
578
|
-
position: body
|
|
579
|
-
- name: recurrence
|
|
580
|
-
description: "重复设置"
|
|
581
|
-
type: object
|
|
582
|
-
position: body
|
|
583
|
-
- name: onlineMeetingInfo
|
|
584
|
-
description: "在线会议设置"
|
|
585
|
-
type: object
|
|
586
|
-
position: body
|
|
587
|
-
- name: x-client-token
|
|
588
|
-
description: "幂等性校验令牌"
|
|
303
|
+
description: 日程ID
|
|
304
|
+
- name: maxResults
|
|
305
|
+
type: number
|
|
306
|
+
required: false
|
|
307
|
+
position: query
|
|
308
|
+
description: 最大返回数量,默认100,最大500
|
|
309
|
+
- name: nextToken
|
|
589
310
|
type: string
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
method: PUT
|
|
594
|
-
headers:
|
|
595
|
-
- key: Content-Type
|
|
596
|
-
value: application/json
|
|
597
|
-
security:
|
|
598
|
-
id: DingTalkAuth
|
|
599
|
-
responseTemplate:
|
|
600
|
-
body: |
|
|
601
|
-
# ✏️ 日程修改结果
|
|
602
|
-
|
|
603
|
-
{{if .success}}
|
|
604
|
-
✅ **日程修改成功**
|
|
605
|
-
|
|
606
|
-
**更新后的日程信息**:
|
|
607
|
-
- 📅 标题: {{.summary}}
|
|
608
|
-
- 🆔 日程ID: {{.id}}
|
|
609
|
-
- ⏰ 开始时间: {{.start.dateTime | formatTime}}
|
|
610
|
-
- ⏰ 结束时间: {{.end.dateTime | formatTime}}
|
|
611
|
-
- 📍 类型: {{if .isAllDay}}全天日程{{else}}定时日程{{end}}
|
|
612
|
-
{{if .description}}
|
|
613
|
-
- 📝 描述: {{.description}}
|
|
614
|
-
{{end}}
|
|
615
|
-
{{if .location}}
|
|
616
|
-
- 📍 地点: {{.location.displayName}}
|
|
617
|
-
{{end}}
|
|
618
|
-
|
|
619
|
-
**修改的内容**:
|
|
620
|
-
{{range $change := .changes}}
|
|
621
|
-
- {{$change.field}}: {{$change.oldValue}} → {{$change.newValue}}
|
|
622
|
-
{{end}}
|
|
623
|
-
|
|
624
|
-
{{if .attendees}}
|
|
625
|
-
**参与者** ({{len .attendees}}人):
|
|
626
|
-
{{range $i, $attendee := .attendees}}
|
|
627
|
-
{{add $i 1}}. {{$attendee.displayName}}{{if $attendee.isOptional}} (可选){{end}}
|
|
628
|
-
{{end}}
|
|
629
|
-
{{end}}
|
|
630
|
-
|
|
631
|
-
{{if .onlineMeeting}}
|
|
632
|
-
**在线会议**:
|
|
633
|
-
- 会议链接: {{.onlineMeeting.joinUrl}}
|
|
634
|
-
{{end}}
|
|
635
|
-
|
|
636
|
-
{{else}}
|
|
637
|
-
❌ **日程修改失败** - {{.error}}
|
|
638
|
-
|
|
639
|
-
**错误详情**: {{.errorMessage}}
|
|
640
|
-
{{end}}
|
|
311
|
+
required: false
|
|
312
|
+
position: query
|
|
313
|
+
description: 分页标记
|
|
641
314
|
|
|
642
|
-
- name:
|
|
643
|
-
description:
|
|
315
|
+
- name: getCalendarView
|
|
316
|
+
description: 查询日程视图,按时间范围获取日程列表
|
|
317
|
+
requestTemplate:
|
|
318
|
+
method: GET
|
|
319
|
+
url: https://api.dingtalk.com/v1.0/calendar/users/{unionId}/calendars/{calendarId}/eventsview
|
|
644
320
|
args:
|
|
645
|
-
- name:
|
|
646
|
-
description: "需要移除的参与者列表"
|
|
647
|
-
type: array
|
|
648
|
-
items:
|
|
649
|
-
type: object
|
|
650
|
-
position: body
|
|
651
|
-
- name: calendarId
|
|
652
|
-
description: "日历ID,使用'primary'表示主日历"
|
|
321
|
+
- name: unionId
|
|
653
322
|
type: string
|
|
654
323
|
required: true
|
|
655
324
|
position: path
|
|
656
|
-
|
|
657
|
-
|
|
325
|
+
description: 用户的unionId
|
|
326
|
+
- name: calendarId
|
|
658
327
|
type: string
|
|
659
328
|
required: true
|
|
660
329
|
position: path
|
|
661
|
-
|
|
662
|
-
|
|
330
|
+
description: 日程所属的日历ID,统一为primary
|
|
331
|
+
- name: timeMin
|
|
663
332
|
type: string
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
description:
|
|
333
|
+
required: true
|
|
334
|
+
position: query
|
|
335
|
+
description: 查询的起始时间,RFC3339格式
|
|
336
|
+
- name: timeMax
|
|
667
337
|
type: string
|
|
668
338
|
required: true
|
|
669
|
-
position:
|
|
670
|
-
|
|
671
|
-
|
|
339
|
+
position: query
|
|
340
|
+
description: 查询的结束时间,RFC3339格式
|
|
341
|
+
- name: maxAttendees
|
|
342
|
+
type: number
|
|
343
|
+
required: false
|
|
344
|
+
position: query
|
|
345
|
+
description: 返回的参与者列表的最大数量
|
|
346
|
+
- name: maxResults
|
|
347
|
+
type: number
|
|
348
|
+
required: false
|
|
349
|
+
position: query
|
|
350
|
+
description: 最大返回数量
|
|
351
|
+
- name: nextToken
|
|
672
352
|
type: string
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
method: POST
|
|
677
|
-
headers:
|
|
678
|
-
- key: Content-Type
|
|
679
|
-
value: application/json
|
|
680
|
-
security:
|
|
681
|
-
id: DingTalkAuth
|
|
682
|
-
responseTemplate:
|
|
683
|
-
body: |
|
|
684
|
-
# 👥➖ 日程参与者移除结果
|
|
685
|
-
|
|
686
|
-
{{if .success}}
|
|
687
|
-
✅ **操作成功** - 已从日程中移除参与者
|
|
688
|
-
|
|
689
|
-
**日程信息**:
|
|
690
|
-
- 日程ID: {{.eventId}}
|
|
691
|
-
- 操作时间: {{.timestamp}}
|
|
692
|
-
|
|
693
|
-
**移除的参与者**:
|
|
694
|
-
{{range $i, $attendee := .removedAttendees}}
|
|
695
|
-
{{add $i 1}}. {{$attendee.displayName}}
|
|
696
|
-
- unionId: {{$attendee.id}}
|
|
697
|
-
- 移除原因: {{$attendee.reason}}
|
|
698
|
-
{{end}}
|
|
699
|
-
|
|
700
|
-
**剩余参与者数量**: {{.remainingCount}}人
|
|
701
|
-
|
|
702
|
-
{{if .notifications}}
|
|
703
|
-
**通知状态**:
|
|
704
|
-
{{if .notifications.attendeesNotified}}
|
|
705
|
-
- 已向移除的参与者发送通知
|
|
706
|
-
{{end}}
|
|
707
|
-
{{end}}
|
|
708
|
-
|
|
709
|
-
{{else}}
|
|
710
|
-
❌ **操作失败** - {{.error}}
|
|
711
|
-
|
|
712
|
-
**错误详情**: {{.errorMessage}}
|
|
713
|
-
{{end}}
|
|
714
|
-
|
|
715
|
-
|
|
353
|
+
required: false
|
|
354
|
+
position: query
|
|
355
|
+
description: 分页标记
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dingtalk-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "DingTalk MCP Server - A TypeScript-based MCP server for DingTalk integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/**/*",
|
|
13
13
|
"*.yaml",
|
|
14
|
+
"dist/utils",
|
|
14
15
|
"!dist/test.js",
|
|
15
|
-
"
|
|
16
|
+
"!staging"
|
|
16
17
|
],
|
|
17
18
|
"scripts": {
|
|
18
19
|
"build": "tsc",
|