@@ -40,10 +40,15 @@ A key mechanism for this is to use the appropriate [context](#contexts) when sta
4040(clients-common-pitfalls)=
4141### Common Pitfalls
4242
43- ** Discoverability of the ` serena ` ** .
43+ ** Discoverability of the ` serena ` command ** .
4444Your client may not find the ` serena ` CLI command, even if it is on your system PATH.
4545In this case, a workaround is to provide the full path to the ` serena ` executable.
4646
47+ ** Serena's tools not being used** .
48+ With some clients, you may experience that Serena's tools are not being used.
49+ This is mainly due to problems in the client itself (like a poorly implemented tool discovery). To counteract this,
50+ Serena comes with a set of commands that can be used in _ hooks_ . See the sections on hooks for Claude Code and VSCode below.
51+
4752** Environment Variables** .
4853Some language servers may require additional environment variables to be set (e.g. F# on macOS with Homebrew),
4954which you may need to explicitly add to the MCP server configuration.
@@ -117,22 +122,6 @@ Confirm that Claude Code is connected to Serena by running the `/mcp` command an
117122If Serena fails to start fast enough, you should set ` MCP_TIMEOUT ` to a sufficiently high value
118123(e.g. by adding ` export MCP_TIMEOUT=60000 ` to your shell profile)
119124
120- ** Maximum Token Efficiency.** To maximize token efficiency, you may want to use Claude Code's
121- * on-demand tool loading* feature, which is supported since at least v2.0.74 of Claude Code.
122- This feature avoids sending all tool descriptions to Claude upon startup, thus saving tokens.
123- Instead, Claude will search for tools as needed (but there are no guarantees that it will
124- search optimally, of course).
125- To enable this feature, set the environment variable ` ENABLE_TOOL_SEARCH=true ` .
126- Depending on your shell, you can also set this on a per-session basis, e.g. using
127- ``` shell
128- ENABLE_TOOL_SEARCH=true claude
129- ```
130- in bash/zsh, or using
131- ``` shell
132- set ENABLE_TOOL_SEARCH=true && claude
133- ```
134- in Windows CMD to launch Claude Code.
135-
136125** Hooks.**
137126Due to recent changes (especially dynamic tool loading) in Claude Code, the agent will often fail to make proper use
138127of Serena's tools, either by failing to load them in the beginning or by forgetting the instructions in a long session
0 commit comments