-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtools.json
More file actions
1295 lines (1295 loc) · 92.9 KB
/
tools.json
File metadata and controls
1295 lines (1295 loc) · 92.9 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
[
{
"toolSpecification": {
"description": "Execute the specified shell (CMD or Powershell) command.\n\n# Rules\n- Avoid using cli commands for search and discovery like cat, find, grep, ls, and instead use the grepSearch, fileSearch, readFile, and readMultipleFiles tools\n- Avoid using cli commands for file writing like mkdir or piping, instead using fsWrite (folders are managed for you)\n- NEVER use the 'cd' command! If you wish to run a command in a subdirectory of the workspace, provide the relative path in the 'cwd' parameter.\n- USING THE 'cd' command will result in a failure.\n- AVOID long-running commands like development servers (npm run dev, yarn start), build watchers (webpack --watch), or interactive commands (vim, nano). These can block execution and cause issues. Run them using the controlPwshProcess tool with action \"start\" instead.\n- If you are certain a command will complete quickly despite triggering a warning, you can use ignoreWarning: true to bypass the check.\n- When using paths directly in the commands, ensure they are relative to the current working directory. BAD: cwd: src, command: mkdir src/tests GOOD: cwd: src, command mkdir tests\n",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "Shell command to execute"
},
"cwd": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"description": "Current working directory. The command will run in this directory. Defaults to workspace root if omitted."
}
],
"description": "Current working directory. The command will run in this directory. Defaults to workspace root if omitted."
},
{
"type": "null"
}
],
"description": "Current working directory. The command will run in this directory. Defaults to workspace root if omitted."
},
"ignoreWarning": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "boolean",
"description": "Set to true to bypass long-running command warnings. Use only when you are certain the command will complete quickly."
}
],
"description": "Set to true to bypass long-running command warnings. Use only when you are certain the command will complete quickly."
},
{
"type": "null"
}
],
"description": "Set to true to bypass long-running command warnings. Use only when you are certain the command will complete quickly."
},
"timeout": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "number",
"description": "Optional timeout in milliseconds for command execution. If not specified, commands will run without a timeout (infinite). If the command exceeds the specified timeout, the latest output will be returned and the agent can continue."
}
],
"description": "Optional timeout in milliseconds for command execution. If not specified, commands will run without a timeout (infinite). If the command exceeds the specified timeout, the latest output will be returned and the agent can continue."
},
{
"type": "null"
}
],
"description": "Optional timeout in milliseconds for command execution. If not specified, commands will run without a timeout (infinite). If the command exceeds the specified timeout, the latest output will be returned and the agent can continue."
},
"warning": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"description": "Optional warning to display to the user alongside the command execution. Only use this field when running property based tests or running test suites that contain property based tests"
}
],
"description": "Optional warning to display to the user alongside the command execution. Only use this field when running property based tests or running test suites that contain property based tests"
},
{
"type": "null"
}
],
"description": "Optional warning to display to the user alongside the command execution. Only use this field when running property based tests or running test suites that contain property based tests"
},
"skipPruning": {
"type": "boolean",
"description": "Only set to true when you need the complete unmodified command output. Default (false) allows intelligent pruning which is preferred for most commands.",
"default": false
},
"explanation": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"description": "One sentence explanation of why this command is being run and what information you expect from the output. This helps intelligently prune large outputs."
}
],
"description": "One sentence explanation of why this command is being run and what information you expect from the output. This helps intelligently prune large outputs."
},
{
"type": "null"
}
],
"description": "One sentence explanation of why this command is being run and what information you expect from the output. This helps intelligently prune large outputs."
}
},
"required": [
"command"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "executePwsh"
}
},
{
"toolSpecification": {
"description": "Control background processes by starting or stopping them. This tool combines process management functionality into a single interface.\n\n# ACTIONS:\n- \"start\": Execute a shell (CMD or Powershell) command as a background process. Designed for commands that don't terminate quickly (like dev servers, build watchers, etc.).\n- \"stop\": Terminate a background process and close its terminal, cleaning up resources.\n\n# START ACTION:\nIf a process already exists for the same command and working directory, it will be reused. Once a process is started you can read its output using the getProcessOutput tool and list all ongoing processes using the listProcesses tool.\n\n## Examples:\n- npm run dev (development servers)\n- webpack --watch (build watchers) \n- python manage.py runserver (Django dev server)\n- yarn start (React development server)\n\n## Parameters for \"start\":\n- action: \"start\"\n- command: (required) The command of the background process\n- cwd: (optional) The working directory path where the process is supposed to run\n\n## Returns for \"start\":\n- terminalId: a unique identifier of the process\n- isReused: indicates whether a process was reused\n\n# STOP ACTION:\nStops a background process that was started with the \"start\" action and cleans up its associated resources.\n\n## Parameters for \"stop\":\n- action: \"stop\"\n- terminalId: (required) The unique identifier of the background process (returned by \"start\" action or found in listProcesses)\n\n## Returns for \"stop\":\n- success: boolean indicating if termination was successful\n- message: descriptive message about the operation\n\n# RULES\n- USE \"start\" exclusively for long-running commands like development servers (npm run dev, yarn start) and build watchers (webpack --watch).\n- NEVER use the 'cd' command! If you wish to run a command in a subdirectory of the workspace, provide the relative path in the 'cwd' parameter.\n- USING THE 'cd' command will result in a failure.\n\n# NOTES\n- The \"start\" action returns immediately without waiting for the process to complete, allowing you to continue with other tasks while the process runs in the background.\n- If a process with the same command and working directory is already running, it will be reused instead of creating a new process.\n- A terminated process cannot be started again with the same terminalId. But an equivalent process can be started again with the \"start\" action, which may result in a different terminalId.",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"start",
"stop"
],
"description": "The action to perform: \"start\" to create a new background process, \"stop\" to terminate an existing process"
},
"command": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string"
}
]
},
{
"type": "null"
}
],
"description": "The shell command to execute as a background process (required for \"start\" action)"
},
"cwd": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"description": "Current working directory. The command will run in this directory. Defaults to workspace root if omitted."
}
],
"description": "Current working directory. The command will run in this directory. Defaults to workspace root if omitted."
},
{
"type": "null"
}
],
"description": "Current working directory. The command will run in this directory. Defaults to workspace root if omitted."
},
"terminalId": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string"
}
]
},
{
"type": "null"
}
],
"description": "The unique identifier of the background process to terminate (required for \"stop\" action)"
}
},
"required": [
"action"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "controlPwshProcess"
}
},
{
"toolSpecification": {
"description": "List all background processes currently managed by Kiro. This tool shows all background processes that have been started using the controlPwshProcess tool, including their current status, commands and working directories. This is useful for monitoring active development processes and checking which servers are running.\n\n# RETURNS:\n- processes: a list of background processes with terminalId, command, path, status:\n - terminalId: unique identifier for the process\n - command: the command that is being executed\n - path: the working directory path\n - status: current status (running, stopped, unknown)",
"inputSchema": {
"json": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "listProcesses"
}
},
{
"toolSpecification": {
"description": "Read the output from a background process. This tool allows you to monitor the output of background processes started with the controlPwshProcess tool. This is useful for:\n- Checking if a development server started successfully\n- Debugging build errors in watch processes\n- Monitoring the status or viewing logs of background processes\n\n# PARAMETERS:\n- terminalId: (required) The unique identifier of the background process (returned by controlPwshProcess or found in listProcesses)\n- lines: number of lines to limit output (useful for large outputs)\n\n# RETURNS:\n- output: the terminal output as text\n\n# NOTES:\n- The output includes both stdout and stderr from the terminal.\n- Use the terminalId returned by controlPwshProcess or found in listProcesses.",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"terminalId": {
"type": "string",
"description": "The unique identifier of the background process to read output from"
},
"lines": {
"type": "number",
"description": "Optional number of lines to limit output (if specified returns the X most recent lines; defaults to 100 lines)"
},
"skipPruning": {
"type": "boolean",
"default": false,
"description": "Only set to true when you need the complete unmodified process output. Default (false) allows intelligent pruning which is preferred for most reads."
},
"explanation": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"description": "One sentence explanation of why you are reading this process output and what information you need. This helps intelligently prune large outputs."
}
],
"description": "One sentence explanation of why you are reading this process output and what information you need. This helps intelligently prune large outputs."
},
{
"type": "null"
}
],
"description": "One sentence explanation of why you are reading this process output and what information you need. This helps intelligently prune large outputs."
}
},
"required": [
"terminalId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "getProcessOutput"
}
},
{
"toolSpecification": {
"description": "Tool for listing directory contents. Content is returned in the \"long format\" similar to `ls -la`.\n\nExample Usage:\n1. List the files in the home directory: path=\"~\"\n2. Recursively list files in a directory to a max depth of 2: path=\"/path/to/directory\", depth=2\n",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to directory, the path should be absolute, or otherwise start with ~ for the user's home. e.g. `repo`, `src`."
},
"explanation": {
"type": "string",
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal."
},
"depth": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "number",
"description": "Depth of a recursive directory listing (optional)"
}
],
"description": "Depth of a recursive directory listing (optional)"
},
{
"type": "null"
}
],
"description": "Depth of a recursive directory listing (optional)"
},
"skipPruning": {
"type": "boolean",
"default": false,
"description": "Only set to true when you need the complete unmodified directory listing. Default (false) allows intelligent pruning which is preferred for most reads."
}
},
"required": [
"path",
"explanation"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "listDirectory"
}
},
{
"toolSpecification": {
"description": "Tool for reading a single file with optional line range specification. This tool reads the content of one file and can optionally limit the output to specific line ranges.\n\nExample Usage:\n- Read entire file: path=\"file.txt\"\n- Read specific lines: path=\"file.txt\", start_line=5, end_line=10\n- Read from line 5 to end: path=\"file.txt\", start_line=5\n- Read first 10 lines: path=\"file.txt\", end_line=10\n\nRules:\n1. Use line ranges to focus on relevant sections of large files only when absolutely necessary. Prefer reading entire files.\n2. For reading multiple files, use the readMultipleFiles tool instead\n\nContent Pruning:\nBy default, large files are intelligently pruned to extract only the most relevant sections based on your explanation. This is the preferred behavior for most reads.\nOnly set skipPruning=true when you genuinely need the complete unmodified file. Do not overuse skipPruning.\nIf you need the full file, use skipPruning=true instead of writing \"need complete file\" or similar in the explanation field.\n",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to file to read, should be relative to workspace root. e.g. 'file.py' or 'src/main.ts', or in ~/.kiro"
},
"start_line": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "number",
"description": "Starting line number (optional).",
"default": 1
}
],
"description": "Starting line number (optional)."
},
{
"type": "null"
}
],
"description": "Starting line number (optional)."
},
"end_line": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "number",
"description": "Ending line number (optional).",
"default": -1
}
],
"description": "Ending line number (optional)."
},
{
"type": "null"
}
],
"description": "Ending line number (optional)."
},
"explanation": {
"type": "string",
"description": "One or two sentences explaining as to why this tool is being used, and how it contributes to the goal. This will be used to intelligently prune file content, so provide context about the current task and what specific information you need from the file."
},
"skipPruning": {
"type": "boolean",
"default": false,
"description": "Only set to true when you need the complete unmodified file content. Default (false) allows intelligent pruning which is preferred for most reads."
}
},
"required": [
"path",
"explanation"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "readFile"
}
},
{
"toolSpecification": {
"description": "Tool for reading multiple files with optional line range specification. This tool reads the content of multiple files and can optionally limit the output to specific line ranges.\n\nExample Usage:\n- Read multiple files: paths=[\"file1.txt\", \"file2.txt\"]\n- Read specific lines from multiple files: paths=[\"file1.txt\", \"file2.txt\"], start_line=5, end_line=10\n- Read from line 5 to end: paths=[\"file1.txt\", \"file2.txt\"], start_line=5\n- Read first 10 lines: paths=[\"file1.txt\", \"file2.txt\"], end_line=10\n\nRules:\n1. Reading multiple files at once is preferred over multiple single-file reads\n2. Use line ranges to focus on relevant sections of large files only when absolutely necessary. Prefer reading entire files.\n3. For reading a single file, use the readFile tool instead\n\nContent Pruning:\nBy default, large files are intelligently pruned to extract only the most relevant sections based on your explanation. This is the preferred behavior for most reads.\nOnly set skipPruning=true when you genuinely need the complete unmodified file (e.g., for copying, moving, or full-file refactoring). Do not overuse skipPruning.\nIf you need the full file, use skipPruning=true instead of writing \"need complete file\" or similar in the explanation field.\n",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": {
"type": "string"
},
"description": "Paths to files to read, should be relative to workspace root. e.g. ['file.py', 'src/main.ts'], or in ~/.kiro"
},
"start_line": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "number",
"description": "Starting line number (optional). A negative index represents a line number starting from the end of the file.",
"default": 1
}
],
"description": "Starting line number (optional). A negative index represents a line number starting from the end of the file."
},
{
"type": "null"
}
],
"description": "Starting line number (optional). A negative index represents a line number starting from the end of the file."
},
"end_line": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "number",
"description": "Ending line number (optional). A negative index represents a line number starting from the end of the file.",
"default": -1
}
],
"description": "Ending line number (optional). A negative index represents a line number starting from the end of the file."
},
{
"type": "null"
}
],
"description": "Ending line number (optional). A negative index represents a line number starting from the end of the file."
},
"explanation": {
"type": "string",
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal. This will be used to intelligently prune file content, so provide context about the current task and what specific information you need from the files."
},
"skipPruning": {
"type": "boolean",
"default": false,
"description": "Only set to true when you need the complete unmodified file content. Default (false) allows intelligent pruning which is preferred for most reads."
}
},
"required": [
"paths",
"explanation"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "readMultipleFiles"
}
},
{
"toolSpecification": {
"description": "Fast file search based on fuzzy matching against file path. Use if you know part of the file path but don't know where it's located exactly. Response will be capped to 10 results. Make your query more specific if need to filter results further.",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"explanation": {
"type": "string",
"description": "Fuzzy filename to search for"
},
"query": {
"type": "string",
"description": "The regex pattern to search for"
},
"excludePattern": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"description": "Glob pattern for files to exclude"
}
],
"description": "Glob pattern for files to exclude"
},
{
"type": "null"
}
],
"description": "Glob pattern for files to exclude"
},
"includeIgnoredFiles": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"description": "Whether the search should include .gitignore files, should be the string yes or no"
}
],
"description": "Whether the search should include .gitignore files, should be the string yes or no"
},
{
"type": "null"
}
],
"description": "Whether the search should include .gitignore files, should be the string yes or no"
}
},
"required": [
"explanation",
"query"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "fileSearch"
}
},
{
"toolSpecification": {
"description": "Fast text-based regex search that finds exact pattern matches within files or directories using ripgrep.\nSearch results include line numbers, file paths, and 2 lines of context around each match.\n\nParameters:\n- query (required): The regex pattern to search for. Use Rust regex syntax.\n- caseSensitive (optional): \"yes\" for case-sensitive search, \"no\" or omit for case-insensitive\n- includePattern (optional): Glob pattern for files to include (e.g. '**/*.ts', 'src/**/*.js'). Use ** for recursive search. If omitted, searches all files in workspace\n- excludePattern (optional): Glob pattern for files to exclude (e.g. '*.log', 'node_modules/**')\n- explanation (optional): Brief description of why this search is being performed\n\nSearch Behavior:\n- Use includePattern or excludePattern to filter the search scope by file type or specific paths. If no includePattern is specified, the tool will search all files.\n- The results are capped at 50 matches and long lines are truncated with \"[truncated: line too long]\" indicator.\n- If total output is too large, truncates with \"[truncated: too many matches]\" message.\n\nExamples of VALID patterns to use as \"query\":\n- Basic text search: \"function\", \"error\", \"TODO\"\n- Word boundaries: \"\\bword\\b\" (matches 'word' but not 'password')\n- Multiple words: \"auth.*failed\"\n- File content with spaces: \"not found\"\n- Line starts with: \"^import\"\n- Line ends with: \"};$\"\n- Numbers: \"\\d+\\.\\d+\" (finds decimal numbers like 3.14)\n- Word followed by another: \"function\\s+\\w+\" (finds function declarations)\n\nRules:\n1. Keep regex patterns simple. Complex patterns may fail.\n2. Use includePattern to narrow search scope for better performance\n3. Glob patterns: use standard glob syntax (* for wildcards, ** for recursive). Always use ** for recursive search (e.g. \"**/*.py\" not \"*.py\")\n4. NEVER use bash command \"grep\" to search but use this search tool instead because it is optimized for your machine.\n5. Always escape special regex characters: ( ) [ ] { } + * ? ^ $ | . \\\n6. You MUST use \\\\ to escape any of special regex characters when they appear in your search string.",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"query": {
"type": "string",
"minLength": 1,
"description": "The regex pattern to search for"
},
"caseSensitive": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "boolean",
"description": "Whether the search should be case sensitive"
}
],
"description": "Whether the search should be case sensitive"
},
{
"type": "null"
}
],
"description": "Whether the search should be case sensitive"
},
"excludePattern": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"description": "Glob pattern for files to exclude"
}
],
"description": "Glob pattern for files to exclude"
},
{
"type": "null"
}
],
"description": "Glob pattern for files to exclude"
},
"explanation": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal. This will be used to intelligently prune search results."
}
],
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal. This will be used to intelligently prune search results."
},
{
"type": "null"
}
],
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal. This will be used to intelligently prune search results."
},
"includePattern": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"description": "Glob pattern for files to include (e.g. '**/*.ts' for TypeScript files). Use ** for recursive search"
}
],
"description": "Glob pattern for files to include (e.g. '**/*.ts' for TypeScript files). Use ** for recursive search"
},
{
"type": "null"
}
],
"description": "Glob pattern for files to include (e.g. '**/*.ts' for TypeScript files). Use ** for recursive search"
},
"skipPruning": {
"type": "boolean",
"default": false,
"description": "Only set to true when you need the complete unmodified search results. Default (false) allows intelligent pruning which is preferred for most searches."
}
},
"required": [
"query"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "grepSearch"
}
},
{
"toolSpecification": {
"description": "Deletes a file at the specified path. The operation will fail gracefully if:\n - The file doesn't exist\n - The operation is rejected for security reasons\n - The file cannot be deleted",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"explanation": {
"type": "string",
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal."
},
"targetFile": {
"type": "string",
"description": "The path of the file to delete, relative to the workspace root."
}
},
"required": [
"explanation",
"targetFile"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "deleteFile"
}
},
{
"toolSpecification": {
"description": "A tool for creating files, will override the file at `path` if it already exists as a file, and otherwise create a new file. If the content is larger than 50 lines, use create with part of the content and then use `fsAppend` to add more content.",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to file or directory, e.g. `file.py` or `repo`."
},
"text": {
"type": "string",
"description": "Contents to write into the file."
}
},
"required": [
"path",
"text"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "fsWrite"
}
},
{
"toolSpecification": {
"description": "Append text content to the end of an existing file without overwriting existing content.\n Automatically handles newline formatting by adding a newline before the new content if the file doesn't end with one.\n \n Parameters:\n - path (required) Relative path to the existing file from workspace root, e.g. 'src/utils.py'\n - text (required) Text content to append to the end of the file.\n \n When to use:\n - Adding content to existing files (like adding functions to a module, appending to logs, or extending configuration files).\n \n Rules:\n - The target file (specified in 'path') MUST already exist. If it doesn't, you must use fsWrite instead.\n - If the file does not exist, the operation will fail.",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Relative path to the existing file from workspace root."
},
"text": {
"type": "string",
"description": "Text content to append to the end of the file."
}
},
"required": [
"path",
"text"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "fsAppend"
}
},
{
"toolSpecification": {
"description": "A tool for replacing text in files. Especially useful for long files where much of the file will remain unchanged.\nParameters:\n- path: (required) the path to the file where replacements are requested.\n- oldStr (required)\n- newStr: (required)\n\nParameters Rules:\n- Each invoke must contain \"path\", \"oldStr\", and \"newStr\".\n- \"newStr\" should contain the edited lines that should replace the \"oldStr\".\n\nWhen making edits:\n- Ensure the edit results in idiomatic, correct code\n- Do not leave the code in a broken state\n- Ensure the path exists\n\nCRITICAL REQUIREMENTS FOR USING THIS TOOL:\n1. EXACT MATCHING: \"oldStr\" must match EXACTLY one or more consecutive lines from the file.\n2. WHITESPACES: All whitespace must match exactly (spaces, tabs, line endings). This is extra important in indentation-sensitive languages like Python.\nThe tool will fail if \"oldStr\" matches multiple locations or doesn't match exactly with the file content.\n3. UNIQUENESS: \"oldStr\" must uniquely identify a single instance in the file:\n - Include sufficient context before and after the change point (2-3 lines recommended)\n - If not unique, the replacement will not be performed\n4. REPLACEMENT: \"newStr\" should contain the edited lines that replace the \"oldStr\". These strings MUST BE DIFFERENT.\n5. PARALLEL TOOL CALLS: When performing multiple independent string replacements, invoke the 'strReplace' tool multiple times simultaneously in the same turn rather than sequentially. Prioritize calling this tool in parallel whenever possible.",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to file, e.g. `file.py` or `repo/file.js`."
},
"oldStr": {
"type": "string",
"description": "Required parameter containing the string in `path` to replace."
},
"newStr": {
"type": "string",
"description": "Required parameter containing the new string that will replace the `oldStr`."
}
},
"required": [
"path",
"oldStr",
"newStr"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "strReplace"
}
},
{
"toolSpecification": {
"description": "A tool for renaming a symbol (variables, functions, classes, etc.) across the codebase.\nThis tool finds all references to a symbol and renames them consistently.\n\nParameters:\n- path: (required) the relative path to the file containing the symbol to rename\n- line: (required) the line number where the symbol is located (0-indexed, first line is 0)\n- character: (required) the character position on the line where the symbol starts (0-indexed, first character is 0)\n- oldName: (required) the current name of the symbol to be renamed\n- newName: (required) the new name for the symbol\n\nWhen to use:\n- Renaming variables, parameters, functions, classes, interfaces, other renameable code symbols\n- Updating all references across the codebase\n\nIMPORTANT NOTES:\n1. The position should point to the start of the symbol name, NOT before it\n2. The oldName must match the actual symbol name for validation\n3. The newName must be a valid identifier for the language\n\nAFTER USING THIS TOOL:\n- DO NOT search for or verify the changes were made - the tool handles this\n- DO NOT run diagnostics to confirm the rename - trust the tool's success message\n- DO NOT read files to check if the rename worked - it's unnecessary",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to file containing the symbol, e.g. `file.py` or `repo/file.js`."
},
"line": {
"type": "number",
"description": "Line number where the symbol is located (0-indexed, first line is 0). The tool will search nearby lines if not exact."
},
"character": {
"type": "number",
"description": "Character position on the line where the symbol starts (0-indexed, first character is 0). The tool will search nearby positions if not exact."
},
"oldName": {
"type": "string",
"description": "The current name of the symbol to rename (used for validation). Must match the actual symbol name."
},
"newName": {
"type": "string",
"description": "The new name for the symbol. Must be a valid identifier."
}
},
"required": [
"path",
"line",
"character",
"oldName",
"newName"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "semanticRename"
}
},
{
"toolSpecification": {
"description": "A tool for moving or renaming files with AUTOMATIC import/reference updates across the codebase.\nThis tool replicates VS Code's built-in file move behavior - it moves a file and AUTOMATICALLY updates import statements and references in other files.\n\nParameters:\n- sourcePath: (required) the current relative path to the file to move\n- destinationPath: (required) the new relative path where the file should be moved\n\nWhen to use:\n- Moving source files to different directories\n- Renaming files while maintaining all imports\n- Reorganizing project structure\n- Any file move that requires updating imports/references\n\nIMPORTANT NOTES:\n1. Both paths should be relative to the workspace root\n2. The destination directory will be created if it doesn't exist\n3. import statements referencing this file will be AUTOMATICALLY updated across the entire codebase\n4. All changes (file move + import updates) are saved automatically",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"sourcePath": {
"type": "string",
"description": "Current path to the file to move, relative to workspace root, e.g. `src/utils/helper.ts`."
},
"destinationPath": {
"type": "string",
"description": "New path where the file should be moved, relative to workspace root, e.g. `src/lib/helper.ts`."
}
},
"required": [
"sourcePath",
"destinationPath"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "smartRelocate"
}
},
{
"toolSpecification": {
"description": "Tool to manage and use Kiro Powers.\n\n**About Powers:** Powers package documentation, workflow guides (steering files), and optionally MCP servers. When a power includes MCP servers, their tools are accessed through this interface rather than exposed directly, loading tool definitions and more detailed instructions via \"activate\". This keeps your context focused while providing full access to capabilities on-demand. This approach provides:\n\n- **Minimal context**: See 5 actions for all powers instead of dozens of tools per power\n- **Structured discovery**: Use \"activate\" to discover what capabilities a power provides on-demand - returns comprehensive documentation (POWER.md content), all available tools grouped by MCP server with their descriptions and input schemas, and available steering files for guided workflows\n- **Full functionality**: \"activate\" provides all information needed to effectively use a power - documentation for understanding, steering file lists for workflows, and complete tool schemas with parameters for MCP servers contained in the power, enabling execution through the \"use\" action\n- **Guided workflows**: POWER.md files and steering guides provide context for optimal usage\n\n**PROACTIVE POWER ACTIVATION:** When you see words or topics in the user's message that match the keywords for any installed power, you should **strongly consider activating that power immediately**. The keywords indicate the power's domain of expertise. For example, if a power has keywords like \"docs\", \"documentation\", \"api\" and the user asks about documentation, you should proactively activate that power to access its capabilities.\n\n**Currently Installed Powers:** None\n\n\n**Important Note:** If the user asks about building or creating custom powers, check if the \"Build a Power\" power is installed in the list above. If not installed, use action=\"configure\" to open the configure power panel and ask the user to install the \"Build a Power\" power from the panel.\n\n# ACTIONS:\n\n1. **LIST** (\"list\") - See all installed powers\n **Parameters:** None\n\n **Returns:** Formatted list with:\n - **name**: The power's identifier (used in other actions)\n - **description**: What the power does\n - **keywords**: Search terms describing the power's capabilities\n - **MCP servers**: Backend servers that provide the power's tools\n\n **When to use:**\n - To discover what powers are currently installed\n - To find power names for use in other actions\n - To see what capabilities are available\n\n **CRITICAL - KEYWORD MATCHING:** When you see ANY words in the user's message that match a power's keywords, you should **immediately and proactively activate that power**. Keywords are specifically chosen to indicate the power's domain. Don't wait for the user to explicitly ask - if they mention topics related to the keywords, activate the power right away. Examples:\n - User mentions \"docs\" or \"documentation\" \u2192 If a power has \"docs\" keywords, activate it immediately\n - User asks about \"weather\" \u2192 If a power has \"weather\", \"forecast\" keywords, activate it\n - User talks about \"database\" or \"sql\" \u2192 If a power has those keywords, activate it\n\n The keyword match is your strongest signal to activate a power proactively!\n\n **Example:** action=\"list\"\n\n2. **ACTIVATE** (\"activate\") - **IMPORTANT: ALWAYS call this FIRST when you need to use a power!**\n **Parameters:**\n - powerName (required): Name of the power to activate\n\n **Returns:** Comprehensive documentation including:\n - overview: Complete POWER.md content with all documentation\n - toolsByServer: All MCP tools grouped by server with descriptions and input schemas\n - steeringFiles: List of available detailed workflow guides\n - powerMdFound: Whether POWER.md documentation was found\n - Metadata: powerName, displayName, keywords, description\n\n Activating a power before using it helps you understand the correct tool names, required parameters, and optimal workflows needed to successfully use the power.\n\n **Example:** action=\"activate\", powerName=\"weather-power\"\n\n3. **USE** (\"use\") - **IMPORTANT: Call action=\"activate\" FIRST before using this action!**\n **Parameters:**\n - powerName (required): The power to use\n - serverName (required): The MCP server within the power - get from toolsByServer keys in activate response\n - toolName (required): Specific tool within the server - get from toolsByServer[serverName] array in activate response\n - arguments (required): Tool parameters matching the inputSchema from activate response\n\n **Returns:** Tool execution result from MCP server\n\n **Workflow:**\n 1. Call action=\"activate\" with powerName to get the power's toolsByServer map\n 2. Review toolsByServer to identify which server has your desired tool\n 3. Extract the serverName (key) and toolName from toolsByServer\n 4. Check the tool's inputSchema to understand required parameters\n 5. Call action=\"use\" with powerName, serverName, toolName, and arguments\n\n **CRITICAL: You MUST provide serverName from the activate response. Powers can have multiple MCP servers, and tools may exist on different servers.**\n\n **Example:** action=\"use\", powerName=\"weather-power\", serverName=\"weather-api\", toolName=\"get_forecast\", arguments={\"location\":\"Seattle\",\"units\":\"imperial\"}\n\n4. **READ_STEERING** (\"readSteering\") - Get detailed workflow guides\n **Parameters:**\n - powerName (required): Name of the power\n - steeringFile (required): Steering file name (including .md extension) - must be one from steeringFiles array in activate response\n\n **Returns:** Markdown content with detailed instructions for specific workflows, advanced patterns, or specialized use cases.\n\n **When to use:** After calling action=\"activate\" to get the steeringFiles array, call this action to read a specific steering file for detailed workflow guidance.\n\n **Example:** action=\"readSteering\", powerName=\"weather-power\", steeringFile=\"getting-started.md\"\n\n5. **CONFIGURE** (\"configure\") - Open powers management panel\n **Parameters:** None\n\n Opens the Powers side panel where users can browse, install, and manage powers through a visual interface. Returns a success confirmation message.\n\n **When to use:**\n - When the user wants to install new powers\n - When the user wants to browse or discover available powers\n - When the user asks to see available powers in a UI\n - When the user wants to manage their installed powers\n\n **IMPORTANT:** If the user asks to install a power or browse available powers, call this action immediately to open the management panel.\n\n **Example:** action=\"configure\"\n\n# CRITICAL RULES:\n- **NEVER call action=\"use\" without calling action=\"activate\" first** - you will fail if you guess\n- Tool names and input schemas come from the activate response (don't guess!)\n- Review toolsByServer and inputSchema from activate response before using\n- Power names are case-sensitive\n- Guessing server names, tool names, or parameters will fail",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"list",
"activate",
"use",
"readSteering",
"configure"
],
"description": "The action to perform: \"list\" to discover installed powers, \"activate\" to get documentation, \"use\" to execute power tools, \"readSteering\" for guides, \"configure\" to open config file"
},
"powerName": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string"
}
]
},
{
"type": "null"
}
],
"description": "Name of the power (required for activate, use, readSteering actions; not used for list or configure)"
},
"serverName": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string"
}
]
},
{
"type": "null"
}
],
"description": "Name of the MCP server within the power (REQUIRED for use action - get from toolsByServer in activate response)"
},
"toolName": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string"
}
]
},
{
"type": "null"
}
],
"description": "Name of the tool to execute within the power (required for use action)"
},
"arguments": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "object",
"additionalProperties": {}
}
]
},
{
"type": "null"
}
],
"description": "Arguments object for the tool being called (use action only, get schema from activate action)"
},
"steeringFile": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string"
}
]
},
{
"type": "null"
}
],
"description": "Name of the steering file to read (REQUIRED for readSteering action - get from steeringFiles array in activate response, including .md extension)"
}
},
"required": [
"action"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"name": "kiroPowers"
}
},
{
"toolSpecification": {
"description": "Creates a new hook that automates agent actions based on IDE events.\n\nWhat is a hook?\nA hook maps IDE events (file changes, prompts, etc.) to agent actions. When the event occurs, the specified action runs automatically.\n\nIMPORTANT: When the user explicitly specifies an event type (e.g., \"preToolUse\" or \"postToolUse\"), you MUST use exactly that event type. Do NOT substitute a different event type based on your own judgment. The user's explicit instruction takes precedence.\n\nExamples:\nGood (askAgent with file event):\n eventType: \"fileEdited\", hookAction: \"askAgent\", outputPrompt: \"Review changes\", filePatterns: \"*.ts\"\n\nGood (runCommand with file event):\n eventType: \"fileEdited\", hookAction: \"runCommand\", command: \"npm run lint\", filePatterns: \"*.ts\"\n\nGood (runCommand with manual trigger):\n eventType: \"userTriggered\", hookAction: \"runCommand\", command: \"npm run build\"\n\nGood (runCommand with prompt event):\n eventType: \"promptSubmit\", hookAction: \"runCommand\", command: \"npm run lint\"\n \nGood (askAgent with preToolUse using tool categories):\n eventType: \"preToolUse\", hookAction: \"askAgent\", outputPrompt: \"Verify this write operation is safe\", toolTypes: \"write\"\n\nGood (askAgent with postToolUse to review results):\n eventType: \"postToolUse\", hookAction: \"askAgent\", outputPrompt: \"Review the tool execution result and suggest improvements\", toolTypes: \"write\"\n\nGood (askAgent with preToolUse for MCP tools using regex):\n eventType: \"preToolUse\", hookAction: \"askAgent\", outputPrompt: \"Review this database operation\", toolTypes: \".*sql.*\"\n\nGood (askAgent with preTaskExecution before task starts):\n eventType: \"preTaskExecution\", hookAction: \"askAgent\", outputPrompt: \"Review the task requirements before starting\"\n\nGood (runCommand with postTaskExecution after task completes):\n eventType: \"postTaskExecution\", hookAction: \"runCommand\", command: \"npm run test\"\n\nFor file-based events that need to run commands, use askAgent with instructions:\n eventType: \"fileEdited\", hookAction: \"askAgent\", outputPrompt: \"Run npm run lint and fix errors\", filePatterns: \"*.ts\"",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"why": {
"type": "string",
"description": "One short sentence on why you are doing this"
},
"id": {
"type": "string",
"description": "A short 3 word dashed id like my-new-hook"
},
"name": {
"type": "string",
"description": "The title of the hook, short and sweet"
},
"description": {
"type": "string",
"description": "The description of what the hook does in natural language for the user"
},
"eventType": {
"type": "string",
"description": "The type of IDE event to listen for. Valid values: fileEdited, fileCreated, fileDeleted, userTriggered, promptSubmit, agentStop, preToolUse, postToolUse, preTaskExecution, postTaskExecution"
},
"filePatterns": {
"type": [
"string",
"null"
],
"description": "A comma separated list of file paths to listen for changes to, required for file-based hook triggers like fileEdited, fileCreated, fileDeleted"
},
"toolTypes": {
"type": [
"string",
"null"
],
"description": "A comma separated list of tool type categories or regex patterns to trigger on, required for preToolUse and postToolUse hooks. Valid built-in categories: read, write, shell, web, spec, *. For MCP tools, use a regex pattern to match tool names (e.g., \".*sql.*\" matches any tool with \"sql\" in the name). Use \"*\" to trigger on all tools."
},
"hookAction": {
"type": "string",
"description": "The action the hook should take, can be either askAgent, or runCommand"
},