11using mcp_nexus . Models ;
22using mcp_nexus . Notifications ;
3+ using mcp_nexus . Tools ;
34
45namespace mcp_nexus . Protocol
56{
@@ -41,18 +42,7 @@ private static McpToolSchema CreateNexusOpenDumpAnalyzeSessionTool()
4142 return new McpToolSchema
4243 {
4344 Name = "nexus_open_dump_analyze_session" ,
44- Description = "STEP 1 - START HERE: Open and analyze a Windows crash dump file (.dmp) by creating a dedicated analysis session. " +
45- "CRITICAL RETURN VALUE: This command RETURNS a sessionId in the response JSON that you MUST EXTRACT and SAVE! " +
46- "RESPONSE CONTAINS: {\" sessionId\" : \" sess-000001-abc12345\" , ...} " +
47- "YOU MUST: Parse the response JSON and extract the 'sessionId' field value! " +
48- "SAVE IT: Store this sessionId string and use it in ALL subsequent commands! " +
49- "MANDATORY WORKFLOW: " +
50- "1. nexus_open_dump_analyze_session → EXTRACT 'sessionId' from response JSON → SAVE IT! " +
51- "2. nexus_dump_analyze_session_async_command + SAVED sessionId → get commandId " +
52- "3. nexus_dump_analyze_session_async_command_status + commandId → get results " +
53- "4. nexus_close_dump_analyze_session + SAVED sessionId → CLOSE session when done (EXPECTED!) " +
54- "DO NOT MAKE UP sessionId VALUES! Use only what this command returns! " +
55- "CLEANUP EXPECTATION: You SHOULD call nexus_close_dump_analyze_session when finished analyzing to properly release resources and close the debugging session. While sessions auto-expire after 30 minutes, explicit closure is the expected and professional approach!" ,
45+ Description = System . Text . Json . JsonSerializer . Serialize ( SessionAwareWindbgTool . TOOL_USAGE_EXPLANATION , new System . Text . Json . JsonSerializerOptions { WriteIndented = true } ) ,
5646 InputSchema = new
5747 {
5848 type = "object" ,
@@ -72,11 +62,7 @@ private static McpToolSchema CreateNexusCloseDumpAnalyzeSessionTool()
7262 return new McpToolSchema
7363 {
7464 Name = "nexus_close_dump_analyze_session" ,
75- Description = "STEP 4 - CLEANUP: Close the current crash dump analysis session and release resources. " +
76- "EXPECTED BEHAVIOR: You SHOULD call this when done analyzing a dump file! " +
77- "PROFESSIONAL PRACTICE: While sessions auto-expire after 30 minutes, explicit closure is the expected and responsible approach. " +
78- "NEXT SESSION: After closing, you'll need nexus_open_dump_analyze_session again to analyze another dump. " +
79- "AI CLIENT TIP: Always close sessions when finished - it's good resource management!" ,
65+ Description = System . Text . Json . JsonSerializer . Serialize ( SessionAwareWindbgTool . TOOL_USAGE_EXPLANATION , new System . Text . Json . JsonSerializerOptions { WriteIndented = true } ) ,
8066 InputSchema = new
8167 {
8268 type = "object" ,
@@ -94,24 +80,8 @@ private static McpToolSchema CreateNexusDumpAnalyzeSessionAsyncCommandTool()
9480 {
9581 return new McpToolSchema
9682 {
97- Name = "nexus_dump_analyze_session_async_command" ,
98- Description = "STEP 2 - EXECUTE COMMANDS: Run debugger commands like '!analyze -v', 'k', 'lm', 'dt', etc. " +
99- "ASYNC WORKFLOW - READ CAREFULLY: " +
100- "1. This command ONLY QUEUES the command and returns a commandId " +
101- "2. It does NOT return the actual debugger output! " +
102- "3. You MUST call nexus_dump_analyze_session_async_command_status(commandId) to get results " +
103- "4. Commands execute asynchronously in background queue " +
104- "POLLING REQUIRED: Check nexus_dump_analyze_session_async_command_status EVERY 3-5 SECONDS until status is 'completed' " +
105- "EXACT WORKFLOW: nexus_dump_analyze_session_async_command → GET commandId → nexus_dump_analyze_session_async_command_status(commandId) → REPEAT until complete " +
106- "MANDATORY sessionId: You MUST include the sessionId from nexus_open_dump_analyze_session response! " +
107- "MISSING sessionId = ERROR: This command will FAIL without a valid sessionId parameter! " +
108- "HOW TO GET sessionId: Call nexus_open_dump_analyze_session first, extract 'sessionId' from response JSON, then use it here " +
109- "COMMON COMMANDS: " +
110- "• '!analyze -v' - Detailed crash analysis " +
111- "• 'k' - Call stack " +
112- "• 'lm' - List loaded modules " +
113- "• 'dt ModuleName!StructName' - Display type " +
114- "TIP: Listen for notifications/commandStatus to know when commands complete!" ,
83+ Name = "nexus_dump_analyze_session_async_command" ,
84+ Description = System . Text . Json . JsonSerializer . Serialize ( SessionAwareWindbgTool . TOOL_USAGE_EXPLANATION , new System . Text . Json . JsonSerializerOptions { WriteIndented = true } ) ,
11585 InputSchema = new
11686 {
11787 type = "object" ,
@@ -132,16 +102,7 @@ private static McpToolSchema CreateNexusDumpAnalyzeSessionAsyncCommandStatusTool
132102 return new McpToolSchema
133103 {
134104 Name = "nexus_dump_analyze_session_async_command_status" ,
135- Description = "STEP 3 - GET RESULTS: Retrieve the output from a previously queued command. " +
136- "This is the ONLY way to get actual debugger command results! " +
137- "WORKFLOW DEPENDENCY: You can ONLY call this AFTER calling nexus_dump_analyze_session_async_command! " +
138- "REQUIRED SEQUENCE: nexus_open_dump_analyze_session → nexus_dump_analyze_session_async_command → nexus_dump_analyze_session_async_command_status " +
139- "STATUS FLOW: queued → executing → completed " +
140- "When status='completed', the 'result' field contains the debugger output. " +
141- "If status='executing' or 'queued', wait 3-5 seconds and call this again! " +
142- "KEEP POLLING: Call this repeatedly every 3-5 seconds until status='completed' " +
143- "NEVER SKIP STEPS: You cannot make up commandId values or skip nexus_dump_analyze_session_async_command! " +
144- "SMART TIP: Listen for notifications/commandStatus to know when to check instead of polling constantly." ,
105+ Description = System . Text . Json . JsonSerializer . Serialize ( SessionAwareWindbgTool . TOOL_USAGE_EXPLANATION , new System . Text . Json . JsonSerializerOptions { WriteIndented = true } ) ,
145106 InputSchema = new
146107 {
147108 type = "object" ,
0 commit comments