Skip to content

Commit ad38c46

Browse files
committed
fix: chat instrument
1 parent e0308fb commit ad38c46

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

resources/instruments/javaLspContext.instructions.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,19 @@ This workspace contains Java code. You have access to 6 compiler-accurate LSP to
99

1010
## Step 1: Load Tools (REQUIRED — do this FIRST)
1111

12-
Before ANY operation, call `tool_search_tool_regex` with:
12+
Before ANY operation, load all 6 tools by calling `tool_search_tool_regex` **twice** (the API returns at most 5 tools per call):
13+
14+
**Call 1** — basic navigation tools:
15+
```
16+
lsp_java_findSymbol|lsp_java_getFileStructure|lsp_java_getFileImports
1317
```
14-
lsp_java_findSymbol|lsp_java_getFileStructure|lsp_java_getCallHierarchy|lsp_java_getTypeHierarchy|lsp_java_getTypeAtPosition|lsp_java_getFileImports
18+
19+
**Call 2** — hierarchy and type tools:
1520
```
16-
All 6 tools must be returned. If any are missing, retry once. Do NOT use `grep_search`, `read_file`, `semantic_search`, `search_subagent`, or `runSubagent` on `.java` files until tools are loaded.
21+
lsp_java_getCallHierarchy|lsp_java_getTypeHierarchy|lsp_java_getTypeAtPosition
22+
```
23+
24+
All 6 tools must be returned across the two calls. If any are missing, retry that call once. Do NOT use `grep_search`, `read_file`, `semantic_search`, `search_subagent`, or `runSubagent` on `.java` files until all tools are loaded.
1725

1826
## Step 2: Always Prefer LSP Tools for Java
1927

0 commit comments

Comments
 (0)