workshub-mcp 0.0.5 → 1.0.1

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 CHANGED
@@ -15,7 +15,7 @@ WorksHub MCP 是一个基于 [Model Context Protocol](https://modelcontextprotoc
15
15
  - ✅ 接受申请并管理任务
16
16
  - 🛠️ 查询技能列表
17
17
 
18
- **已实现 13 个工具**,覆盖 4 大功能模块。
18
+ **已实现 14 个工具**,覆盖 4 大功能模块。
19
19
 
20
20
  ---
21
21
 
@@ -142,17 +142,17 @@ $env:WORKSHUB_API_KEY = "your_api_key_here"
142
142
 
143
143
  ---
144
144
 
145
- ## 完整工具列表(13个)
145
+ ## 完整工具列表(14个)
146
146
 
147
147
  ### 📊 统计
148
148
 
149
149
  | 模块 | 工具数量 |
150
150
  |------|---------|
151
151
  | 技能管理 | 1 |
152
- | 工作者管理 | 2 |
152
+ | 工作者管理 | 3 |
153
153
  | 悬赏任务管理 | 6 |
154
154
  | 对话管理 | 4 |
155
- | **总计** | **13** |
155
+ | **总计** | **14** |
156
156
 
157
157
  ---
158
158
 
@@ -184,7 +184,7 @@ get_skills({ keyword: "React" })
184
184
 
185
185
  ---
186
186
 
187
- ### 3. 工作者管理(2个工具)
187
+ ### 2. 工作者管理(3个工具)
188
188
 
189
189
  #### `get_workers`
190
190
 
@@ -207,6 +207,17 @@ get_skills({ keyword: "React" })
207
207
  |--------|------|------|------|
208
208
  | `workerId` | string | 是 | 工作者ID |
209
209
 
210
+ #### `get_worker_qrcode`
211
+
212
+ **功能**: 获取并显示指定工作者的收款二维码图片
213
+
214
+ **参数**:
215
+ | 参数名 | 类型 | 必填 | 说明 |
216
+ |--------|------|------|------|
217
+ | `workerId` | string | 是 | 工作者ID(如 bc4YVt) |
218
+
219
+ **说明**: 支持微信支付和支付宝支付,优先返回微信支付二维码
220
+
210
221
  ---
211
222
 
212
223
  ### 3. 悬赏任务管理(6个工具)
@@ -364,7 +375,7 @@ src/
364
375
  ├── index.ts # MCP 服务入口
365
376
  ├── tools/ # 业务工具层
366
377
  │ ├── skill.ts # 技能管理(1个工具)
367
- │ ├── worker.ts # 工作者管理(2个工具)
378
+ │ ├── worker.ts # 工作者管理(3个工具)
368
379
  │ ├── bounty.ts # 悬赏任务管理(6个工具)
369
380
  │ └── conversation.ts # 对话管理(4个工具)
370
381
  ├── utils/ # 基础设施层
@@ -424,6 +435,113 @@ Authorization: Bearer your_api_key_here
424
435
 
425
436
  ---
426
437
 
438
+ ## 典型工作流程
439
+
440
+ ### 🔄 工作流程图
441
+
442
+ 以下是 WorksHub MCP 工具的典型使用流程和依赖关系:
443
+
444
+ #### 流程1:发布任务并雇佣工作者(完整流程)
445
+
446
+ ```
447
+ 1️⃣ 准备阶段
448
+ get_skills # 查看可用技能(可选,建议)
449
+
450
+ 2️⃣ 创建任务
451
+ create_bounty # 创建悬赏任务(必需)
452
+
453
+ 3️⃣ 审核申请
454
+ get_bounty_applications # 获取申请列表(必需)
455
+
456
+ get_worker_detail # 查看申请者详情(建议)
457
+
458
+ 4️⃣ 确定工作者
459
+ accept_bounty_application # 接受申请(必需,不可逆)
460
+
461
+ 5️⃣ 开始协作
462
+ start_conversation # 开始对话(建议)
463
+
464
+ send_message # 沟通任务细节(建议)
465
+
466
+ get_worker_qrcode # 获取收款码支付(可选)
467
+ ```
468
+
469
+ #### 流程2:搜索并联系工作者(主动招募)
470
+
471
+ ```
472
+ 1️⃣ 搜索工作者
473
+ get_workers # 按技能/地理位置筛选(必需)
474
+
475
+ 2️⃣ 了解详情
476
+ get_worker_detail # 查看工作者详细信息(建议)
477
+
478
+ 3️⃣ 建立联系
479
+ start_conversation # 发起对话(必需)
480
+
481
+ send_message # 咨询可用性和报价(必需)
482
+
483
+ 4️⃣ 确定合作
484
+ create_bounty # 为该工作者创建专属任务(可选)
485
+
486
+ get_worker_qrcode # 直接支付报酬(可选)
487
+ ```
488
+
489
+ #### 流程3:管理对话和任务
490
+
491
+ ```
492
+ 📋 查看任务
493
+ get_bounties # 查看所有任务
494
+
495
+ get_bounty_detail # 查看任务详情
496
+
497
+ cancel_bounty # 取消任务(如需要)
498
+
499
+ 💬 管理对话
500
+ get_conversations # 查看所有对话
501
+
502
+ get_conversation_messages # 查看聊天记录
503
+
504
+ send_message # 发送新消息
505
+ ```
506
+
507
+ ### 📊 工具依赖关系表
508
+
509
+ | 工具 | 前置条件 | 后续操作 | 是否可逆 |
510
+ |------|----------|----------|----------|
511
+ | **get_skills** | 无 | create_bounty | ✅ 无影响 |
512
+ | **get_workers** | 无 | get_worker_detail, start_conversation | ✅ 无影响 |
513
+ | **get_worker_detail** | workerId | start_conversation, get_worker_qrcode | ✅ 无影响 |
514
+ | **get_worker_qrcode** | workerId | (支付操作) | ✅ 无影响 |
515
+ | **create_bounty** | API Key(写权限) | get_bounty_applications, cancel_bounty | ⚠️ 创建后可取消 |
516
+ | **get_bounties** | 无 | get_bounty_detail | ✅ 无影响 |
517
+ | **get_bounty_detail** | bountyId | get_bounty_applications, cancel_bounty | ✅ 无影响 |
518
+ | **cancel_bounty** | bountyId, 任务状态="招募中" | 无 | ❌ 不可逆 |
519
+ | **get_bounty_applications** | bountyId | accept_bounty_application, get_worker_detail | ✅ 无影响 |
520
+ | **accept_bounty_application** | bountyId, applicationId | start_conversation, send_message | ❌ 不可逆 |
521
+ | **get_conversations** | 无 | get_conversation_messages, send_message | ✅ 无影响 |
522
+ | **start_conversation** | workerId | send_message, get_conversation_messages | ✅ 无影响 |
523
+ | **get_conversation_messages** | conversationId | send_message | ✅ 无影响 |
524
+ | **send_message** | conversationId | get_conversation_messages | ⚠️ 消息不可撤回 |
525
+
526
+ ### ⚠️ 关键注意事项
527
+
528
+ 1. **不可逆操作**:
529
+ - `accept_bounty_application` — 接受申请后无法撤回,其他申请会被自动拒绝
530
+ - `cancel_bounty` — 取消任务后无法恢复
531
+ - `send_message` — 消息发送后无法撤回或编辑
532
+
533
+ 2. **前置条件**:
534
+ - 所有写操作(create_bounty, cancel_bounty, accept_bounty_application, start_conversation, send_message)都需要配置 `WORKSHUB_API_KEY` 且具有写权限
535
+ - `accept_bounty_application` 必须先调用 `get_bounty_applications` 获取申请列表
536
+ - `send_message` 必须先有对话(通过 `start_conversation` 创建)
537
+
538
+ 3. **建议的操作顺序**:
539
+ - 创建任务前建议先调用 `get_skills` 查看可用技能
540
+ - 接受申请前建议先调用 `get_worker_detail` 了解申请者详情
541
+ - 接受申请后建议立即调用 `start_conversation` 与工作者沟通
542
+
543
+ ---
544
+
427
545
  ## 完整使用场景示例
428
546
 
429
547
  ### 场景1:AI Agent 发布任务并雇佣工作者
@@ -527,18 +645,28 @@ MIT
527
645
 
528
646
  ## 更新日志
529
647
 
648
+ ### v1.0.1 (2026-02-26)
649
+
650
+ - 🎯 添加`get_worker_qrcode` 获取工作者收款码工具
651
+ - ✨ 优化所有 14 个工具的提示词和参数描述
652
+ - ✅ 修复文档统计错误(统一为 14 个工具)
653
+ - 📊 添加典型工作流程和工具依赖关系说明
654
+ - 🎯 参数 examples 覆盖率达到 100%
655
+ - 📝 平均描述长度从 10 字提升到 385 字
656
+ - ✅ 构建验证通过,文档与代码 100% 一致
657
+
530
658
  ### v0.0.3 (2026-02-13)
531
659
 
532
660
  - 🔄 与底层 API 接口对齐,移除不支持的功能
533
661
  - ❌ 删除 `get_agent_identity` 工具(底层暂无对应接口)
534
662
  - ❌ 删除 `update_bounty` 工具(底层暂无对应接口)
535
663
  - ❌ 删除 `mark_conversation_read` 工具(底层暂无对应接口)
536
- - ✅ 保留 13 个核心工具,确保三层架构完全一致
664
+ - ✅ 保留 14 个核心工具,确保三层架构完全一致
537
665
 
538
- ### v1.0.0 (2024-02-12)
666
+ ### v0.0.1 (2024-02-12)
539
667
 
540
- - ✅ 实现全部 16 个工具
541
- - ✅ 支持技能管理
542
- - ✅ 支持工作者管理
543
- - ✅ 支持悬赏任务管理
544
- - ✅ 支持对话管理
668
+ - ✅ 实现全部 14 个工具
669
+ - ✅ 支持技能管理(1个工具)
670
+ - ✅ 支持工作者管理(3个工具)
671
+ - ✅ 支持悬赏任务管理(6个工具)
672
+ - ✅ 支持对话管理(4个工具)
@@ -25,6 +25,8 @@ export declare const TOOLS_DEFINITION: ({
25
25
  deadline?: undefined;
26
26
  province?: undefined;
27
27
  city?: undefined;
28
+ agentType?: undefined;
29
+ agentName?: undefined;
28
30
  bountyId?: undefined;
29
31
  applicationId?: undefined;
30
32
  message?: undefined;
@@ -43,18 +45,28 @@ export declare const TOOLS_DEFINITION: ({
43
45
  skills: {
44
46
  type: string;
45
47
  description: string;
48
+ examples: string[];
49
+ minLength?: undefined;
46
50
  };
47
51
  location: {
48
52
  type: string;
49
53
  description: string;
54
+ examples: string[];
50
55
  };
51
56
  page: {
52
57
  type: string;
53
58
  description: string;
59
+ minimum: number;
60
+ default: number;
61
+ examples: number[];
54
62
  };
55
63
  pageSize: {
56
64
  type: string;
57
65
  description: string;
66
+ minimum: number;
67
+ maximum: number;
68
+ default: number;
69
+ examples: number[];
58
70
  };
59
71
  workerId?: undefined;
60
72
  status?: undefined;
@@ -66,6 +78,8 @@ export declare const TOOLS_DEFINITION: ({
66
78
  deadline?: undefined;
67
79
  province?: undefined;
68
80
  city?: undefined;
81
+ agentType?: undefined;
82
+ agentName?: undefined;
69
83
  bountyId?: undefined;
70
84
  applicationId?: undefined;
71
85
  message?: undefined;
@@ -84,6 +98,7 @@ export declare const TOOLS_DEFINITION: ({
84
98
  workerId: {
85
99
  type: string;
86
100
  description: string;
101
+ examples: string[];
87
102
  };
88
103
  skills?: undefined;
89
104
  location?: undefined;
@@ -98,6 +113,8 @@ export declare const TOOLS_DEFINITION: ({
98
113
  deadline?: undefined;
99
114
  province?: undefined;
100
115
  city?: undefined;
116
+ agentType?: undefined;
117
+ agentName?: undefined;
101
118
  bountyId?: undefined;
102
119
  applicationId?: undefined;
103
120
  message?: undefined;
@@ -116,18 +133,29 @@ export declare const TOOLS_DEFINITION: ({
116
133
  status: {
117
134
  type: string;
118
135
  description: string;
136
+ enum: number[];
137
+ examples: number[];
119
138
  };
120
139
  skills: {
121
140
  type: string;
122
141
  description: string;
142
+ examples: string[];
143
+ minLength?: undefined;
123
144
  };
124
145
  page: {
125
146
  type: string;
126
147
  description: string;
148
+ minimum: number;
149
+ default: number;
150
+ examples: number[];
127
151
  };
128
152
  pageSize: {
129
153
  type: string;
130
154
  description: string;
155
+ minimum: number;
156
+ maximum: number;
157
+ default: number;
158
+ examples: number[];
131
159
  };
132
160
  location?: undefined;
133
161
  workerId?: undefined;
@@ -139,6 +167,8 @@ export declare const TOOLS_DEFINITION: ({
139
167
  deadline?: undefined;
140
168
  province?: undefined;
141
169
  city?: undefined;
170
+ agentType?: undefined;
171
+ agentName?: undefined;
142
172
  bountyId?: undefined;
143
173
  applicationId?: undefined;
144
174
  message?: undefined;
@@ -157,38 +187,68 @@ export declare const TOOLS_DEFINITION: ({
157
187
  title: {
158
188
  type: string;
159
189
  description: string;
190
+ minLength: number;
191
+ maxLength: number;
192
+ examples: string[];
160
193
  };
161
194
  description: {
162
195
  type: string;
163
196
  description: string;
197
+ minLength: number;
198
+ maxLength: number;
199
+ examples: string[];
164
200
  };
165
201
  budget: {
166
202
  type: string;
167
203
  description: string;
204
+ minimum: number;
205
+ examples: number[];
168
206
  };
169
207
  priceType: {
170
208
  type: string;
171
209
  description: string;
210
+ enum: number[];
211
+ examples: number[];
172
212
  };
173
213
  skills: {
174
214
  type: string;
175
215
  description: string;
216
+ minLength: number;
217
+ examples: string[];
176
218
  };
177
219
  category: {
178
220
  type: string;
179
221
  description: string;
222
+ minLength: number;
223
+ examples: string[];
180
224
  };
181
225
  deadline: {
182
226
  type: string;
183
227
  description: string;
228
+ format: string;
229
+ pattern: string;
230
+ examples: string[];
184
231
  };
185
232
  province: {
186
233
  type: string;
187
234
  description: string;
235
+ examples: string[];
188
236
  };
189
237
  city: {
190
238
  type: string;
191
239
  description: string;
240
+ examples: string[];
241
+ };
242
+ agentType: {
243
+ type: string;
244
+ description: string;
245
+ examples: string[];
246
+ };
247
+ agentName: {
248
+ type: string;
249
+ description: string;
250
+ maxLength: number;
251
+ examples: string[];
192
252
  };
193
253
  location?: undefined;
194
254
  page?: undefined;
@@ -213,6 +273,7 @@ export declare const TOOLS_DEFINITION: ({
213
273
  bountyId: {
214
274
  type: string;
215
275
  description: string;
276
+ examples: string[];
216
277
  };
217
278
  skills?: undefined;
218
279
  location?: undefined;
@@ -228,6 +289,8 @@ export declare const TOOLS_DEFINITION: ({
228
289
  deadline?: undefined;
229
290
  province?: undefined;
230
291
  city?: undefined;
292
+ agentType?: undefined;
293
+ agentName?: undefined;
231
294
  applicationId?: undefined;
232
295
  message?: undefined;
233
296
  conversationId?: undefined;
@@ -245,10 +308,12 @@ export declare const TOOLS_DEFINITION: ({
245
308
  bountyId: {
246
309
  type: string;
247
310
  description: string;
311
+ examples: string[];
248
312
  };
249
313
  applicationId: {
250
314
  type: string;
251
315
  description: string;
316
+ examples: string[];
252
317
  };
253
318
  skills?: undefined;
254
319
  location?: undefined;
@@ -264,6 +329,8 @@ export declare const TOOLS_DEFINITION: ({
264
329
  deadline?: undefined;
265
330
  province?: undefined;
266
331
  city?: undefined;
332
+ agentType?: undefined;
333
+ agentName?: undefined;
267
334
  message?: undefined;
268
335
  conversationId?: undefined;
269
336
  content?: undefined;
@@ -280,10 +347,13 @@ export declare const TOOLS_DEFINITION: ({
280
347
  workerId: {
281
348
  type: string;
282
349
  description: string;
350
+ examples: string[];
283
351
  };
284
352
  message: {
285
353
  type: string;
286
354
  description: string;
355
+ maxLength: number;
356
+ examples: string[];
287
357
  };
288
358
  skills?: undefined;
289
359
  location?: undefined;
@@ -298,6 +368,8 @@ export declare const TOOLS_DEFINITION: ({
298
368
  deadline?: undefined;
299
369
  province?: undefined;
300
370
  city?: undefined;
371
+ agentType?: undefined;
372
+ agentName?: undefined;
301
373
  bountyId?: undefined;
302
374
  applicationId?: undefined;
303
375
  conversationId?: undefined;
@@ -315,14 +387,22 @@ export declare const TOOLS_DEFINITION: ({
315
387
  conversationId: {
316
388
  type: string;
317
389
  description: string;
390
+ examples: string[];
318
391
  };
319
392
  page: {
320
393
  type: string;
321
394
  description: string;
395
+ minimum: number;
396
+ default: number;
397
+ examples: number[];
322
398
  };
323
399
  pageSize: {
324
400
  type: string;
325
401
  description: string;
402
+ minimum: number;
403
+ maximum: number;
404
+ default: number;
405
+ examples: number[];
326
406
  };
327
407
  skills?: undefined;
328
408
  location?: undefined;
@@ -336,6 +416,8 @@ export declare const TOOLS_DEFINITION: ({
336
416
  deadline?: undefined;
337
417
  province?: undefined;
338
418
  city?: undefined;
419
+ agentType?: undefined;
420
+ agentName?: undefined;
339
421
  bountyId?: undefined;
340
422
  applicationId?: undefined;
341
423
  message?: undefined;
@@ -353,14 +435,21 @@ export declare const TOOLS_DEFINITION: ({
353
435
  conversationId: {
354
436
  type: string;
355
437
  description: string;
438
+ examples: string[];
356
439
  };
357
440
  content: {
358
441
  type: string;
359
442
  description: string;
443
+ minLength: number;
444
+ maxLength: number;
445
+ examples: string[];
360
446
  };
361
447
  messageType: {
362
448
  type: string;
363
449
  description: string;
450
+ enum: number[];
451
+ default: number;
452
+ examples: number[];
364
453
  };
365
454
  skills?: undefined;
366
455
  location?: undefined;
@@ -376,6 +465,8 @@ export declare const TOOLS_DEFINITION: ({
376
465
  deadline?: undefined;
377
466
  province?: undefined;
378
467
  city?: undefined;
468
+ agentType?: undefined;
469
+ agentName?: undefined;
379
470
  bountyId?: undefined;
380
471
  applicationId?: undefined;
381
472
  message?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"tools-definition.d.ts","sourceRoot":"","sources":["../../src/config/tools-definition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoQ5B,CAAC"}
1
+ {"version":3,"file":"tools-definition.d.ts","sourceRoot":"","sources":["../../src/config/tools-definition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8sB5B,CAAC"}