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: README.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,34 @@ The MCP server exposes the following tools:
100
100
-**Path issues**: Ensure you use absolute paths for the JAR file and the log files you want to parse.
101
101
-**Headless mode**: If you see errors related to `java.awt.HeadlessException`, double-check that `-Djava.awt.headless=true` is set.
102
102
-**Permissions**: Make sure the user running the MCP server has read permissions for the log files.
103
+
104
+
#### 🤖 AI Agent Configuration (Cursor / Junie)
105
+
106
+
To ensure that AI agents use TDA efficiently and don't attempt to read large log files directly (which is slow and expensive), you should configure a **System Prompt**.
107
+
108
+
##### Global Configuration (Recommended):
109
+
Instead of project-wise rules, you can configure these instructions globally:
110
+
111
+
***Cursor**: Go to **Settings** -> **General** -> **Rules for AI** and add the recommended system prompt there.
112
+
***Junie**: Create or edit the file `~/.junie/instructions.md` and add the recommended system prompt.
113
+
114
+
##### Project-wise Configuration:
115
+
If you prefer project-specific rules:
116
+
117
+
***Cursor**: Add the recommended system prompt to your `.cursorrules` file in the project root.
118
+
***Junie**: Add the recommended system prompt to your `.junie/instructions.md` file in the project root.
119
+
120
+
##### Recommended System Prompt:
121
+
```markdown
122
+
When you encounter a log file that appears to contain Java thread dumps:
123
+
1. DO NOT try to read or "cat" the entire file if it's large.
124
+
2. Use the `tda-analyzer` MCP toolset.
125
+
3. First, call `parse_log(path="...")` to initialize the analysis.
126
+
4. Use `get_summary()`, `check_deadlocks()`, and `find_long_running()` to perform the analysis.
127
+
5. Provide your insights based on the structured data returned by these tools rather than the raw log text.
128
+
```
129
+
130
+
This configuration makes the analysis much faster and significantly reduces token usage.
0 commit comments