Skip to content

Commit 554f940

Browse files
committed
docs: replace 'using-tools' documentation with 'how-tools-work' and update links
1 parent 34b5583 commit 554f940

File tree

5 files changed

+87
-71
lines changed

5 files changed

+87
-71
lines changed

.clinerules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
## Documentation Links
44
- Do not include .md extensions in documentation links
55
- Use relative paths for internal documentation links
6-
- Example: [link text](basic-usage/using-tools) NOT [link text](basic-usage/using-tools.md)
6+
- Example: [link text](basic-usage/how-tools-work) NOT [link text](basic-usage/how-tools-work.md)
77

88
This ensures links work correctly in the built documentation while maintaining clean URLs.

docs/basic-usage/how-tools-work.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# How Tools Work
2+
3+
Roo Code uses tools to interact with your code and environment. These specialized helpers perform specific actions like reading files, making edits, running commands, or searching your codebase. Tools provide automation for common development tasks without requiring manual execution.
4+
5+
## Tool Workflow
6+
7+
Describe what you want to accomplish in natural language, and Roo Code will:
8+
9+
1. Select the appropriate tool based on your request
10+
2. Present the tool with its parameters for your review
11+
3. Execute the approved tool and show you the results
12+
4. Continue this process until your task is complete
13+
14+
## Tool Categories
15+
16+
| Category | Purpose | Tool Names |
17+
| :------- | :------ | :--------- |
18+
| Read | Access file content and code structure | `read_file`, `search_files`, `list_files`, `list_code_definition_names` |
19+
| Edit | Create or modify files and code | `write_to_file`, `apply_diff`, `insert_content`, `search_and_replace` |
20+
| Execute | Run commands and perform system operations | `execute_command` |
21+
| Browser | Interact with web content | `browser_action` |
22+
| Workflow | Manage task flow and context | `ask_followup_question`, `attempt_completion`, `switch_mode`, `new_task` |
23+
24+
## Example: Using Tools
25+
26+
Here's how a typical tool interaction works:
27+
28+
<img src="/img/how-tools-work/how-tools-work.png" alt="Tool approval interface showing Save and Reject buttons along with Auto-approve checkbox" width="600" />
29+
30+
*The tool approval interface shows Save/Reject buttons and Auto-approve options.*
31+
32+
**User:** Create a file named `greeting.js` that logs a greeting message
33+
34+
**Roo Code:** (Proposes the `write_to_file` tool as shown in the image above)
35+
```xml
36+
<write_to_file>
37+
<path>greeting.js</path>
38+
<content>
39+
function greet(name) {
40+
console.log(`Hello, ${name}!`);
41+
}
42+
43+
greet('World');
44+
</content>
45+
<line_count>5</line_count>
46+
</write_to_file>
47+
```
48+
49+
**User:** (Clicks "Save" in the interface)
50+
51+
**Roo Code:** (Confirms file creation)
52+
53+
## Tool Safety and Approval
54+
55+
56+
Every tool use requires your explicit approval. When Roo proposes a tool, you'll see:
57+
58+
* A "Save" button to approve and execute the tool
59+
* A "Reject" button to decline the proposed tool
60+
* An optional "Auto-approve" setting for trusted operations
61+
62+
This safety mechanism ensures you maintain control over which files are modified, what commands are executed, and how your codebase is changed. Always review tool proposals carefully before saving them.
63+
64+
## Core Tools Reference
65+
66+
| Tool Name | Description | Category |
67+
| :-------- | :---------- | :------- |
68+
| `read_file` | Reads the content of a file with line numbers | Read |
69+
| `search_files` | Searches for text or regex patterns across files | Read |
70+
| `list_files` | Lists files and directories in a specified location | Read |
71+
| `list_code_definition_names` | Lists code definitions like classes and functions | Read |
72+
| `write_to_file` | Creates new files or overwrites existing ones | Edit |
73+
| `apply_diff` | Makes precise changes to specific parts of a file | Edit |
74+
| `insert_content` | Adds new content at specific line positions | Edit |
75+
| `search_and_replace` | Performs text replacements with regex support | Edit |
76+
| `execute_command` | Runs commands in the VS Code terminal | Execute |
77+
| `browser_action` | Performs actions in a headless browser | Browser |
78+
| `ask_followup_question` | Asks you a clarifying question | Workflow |
79+
| `attempt_completion` | Indicates the task is complete | Workflow |
80+
| `switch_mode` | Changes to a different operational mode | Workflow |
81+
| `new_task` | Creates a new subtask with a specific starting mode | Workflow |
82+
83+
## Learn More About Tools
84+
85+
For more detailed information about each tool, including complete parameter references and advanced usage patterns, see the [Advanced Tool Reference](../advanced-usage/tool-reference) documentation.

docs/basic-usage/using-tools.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

sidebars.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const sidebars: SidebarsConfig = {
1818
items: [
1919
'basic-usage/the-chat-interface',
2020
'basic-usage/typing-your-requests',
21-
'basic-usage/using-tools',
21+
'basic-usage/how-tools-work',
2222
'basic-usage/context-mentions',
2323
'basic-usage/modes',
2424
],
216 KB
Loading

0 commit comments

Comments
 (0)