forked from TencentCloudBase/CloudBase-MCP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.json
More file actions
1329 lines (1329 loc) · 39.4 KB
/
tools.json
File metadata and controls
1329 lines (1329 loc) · 39.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"name": "cloudbase-mcp",
"version": "1.8.1",
"description": "腾讯云开发 MCP Server,支持静态托管/环境查询/云函数/云数据库等功能",
"tools": [
{
"name": "login",
"description": "登录云开发环境并选择要使用的环境",
"inputSchema": {
"type": "object",
"properties": {
"forceUpdate": {
"type": "boolean",
"description": "是否强制重新选择环境"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "logout",
"description": "退出云开发环境",
"inputSchema": {
"type": "object",
"properties": {
"confirm": {
"type": "string",
"const": "yes",
"description": "确认操作,默认传 yes"
}
},
"required": [
"confirm"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "envQuery",
"description": "查询云开发环境相关信息,支持查询环境列表、当前环境信息和安全域名。(原工具名:listEnvs/getEnvInfo/getEnvAuthDomains,为兼容旧AI规则可继续使用这些名称)",
"inputSchema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"list",
"info",
"domains"
],
"description": "查询类型:list=环境列表,info=当前环境信息,domains=安全域名列表"
}
},
"required": [
"action"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "envDomainManagement",
"description": "管理云开发环境的安全域名,支持添加和删除操作。(原工具名:createEnvDomain/deleteEnvDomain,为兼容旧AI规则可继续使用这些名称)",
"inputSchema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"create",
"delete"
],
"description": "操作类型:create=添加域名,delete=删除域名"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "安全域名数组"
}
},
"required": [
"action",
"domains"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "updateEnvInfo",
"description": "更新云开发环境信息",
"inputSchema": {
"type": "object",
"properties": {
"alias": {
"type": "string",
"description": "环境别名"
}
},
"required": [
"alias"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "searchKnowledgeBase",
"description": "云开发知识库智能检索工具,支持云开发与云函数知识的向量查询",
"inputSchema": {
"type": "object",
"properties": {
"threshold": {
"type": "number",
"default": 0.5,
"description": "相似性检索阈值"
},
"id": {
"type": "string",
"enum": [
"cloudbase",
"scf",
"miniprogram"
],
"description": "知识库范围,cloudbase=云开发全量知识,scf=云开发的云函数知识, miniprogram=小程序知识(不包含云开发与云函数知识)"
},
"content": {
"type": "string",
"description": "检索内容"
},
"options": {
"type": "object",
"properties": {
"chunkExpand": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2,
"default": [
3,
3
],
"description": "指定返回的文档内容的展开长度,例如 [3,3]代表前后展开长度"
}
},
"additionalProperties": false,
"description": "其他选项"
},
"limit": {
"type": "number",
"default": 5,
"description": "指定返回最相似的 Top K 的 K 的值"
}
},
"required": [
"id",
"content"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "createCollection",
"description": "创建一个新的云开发数据库集合",
"inputSchema": {
"type": "object",
"properties": {
"collectionName": {
"type": "string",
"description": "云开发数据库集合名称"
}
},
"required": [
"collectionName"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "collectionQuery",
"description": "数据库集合的查询操作,支持检查存在性、查看详情和列表查询。(原工具名:checkCollectionExists/describeCollection/listCollections,为兼容旧AI规则可继续使用这些名称)",
"inputSchema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"check",
"describe",
"list"
],
"description": "操作类型:check=检查是否存在,describe=查看详情,list=列表查询"
},
"collectionName": {
"type": "string",
"description": "集合名称(check、describe操作时必填)"
},
"limit": {
"type": "number",
"description": "返回数量限制(list操作时可选)"
},
"offset": {
"type": "number",
"description": "偏移量(list操作时可选)"
}
},
"required": [
"action"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "updateCollection",
"description": "更新云开发数据库集合配置(创建或删除索引)",
"inputSchema": {
"type": "object",
"properties": {
"collectionName": {
"type": "string",
"description": "云开发数据库集合名称"
},
"options": {
"type": "object",
"properties": {
"CreateIndexes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"IndexName": {
"type": "string"
},
"MgoKeySchema": {
"type": "object",
"properties": {
"MgoIsUnique": {
"type": "boolean"
},
"MgoIndexKeys": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"Direction": {
"type": "string"
}
},
"required": [
"Name",
"Direction"
],
"additionalProperties": false
}
}
},
"required": [
"MgoIsUnique",
"MgoIndexKeys"
],
"additionalProperties": false
}
},
"required": [
"IndexName",
"MgoKeySchema"
],
"additionalProperties": false
}
},
"DropIndexes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"IndexName": {
"type": "string"
}
},
"required": [
"IndexName"
],
"additionalProperties": false
}
}
},
"additionalProperties": false,
"description": "更新选项,支持创建和删除索引"
}
},
"required": [
"collectionName",
"options"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "checkIndexExists",
"description": "检查索引是否存在",
"inputSchema": {
"type": "object",
"properties": {
"collectionName": {
"type": "string",
"description": "云开发数据库集合名称"
},
"indexName": {
"type": "string",
"description": "索引名称"
}
},
"required": [
"collectionName",
"indexName"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "distribution",
"description": "查询数据库中云开发数据库集合的数据分布情况",
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "insertDocuments",
"description": "向云开发数据库集合中插入一个或多个文档",
"inputSchema": {
"type": "object",
"properties": {
"collectionName": {
"type": "string",
"description": "云开发数据库集合名称"
},
"documents": {
"type": "array",
"items": {
"type": "string"
},
"description": "要插入的文档JSON 字符串数组,每个文档都是 JSON字符串,注意不是JSON对象"
}
},
"required": [
"collectionName",
"documents"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "queryDocuments",
"description": "查询云开发数据库集合中的文档",
"inputSchema": {
"type": "object",
"properties": {
"collectionName": {
"type": "string",
"description": "云开发数据库集合名称"
},
"query": {
"type": "string",
"description": "查询条件(JSON字符串)"
},
"projection": {
"type": "string",
"description": "返回字段投影(JSON字符串)"
},
"sort": {
"type": "string",
"description": "排序条件(JSON字符串)"
},
"limit": {
"type": "number",
"description": "返回数量限制"
},
"offset": {
"type": "number",
"description": "跳过的记录数"
}
},
"required": [
"collectionName"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "updateDocuments",
"description": "更新云开发数据库集合中的文档",
"inputSchema": {
"type": "object",
"properties": {
"collectionName": {
"type": "string",
"description": "云开发数据库集合名称"
},
"query": {
"type": "string",
"description": "查询条件(JSON字符串)"
},
"update": {
"type": "string",
"description": "更新内容(JSON字符串)"
},
"isMulti": {
"type": "boolean",
"description": "是否更新多条记录"
},
"upsert": {
"type": "boolean",
"description": "是否在不存在时插入"
}
},
"required": [
"collectionName",
"query",
"update"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "deleteDocuments",
"description": "删除云开发数据库集合中的文档",
"inputSchema": {
"type": "object",
"properties": {
"collectionName": {
"type": "string",
"description": "云开发数据库集合名称"
},
"query": {
"type": "string",
"description": "查询条件(JSON字符串)"
},
"isMulti": {
"type": "boolean",
"description": "是否删除多条记录"
}
},
"required": [
"collectionName",
"query"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "manageDataModel",
"description": "数据模型查询工具,支持查询和列表数据模型(只读操作)。list操作返回基础信息(不含Schema),get操作返回详细信息(含简化的Schema,包括字段列表、格式、关联关系等),docs操作生成SDK使用文档",
"inputSchema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"get",
"list",
"docs"
],
"description": "操作类型:get=查询单个模型(含Schema字段列表、格式、关联关系),list=获取模型列表(不含Schema),docs=生成SDK使用文档"
},
"name": {
"type": "string",
"description": "模型名称(get操作时必填)"
},
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "模型名称数组(list操作时可选,用于过滤)"
}
},
"required": [
"action"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "uploadFiles",
"description": "上传文件到静态网站托管",
"inputSchema": {
"type": "object",
"properties": {
"localPath": {
"type": "string",
"description": "本地文件或文件夹路径,需要是绝对路径,例如 /tmp/files/data.txt"
},
"cloudPath": {
"type": "string",
"description": "云端文件或文件夹路径,例如files/data.txt"
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"localPath": {
"type": "string"
},
"cloudPath": {
"type": "string"
}
},
"required": [
"localPath",
"cloudPath"
],
"additionalProperties": false
},
"default": [],
"description": "多文件上传配置"
},
"ignore": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"description": "忽略文件模式"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "getWebsiteConfig",
"description": "获取静态网站托管配置",
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "deleteFiles",
"description": "删除静态网站托管的文件或文件夹",
"inputSchema": {
"type": "object",
"properties": {
"cloudPath": {
"type": "string",
"description": "云端文件或文件夹路径"
},
"isDir": {
"type": "boolean",
"default": false,
"description": "是否为文件夹"
}
},
"required": [
"cloudPath"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "findFiles",
"description": "搜索静态网站托管的文件",
"inputSchema": {
"type": "object",
"properties": {
"prefix": {
"type": "string",
"description": "匹配前缀"
},
"marker": {
"type": "string",
"description": "起始对象键标记"
},
"maxKeys": {
"type": "number",
"description": "单次返回最大条目数"
}
},
"required": [
"prefix"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "domainManagement",
"description": "统一的域名管理工具,支持绑定、解绑、查询和修改域名配置",
"inputSchema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"create",
"delete",
"check",
"modify"
],
"description": "操作类型: create=绑定域名, delete=解绑域名, check=查询域名配置, modify=修改域名配置"
},
"domain": {
"type": "string",
"description": "域名"
},
"certId": {
"type": "string",
"description": "证书ID(绑定域名时必需)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "域名列表(查询配置时使用)"
},
"domainId": {
"type": "number",
"description": "域名ID(修改配置时必需)"
},
"domainConfig": {
"type": "object",
"properties": {
"Refer": {
"type": "object",
"properties": {
"Switch": {
"type": "string"
},
"RefererRules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"RefererType": {
"type": "string"
},
"Referers": {
"type": "array",
"items": {
"type": "string"
}
},
"AllowEmpty": {
"type": "boolean"
}
},
"required": [
"RefererType",
"Referers",
"AllowEmpty"
],
"additionalProperties": false
}
}
},
"required": [
"Switch"
],
"additionalProperties": false
},
"Cache": {
"type": "array",
"items": {
"type": "object",
"properties": {
"RuleType": {
"type": "string"
},
"RuleValue": {
"type": "string"
},
"CacheTtl": {
"type": "number"
}
},
"required": [
"RuleType",
"RuleValue",
"CacheTtl"
],
"additionalProperties": false
}
},
"IpFilter": {
"type": "object",
"properties": {
"Switch": {
"type": "string"
},
"FilterType": {
"type": "string"
},
"Filters": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"Switch"
],
"additionalProperties": false
},
"IpFreqLimit": {
"type": "object",
"properties": {
"Switch": {
"type": "string"
},
"Qps": {
"type": "number"
}
},
"required": [
"Switch"
],
"additionalProperties": false
}
},
"additionalProperties": false,
"description": "域名配置(修改配置时使用)"
}
},
"required": [
"action"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "getFunctionList",
"description": "获取云函数列表",
"inputSchema": {
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "范围"
},
"offset": {
"type": "number",
"description": "偏移"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "createFunction",
"description": "创建云函数",
"inputSchema": {
"type": "object",
"properties": {
"func": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "函数名称"
},
"timeout": {
"type": "number",
"description": "函数超时时间"
},
"envVariables": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "环境变量"
},
"vpc": {
"type": "object",
"properties": {
"vpcId": {
"type": "string"
},
"subnetId": {
"type": "string"
}
},
"required": [
"vpcId",
"subnetId"
],
"additionalProperties": false,
"description": "私有网络配置"
},
"runtime": {
"type": "string",
"description": "运行时环境,建议指定为 'Nodejs 18.15',其他可选值:Nodejs18.15,Nodejs16.13,Nodejs14.18,Nodejs12.16,Nodejs10.15,Nodejs8.9"
},
"installDependency": {
"type": "boolean",
"description": "是否安装依赖,建议传 true"
},
"triggers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"config": {
"type": "string"
}
},
"required": [
"name",
"type",
"config"
],
"additionalProperties": false
},
"description": "触发器配置"
},
"handler": {
"type": "string",
"description": "函数入口"
},
"ignore": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"description": "忽略文件"
},
"isWaitInstall": {
"type": "boolean",
"description": "是否等待依赖安装"
},
"layers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "number"
}
},
"required": [
"name",
"version"
],
"additionalProperties": false
},
"description": "Layer配置"
}
},
"required": [
"name"
],
"additionalProperties": false,
"description": "函数配置"
},
"functionRootPath": {
"type": "string",
"description": "函数根目录(云函数目录的父目录),这里需要传操作系统上文件的绝对路径,注意:不要包含函数名本身,例如函数名为 'hello',应传入 '/path/to/cloudfunctions',而不是 '/path/to/cloudfunctions/hello'"
},
"force": {
"type": "boolean",
"description": "是否覆盖"
}
},
"required": [
"func",
"force"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "updateFunctionCode",
"description": "更新函数代码",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "函数名称"
},
"functionRootPath": {
"type": "string",
"description": "函数根目录(云函数目录的父目录),这里需要传操作系统上文件的绝对路径"
},
"zipFile": {
"type": "string",
"description": "Base64编码的函数包"
},
"handler": {
"type": "string",
"description": "函数入口"
},
"runtime": {
"type": "string",
"description": "运行时(可选值:Nodejs18.15,Nodejs16.13,Nodejs14.18,Nodejs12.16,Nodejs10.15,Nodejs8.9,默认 Nodejs 18.15)"
},
"installDependency": {
"type": "boolean",
"description": "是否安装依赖"
}
},
"required": [
"name"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "updateFunctionConfig",
"description": "更新云函数配置",
"inputSchema": {
"type": "object",
"properties": {
"funcParam": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "函数名称"
},
"timeout": {
"type": "number",
"description": "超时时间"
},
"envVariables": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "环境变量"
},
"vpc": {
"type": "object",
"properties": {
"vpcId": {
"type": "string"
},
"subnetId": {
"type": "string"
}
},
"required": [
"vpcId",
"subnetId"
],
"additionalProperties": false,
"description": "VPC配置"