-
Notifications
You must be signed in to change notification settings - Fork 436
Expand file tree
/
Copy pathtool_index.json
More file actions
449 lines (449 loc) · 21.6 KB
/
Copy pathtool_index.json
File metadata and controls
449 lines (449 loc) · 21.6 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
{
"dummy": {
"name": "dummy",
"description": "This is a dummy tool. If you are seeing this that means the tool associated with this tool call is not in the list of available tools. This could be because a wrong tool name was supplied or the list of tools has changed since the conversation has started. Do not show this when user asks you to list tools.",
"input_schema": {
"type": "object",
"properties": {},
"required": []
}
},
"introspect": {
"name": "introspect",
"description": "ALWAYS use this tool when users ask ANY question about Q CLI itself, its capabilities, features, commands, or functionality. This includes questions like 'Can you...', 'Do you have...', 'How do I...', 'What can you do...', or any question about Q's abilities. When mentioning commands in your response, always prefix them with '/' (e.g., '/save', '/load', '/context'). CRITICAL: Only provide information explicitly documented in Q CLI documentation. If details about any tool, feature, or command are not documented, clearly state the information is not available rather than generating assumptions.",
"input_schema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The user's question about Q CLI usage, features, or capabilities"
}
},
"required": []
}
},
"execute_bash": {
"name": "execute_bash",
"description": "Execute the specified bash command.",
"input_schema": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "Bash command to execute"
},
"summary": {
"type": "string",
"description": "A brief explanation of what the command does"
}
},
"required": [
"command"
]
}
},
"fs_read": {
"name": "fs_read",
"description": "Tool for reading files, directories and images. Always provide an 'operations' array.\n\nFor single operation: provide array with one element.\nFor batch operations: provide array with multiple elements.\n\nAvailable modes:\n- Line: Read lines from a file\n- Directory: List directory contents\n- Search: Search for patterns in files\n- Image: Read and process images\n\nExamples:\n1. Single: {\"operations\": [{\"mode\": \"Line\", \"path\": \"/file.txt\"}]}\n2. Batch: {\"operations\": [{\"mode\": \"Line\", \"path\": \"/file1.txt\"}, {\"mode\": \"Search\", \"path\": \"/file2.txt\", \"pattern\": \"test\"}]}",
"input_schema": {
"type": "object",
"properties": {
"operations": {
"type": "array",
"description": "Array of operations to execute. Provide one element for single operation, multiple for batch.",
"items": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"Line",
"Directory",
"Search",
"Image"
],
"description": "The operation mode to run in: `Line`, `Directory`, `Search`. `Line` and `Search` are only for text files, and `Directory` is only for directories. `Image` is for image files, in this mode `image_paths` is required."
},
"path": {
"type": "string",
"description": "Path to the file or directory. The path should be absolute, or otherwise start with ~ for the user's home (required for Line, Directory, Search modes)."
},
"image_paths": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of paths to the images. This is currently supported by the Image mode."
},
"start_line": {
"type": "integer",
"description": "Starting line number (optional, for Line mode). A negative index represents a line number starting from the end of the file.",
"default": 1
},
"end_line": {
"type": "integer",
"description": "Ending line number (optional, for Line mode). A negative index represents a line number starting from the end of the file.",
"default": -1
},
"pattern": {
"type": "string",
"description": "Pattern to search for (required, for Search mode). Case insensitive. The pattern matching is performed per line."
},
"context_lines": {
"type": "integer",
"description": "Number of context lines around search results (optional, for Search mode)",
"default": 2
},
"depth": {
"type": "integer",
"description": "Depth of a recursive directory listing (optional, for Directory mode)",
"default": 0
}
},
"required": [
"mode"
]
},
"minItems": 1
},
"summary": {
"type": "string",
"description": "Optional description of the purpose of this batch operation (mainly useful for multiple operations)"
}
},
"required": [
"operations"
]
}
},
"fs_write": {
"name": "fs_write",
"description": "A tool for creating and editing files\n * The `create` command will override the file at `path` if it already exists as a file, and otherwise create a new file\n * The `append` command will add content to the end of an existing file, automatically adding a newline if the file doesn't end with one. The file must exist.\n Notes for using the `str_replace` command:\n * The `old_str` parameter should match EXACTLY one or more consecutive lines from the original file. Be mindful of whitespaces!\n * If the `old_str` parameter is not unique in the file, the replacement will not be performed. Make sure to include enough context in `old_str` to make it unique\n * The `new_str` parameter should contain the edited lines that should replace the `old_str`.",
"input_schema": {
"type": "object",
"properties": {
"command": {
"type": "string",
"enum": [
"create",
"str_replace",
"insert",
"append"
],
"description": "The commands to run. Allowed options are: `create`, `str_replace`, `insert`, `append`."
},
"file_text": {
"description": "Required parameter of `create` command, with the content of the file to be created.",
"type": "string"
},
"insert_line": {
"description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`.",
"type": "integer"
},
"new_str": {
"description": "Required parameter of `str_replace` command containing the new string. Required parameter of `insert` command containing the string to insert. Required parameter of `append` command containing the content to append to the file.",
"type": "string"
},
"old_str": {
"description": "Required parameter of `str_replace` command containing the string in `path` to replace.",
"type": "string"
},
"path": {
"description": "Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`.",
"type": "string"
},
"summary": {
"description": "A brief explanation of what the file change does or why it's being made.",
"type": "string"
}
},
"required": [
"command",
"path"
]
}
},
"use_aws": {
"name": "use_aws",
"description": "Make an AWS CLI api call with the specified service, operation, and parameters. All arguments MUST conform to the AWS CLI specification. Should the output of the invocation indicate a malformed command, invoke help to obtain the the correct command.",
"input_schema": {
"type": "object",
"properties": {
"service_name": {
"type": "string",
"description": "The name of the AWS service. If you want to query s3, you should use s3api if possible."
},
"operation_name": {
"type": "string",
"description": "The name of the operation to perform."
},
"parameters": {
"type": "object",
"description": "The parameters for the operation. The parameter keys MUST conform to the AWS CLI specification. You should prefer to use JSON Syntax over shorthand syntax wherever possible. For parameters that are booleans, prioritize using flags with no value. Denote these flags with flag names as key and an empty string as their value. You should also prefer kebab case."
},
"region": {
"type": "string",
"description": "Region name for calling the operation on AWS."
},
"profile_name": {
"type": "string",
"description": "Optional: AWS profile name to use from ~/.aws/credentials. Only specify if the user explicitly mentions a profile name. If omitted, the AWS default credential chain is used (environment variables, instance profile, etc)."
},
"label": {
"type": "string",
"description": "Human readable description of the api that is being called."
}
},
"required": [
"region",
"service_name",
"operation_name",
"label"
]
}
},
"gh_issue": {
"name": "report_issue",
"description": "Opens the browser to a pre-filled gh (GitHub) issue template to report chat issues, bugs, or feature requests. Pre-filled information includes the conversation transcript, chat context, and chat request IDs from the service.",
"input_schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the GitHub issue."
},
"expected_behavior": {
"type": "string",
"description": "Optional: The expected chat behavior or action that did not happen."
},
"actual_behavior": {
"type": "string",
"description": "Optional: The actual chat behavior that happened and demonstrates the issue or lack of a feature."
},
"steps_to_reproduce": {
"type": "string",
"description": "Optional: Previous user chat requests or steps that were taken that may have resulted in the issue or error response."
}
},
"required": [
"title"
]
}
},
"thinking": {
"name": "thinking",
"description": "Thinking is an internal reasoning mechanism improving the quality of complex tasks by breaking their atomic actions down; use it specifically for multi-step problems requiring step-by-step dependencies, reasoning through multiple constraints, synthesizing results from previous tool calls, planning intricate sequences of actions, troubleshooting complex errors, or making decisions involving multiple trade-offs. Avoid using it for straightforward tasks, basic information retrieval, summaries, always clearly define the reasoning challenge, structure thoughts explicitly, consider multiple perspectives, and summarize key insights before important decisions or complex tool interactions.",
"input_schema": {
"type": "object",
"properties": {
"thought": {
"type": "string",
"description": "A reflective note or intermediate reasoning step such as \"The user needs to prepare their application for production. I need to complete three major asks including 1: building their code from source, 2: bundling their release artifacts together, and 3: signing the application bundle."
}
},
"required": [
"thought"
]
}
},
"knowledge": {
"name": "knowledge",
"description": "Store and retrieve information in knowledge base across chat sessions. Provides semantic search capabilities for files, directories, and text content.",
"input_schema": {
"type": "object",
"properties": {
"command": {
"type": "string",
"enum": [
"show",
"add",
"remove",
"clear",
"search",
"update",
"status",
"cancel"
],
"description": "The knowledge operation to perform:\n- 'show': List all knowledge contexts (no additional parameters required)\n- 'add': Add content to knowledge base (requires 'name' and 'value')\n- 'remove': Remove content from knowledge base (requires one of: 'name', 'context_id', or 'path')\n- 'clear': Remove all knowledge contexts.\n- 'search': Search across knowledge contexts (requires 'query', optional 'context_id')\n- 'update': Update existing context with new content (requires 'path' and one of: 'name', 'context_id')\n- 'status': Show background operation status and progress\n- 'cancel': Cancel background operations (optional 'operation_id' to cancel specific operation, or cancel all if not provided)"
},
"name": {
"type": "string",
"description": "A descriptive name for the knowledge context. Required for 'add' operations. Can be used for 'remove' and 'update' operations to identify the context."
},
"value": {
"type": "string",
"description": "The content to store in knowledge base. Required for 'add' operations. Can be either text content or a file/directory path. If it's a valid file or directory path, the content will be indexed; otherwise it's treated as text."
},
"context_id": {
"type": "string",
"description": "The unique context identifier for targeted operations. Can be obtained from 'show' command. Used for 'remove', 'update', and 'search' operations to specify which context to operate on."
},
"path": {
"type": "string",
"description": "File or directory path. Used in 'remove' operations to remove contexts by their source path, and required for 'update' operations to specify the new content location."
},
"query": {
"type": "string",
"description": "The search query string. Required for 'search' operations. Performs semantic search across knowledge contexts to find relevant content."
},
"operation_id": {
"type": "string",
"description": "Optional operation ID to cancel a specific operation. Used with 'cancel' command. If not provided, all active operations will be cancelled. Can be either the full operation ID or the short 8-character ID."
}
},
"required": [
"command"
]
}
},
"todo_list": {
"name": "todo_list",
"description": "A tool for creating a TODO list and keeping track of tasks. This tool should be requested EVERY time the user gives you a task that will take multiple steps. A TODO list should be made BEFORE executing any steps. Steps should be marked off AS YOU COMPLETE THEM. DO NOT display your own tasks or todo list AT ANY POINT; this is done for you. Complete the tasks in the same order that you provide them. If the user tells you to skip a step, DO NOT mark it as completed.",
"input_schema": {
"type": "object",
"properties": {
"command": {
"type": "string",
"enum": [
"create",
"complete",
"load",
"add",
"remove",
"lookup"
],
"description": "The command to run. Allowed options are `create`, `complete`, `load`, `add`, `remove`, and `lookup`. Call `lookup` without arguments to see a list of all existing TODO list IDs."
},
"tasks": {
"description": "Required parameter of `create` command containing the list of DISTINCT tasks to be added to the TODO list.",
"type": "array",
"items": {
"type": "string"
}
},
"todo_list_description": {
"description": "Required parameter of `create` command containing a BRIEF summary of the todo list being created. The summary should be detailed enough to refer to without knowing the problem context beforehand.",
"type": "string"
},
"completed_indices": {
"description": "Required parameter of `complete` command containing the 0-INDEXED numbers of EVERY completed task. Each task should be marked as completed IMMEDIATELY after it is finished.",
"type": "array",
"items": {
"type": "integer"
}
},
"context_update": {
"description": "Required parameter of `complete` command containing important task context. Use this command to track important information about the task AND information about files you have read.",
"type": "string"
},
"modified_files": {
"description": "Optional parameter of `complete` command containing a list of paths of files that were modified during the task. This is useful for tracking file changes that are important to the task.",
"type": "array",
"items": {
"type": "string"
}
},
"load_id": {
"description": "Required parameter of `load` command containing ID of todo list to load",
"type": "string"
},
"current_id": {
"description": "Required parameter of `complete`, `add`, and `remove` commands containing the ID of the currently loaded todo list. The ID will ALWAYS be provided after every `todo_list` call after the serialized todo list state.",
"type": "string"
},
"new_tasks": {
"description": "Required parameter of `add` command containing a list of new tasks to be added to the to-do list.",
"type": "array",
"items": {
"type": "string"
}
},
"insert_indices": {
"description": "Required parameter of `add` command containing a list of 0-INDEXED positions to insert the new tasks. There MUST be an index for every new task being added.",
"type": "array",
"items": {
"type": "integer"
}
},
"new_description": {
"description": "Optional parameter of `add` and `remove` containing a new todo list description. Use this when the updated set of tasks significantly change the goal or overall procedure of the todo list.",
"type": "string"
},
"remove_indices": {
"description": "Required parameter of `remove` command containing a list of 0-INDEXED positions of tasks to remove.",
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"command"
]
}
},
"delegate": {
"name": "delegate",
"description": "Launch and manage asynchronous agent processes. This tool allows you to delegate tasks to agents that run independently in the background.\n\nOperations:\n- launch: Start a new task with an agent (requires task parameter, agent is optional)\n- status: Check agent status and get full output if completed. Agent is optional - defaults to 'all' if not specified\n\nIf no agent is specified for launch, uses 'default_agent'. Only one task can run per agent at a time. Files are stored in ~/.aws/amazonq/.subagents/\n\nIMPORTANT: If a specific agent is requested but not found, DO NOT automatically retry with 'default_agent' or any other agent. Simply report the error and available agents to the user.\n\nExample usage:\n1. Launch with agent: {\"operation\": \"launch\", \"agent\": \"rust-agent\", \"task\": \"Create a snake game\"}\n2. Launch without agent: {\"operation\": \"launch\", \"task\": \"Write a Python script\"}\n3. Check specific agent: {\"operation\": \"status\", \"agent\": \"rust-agent\"}\n4. Check all agents: {\"operation\": \"status\", \"agent\": \"all\"}\n5. Check all agents (shorthand): {\"operation\": \"status\"}",
"input_schema": {
"type": "object",
"properties": {
"operation": {
"description": "Operation to perform: launch, status, or list",
"$ref": "#/$defs/Operation"
},
"agent": {
"description": "Agent name to use (optional - uses \"q_cli_default\" if not specified)",
"type": [
"string",
"null"
],
"default": null
},
"task": {
"description": "Task description (required for launch operation). This process is supposed to be async. DO NOT query immediately after launching a task.",
"type": [
"string",
"null"
],
"default": null
}
},
"required": [
"operation"
],
"$defs": {
"Operation": {
"oneOf": [
{
"description": "Launch a new agent with a specified task",
"type": "string",
"const": "launch"
},
{
"description": "Check the status of a specific agent or all agents if None is provided",
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
]
}
},
"required": [
"status"
],
"additionalProperties": false
},
{
"description": "List all available agents",
"type": "string",
"const": "list"
}
]
}
}
}
}
}