You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/features/experimental/custom-tools.md
+87-2Lines changed: 87 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
description: Define TypeScript/JavaScript tools that extend Roo's capabilities beyond built-in tools, enabling project-specific workflows and team standardization.
2
+
description: Define TypeScript/JavaScript tools that extend Roo's capabilities beyond built-in tools, with npm dependency support and per-tool environment variables.
3
3
keywords:
4
4
- experimental features
5
5
- custom tools
@@ -8,6 +8,8 @@ keywords:
8
8
- tool extension
9
9
- defineCustomTool
10
10
- workflow automation
11
+
- npm dependencies
12
+
- environment variables
11
13
image: /img/social-share.jpg
12
14
---
13
15
# Custom Tools
@@ -82,12 +84,95 @@ Tools from both directories are loaded. Tools with the same name in `.roo/tools/
82
84
83
85
---
84
86
87
+
## Using npm Dependencies
88
+
89
+
Custom tools can use npm packages. Install dependencies in the same folder as your tool, and imports will resolve normally.
**Security:** Ensure your `.env` file is ignored by version control to keep secrets safe.
168
+
169
+
---
170
+
85
171
## Limits
86
172
87
173
-**No approval prompts**: Tools are auto-approved when the feature is enabled—security trade-off for convenience
88
174
-**String-only results**: Tools must return strings (Roo's protocol constraint)
89
175
-**No interactive input**: Tools can't prompt the user mid-execution
90
-
-**No npm packages**: Tools are transpiled in isolation; use Node.js built-ins only
91
176
-**Cache invalidation**: Tool updates may require reloading the window
92
177
93
178
**vs. MCP:**[MCP](/features/mcp/overview) is for external services (search, APIs). Custom tools are for in-repo logic you control directly. MCP is more extensible; custom tools are lighter weight for project-specific actions.
Copy file name to clipboardExpand all lines: docs/features/slash-commands.mdx
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,7 @@ Please perform a thorough security review of the selected code:
123
123
**Frontmatter Fields:**
124
124
- **`description`**: Appears in the command menu to help users understand the command's purpose
125
125
- **`argument-hint`**: (Optional) Provides a hint about expected arguments when using the command. See [Argument Hints](#argument-hints) for detailed information
126
+
- **`mode`**: (Optional) Mode slug to switch to before running the command (e.g., `code`, `architect`). Roo switches to this mode first, then executes the command content in that mode's context
126
127
127
128
---
128
129
@@ -192,6 +193,25 @@ This will display as `/api-endpoint <endpoint-name> <http-method>` in the comman
192
193
193
194
## Examples and Use Cases
194
195
196
+
**Mode-Targeting Commands**
197
+
198
+
Use the `mode` field to ensure a command runs in a specific mode context:
199
+
200
+
```yaml
201
+
---
202
+
description: Analyze architecture and propose improvements
203
+
mode: architect
204
+
---
205
+
206
+
Review the current system architecture and suggest improvements for:
207
+
- Scalability bottlenecks
208
+
- Component coupling
209
+
- Security boundaries
210
+
- Data flow optimization
211
+
```
212
+
213
+
When you run this command, Roo switches to Architect mode first, then processes the command content with Architect's role definition and tool restrictions.
Copy file name to clipboardExpand all lines: docs/providers/openrouter.md
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,12 +47,6 @@ For the complete, up-to-date model list with pricing and capabilities, see [Open
47
47
48
48
---
49
49
50
-
## Supported Transforms
51
-
52
-
OpenRouter provides an [optional "middle-out" message transform](https://openrouter.ai/docs/features/message-transforms) to help with prompts that exceed the maximum context size of a model. You can enable it by checking the "Compress prompts and message chains to the context size" box.
53
-
54
-
---
55
-
56
50
## Tips and Notes
57
51
58
52
***Model Selection:** OpenRouter offers a wide range of models. Experiment to find the best one for your needs.
Roo now supports Agent Skills, which are portable skill folders containing instructions, scripts, and resources that the agent can discover and load on demand. This lets you package repeatable workflows and domain knowledge once and reuse them across projects to make results more consistent and reliable. ([#10335](https://github.com/RooCodeInc/Roo-Code/pull/10335)):
19
+
20
+
> **📚 Documentation**: See [Skills](/features/skills) for setup and usage.
21
+
22
+
## QOL Improvements
23
+
24
+
* Slash commands can declare a target mode in their front matter, so triggering a command can switch Roo to the right mode first ([#10344](https://github.com/RooCodeInc/Roo-Code/pull/10344)).
25
+
* Removes the legacy “simple read file” tool path so file reading consistently uses the standard `read_file` tool ([#10254](https://github.com/RooCodeInc/Roo-Code/pull/10254)).
26
+
27
+
## Bug Fixes
28
+
29
+
* Fixes an issue where some Claude Sonnet 4.5 requests could fail with HTTP 400 errors after context condensing ([#10359](https://github.com/RooCodeInc/Roo-Code/pull/10359)).
30
+
31
+
## Misc Improvements
32
+
33
+
* Custom tools can import npm packages, and can load secrets from a same-folder `.env` file ([#10336](https://github.com/RooCodeInc/Roo-Code/pull/10336)).
34
+
35
+
## Provider Updates
36
+
37
+
* Removes the “OpenRouter Transforms” setting and stops sending the `transforms` parameter on OpenRouter requests ([#10341](https://github.com/RooCodeInc/Roo-Code/pull/10341)).
0 commit comments