@tng-sh/mcp-server 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +39 -7
  2. package/dist/index.js +287 -149
  3. package/dist/index.js.map +1 -1
  4. package/dist/tools/audit.d.ts +4 -7
  5. package/dist/tools/audit.d.ts.map +1 -1
  6. package/dist/tools/audit.js +38 -45
  7. package/dist/tools/audit.js.map +1 -1
  8. package/dist/tools/call_sites.d.ts +17 -0
  9. package/dist/tools/call_sites.d.ts.map +1 -0
  10. package/dist/tools/call_sites.js +115 -0
  11. package/dist/tools/call_sites.js.map +1 -0
  12. package/dist/tools/clones.d.ts +3 -7
  13. package/dist/tools/clones.d.ts.map +1 -1
  14. package/dist/tools/clones.js +35 -45
  15. package/dist/tools/clones.js.map +1 -1
  16. package/dist/tools/deadcode.d.ts +5 -8
  17. package/dist/tools/deadcode.d.ts.map +1 -1
  18. package/dist/tools/deadcode.js +63 -50
  19. package/dist/tools/deadcode.js.map +1 -1
  20. package/dist/tools/generate.d.ts +4 -7
  21. package/dist/tools/generate.d.ts.map +1 -1
  22. package/dist/tools/generate.js +38 -45
  23. package/dist/tools/generate.js.map +1 -1
  24. package/dist/tools/impact.d.ts +17 -0
  25. package/dist/tools/impact.d.ts.map +1 -0
  26. package/dist/tools/impact.js +217 -0
  27. package/dist/tools/impact.js.map +1 -0
  28. package/dist/tools/trace.d.ts +4 -7
  29. package/dist/tools/trace.d.ts.map +1 -1
  30. package/dist/tools/trace.js +39 -46
  31. package/dist/tools/trace.js.map +1 -1
  32. package/dist/tools/utils.d.ts +19 -1
  33. package/dist/tools/utils.d.ts.map +1 -1
  34. package/dist/tools/utils.js +54 -2
  35. package/dist/tools/utils.js.map +1 -1
  36. package/dist/tools/xray.d.ts +3 -7
  37. package/dist/tools/xray.d.ts.map +1 -1
  38. package/dist/tools/xray.js +34 -44
  39. package/dist/tools/xray.js.map +1 -1
  40. package/package.json +9 -3
package/README.md CHANGED
@@ -10,7 +10,8 @@ The [Model Context Protocol](https://modelcontextprotocol.io) allows AI assistan
10
10
 
11
11
  - *"Audit the `process_payment` method in `app/services/payment_processor.rb`"*
12
12
  - *"Generate comprehensive tests for the UserController#create method"*
13
- - *"What methods are defined in `app/models/user.rb`?"*
13
+ - *"Run a regression check on `Order#checkout`"*
14
+ - *"What can TNG do here?"*
14
15
 
15
16
  And the AI will use TNG automatically to provide detailed, actionable results.
16
17
 
@@ -18,11 +19,12 @@ And the AI will use TNG automatically to provide detailed, actionable results.
18
19
 
19
20
  - **Method Auditing** - Deep analysis for bugs, security issues, and performance problems
20
21
  - **Test Generation** - Automatic test creation for Ruby, Python, and JavaScript
21
- - **Method Listing** - Quick overview of all methods in a file
22
22
  - **X-Ray Visualization** - Generate Mermaid flowcharts to visualize method logic
23
23
  - **Symbolic Trace** - Execution path analysis for debugging and understanding code flow
24
+ - **Regression Check** - Blast radius check for changes to a method vs Git HEAD
24
25
  - **Clone Detection** - Find duplicate code with token-based, structural, and fuzzy matching
25
26
  - **Dead Code Detection** - Identify unused imports, variables, functions, and unreachable code
27
+ - **Capabilities Listing** - List available TNG MCP tools and when to use them
26
28
  - **Multi-Language Support** - Works with Ruby, Python, JavaScript/TypeScript
27
29
  - **Universal Integration** - Works with any MCP-compatible AI assistant
28
30
 
@@ -308,7 +310,7 @@ AI: I'll analyze that file for dead code.
308
310
 
309
311
  ## Available Tools
310
312
 
311
- The MCP server exposes six tools:
313
+ The MCP server exposes seven tools:
312
314
 
313
315
  ### 1. `audit_method`
314
316
 
@@ -363,7 +365,21 @@ Generate symbolic trace execution path for a method.
363
365
  - Variable states at each step
364
366
  - Control flow analysis
365
367
 
366
- ### 5. `detect_clones`
368
+ ### 5. `impact_method` (Regression Check)
369
+
370
+ Analyze the impact (blast radius) of changes to a method vs its committed version (`HEAD`).
371
+
372
+ **Parameters:**
373
+ - `file_path` (required) - Path to the source file
374
+ - `method_name` (required) - Name of the method
375
+ - `class_name` (optional) - Class name (Python only)
376
+
377
+ **Returns:**
378
+ - Breaking changes detected
379
+ - Informational changes
380
+ - Impacted call sites (where this method is used)
381
+
382
+ ### 6. `detect_clones`
367
383
 
368
384
  Detect code duplication within a file.
369
385
 
@@ -376,18 +392,34 @@ Detect code duplication within a file.
376
392
  - Locations of duplicated code
377
393
  - Refactoring recommendations
378
394
 
379
- ### 6. `detect_deadcode`
395
+ ### 7. `detect_deadcode`
380
396
 
381
- Detect dead code in a file.
397
+ Detect dead code in a file or across the whole project.
382
398
 
383
399
  **Parameters:**
384
- - `file_path` (required) - Path to the source file
400
+ - `file_path` (optional) - Path to the source file (omit when using `all=true`)
401
+ - `all` (optional) - Set to true for a project-wide scan (uses CLI flag `--all`)
402
+ - `project_root` (required when `all=true`) - Project root to run the scan from
385
403
 
386
404
  **Returns:**
387
405
  - Unused imports, variables, and functions
388
406
  - Unreachable code blocks
389
407
  - Cleanup recommendations
390
408
 
409
+ ### 8. `find_call_sites`
410
+
411
+ Find in-repo call sites for a method/function.
412
+
413
+ **Parameters:**
414
+ - `file_path` (required) - Path to the source file containing the method
415
+ - `method_name` (required) - Method/function name
416
+ - `class_name` (optional) - Class/module name to disambiguate methods with the same name
417
+ - `project_root` (optional) - Project root to resolve relative paths
418
+
419
+ **Returns:**
420
+ - Files and line numbers where the method is called
421
+ - Snippet/context lines (when available)
422
+
391
423
  ## Development
392
424
 
393
425
  ### Building
package/dist/index.js CHANGED
@@ -8,7 +8,11 @@ import { xrayMethod } from './tools/xray.js';
8
8
  import { traceMethod } from './tools/trace.js';
9
9
  import { detectClones } from './tools/clones.js';
10
10
  import { detectDeadCode } from './tools/deadcode.js';
11
+ import { findCallSites } from './tools/call_sites.js';
12
+ import { impactMethod } from './tools/impact.js';
11
13
  import { runInit } from './init.js';
14
+ import { existsSync, readFileSync } from 'fs';
15
+ import { resolveFilePath, findProjectRoot } from './tools/utils.js';
12
16
  const server = new McpServer({
13
17
  name: 'tng-mcp',
14
18
  version: '1.0.0',
@@ -17,165 +21,299 @@ if (process.argv.includes('init')) {
17
21
  const code = runInit();
18
22
  process.exit(code);
19
23
  }
24
+ const auditSchema = {
25
+ file_path: z.string().describe('Relative or absolute path to the source file (e.g., "app/services/payment_processor.rb", "src/utils/validator.ts")'),
26
+ method_name: z.string().describe('Name of the method/function to audit (e.g., "process_payment", "validateUser", "handleSubmit")'),
27
+ class_name: z.string().optional().describe('Class or module name to disambiguate methods with the same name'),
28
+ test_type: z.string().optional().describe('Component type - REQUIRED for JavaScript/Python: "utility", "react_component", "express_handler", "django_view", etc. Ignored for Ruby/Rails.'),
29
+ response_format: z.string().optional().describe('Response format: "text" (default), "json", or "both".'),
30
+ raw_json: z.boolean().optional().describe('If true, return JSON envelope with raw tool output.'),
31
+ };
32
+ const generateSchema = {
33
+ file_path: z.string().describe('Relative or absolute path to the source file to generate tests for'),
34
+ method_name: z.string().describe('Name of the method/function to generate tests for'),
35
+ class_name: z.string().optional().describe('Class or module name to disambiguate methods with the same name'),
36
+ test_type: z.string().optional().describe('Component type or test framework hint - REQUIRED for JS/Python: "utility", "react_component", "express_handler", etc.'),
37
+ response_format: z.string().optional().describe('Response format: "text" (default), "json", or "both".'),
38
+ raw_json: z.boolean().optional().describe('If true, return JSON envelope with raw tool output.'),
39
+ };
40
+ const methodSchema = {
41
+ file_path: z.string().describe('Relative or absolute path to the source file'),
42
+ method_name: z.string().describe('Name of the method/function'),
43
+ class_name: z.string().optional().describe('Class or module name to disambiguate methods with the same name'),
44
+ response_format: z.string().optional().describe('Response format: "text" (default), "json", or "both".'),
45
+ raw_json: z.boolean().optional().describe('If true, return JSON envelope with raw tool output.'),
46
+ };
47
+ const impactSchema = {
48
+ file_path: z.string().describe('Relative or absolute path to the source file'),
49
+ method_name: z.string().describe('Name of the method/function'),
50
+ class_name: z.string().optional().describe('Class or module name to disambiguate methods with the same name'),
51
+ response_format: z.string().optional().describe('Response format: "text" (default), "json", or "both".'),
52
+ raw_json: z.boolean().optional().describe('If true, return JSON envelope with raw tool output.'),
53
+ };
54
+ const clonesSchema = {
55
+ file_path: z.string().describe('Relative or absolute path to the source file to analyze for duplication'),
56
+ level: z.string().optional().describe('Clone detection level: "1" (exact), "2" (structural), "3" (fuzzy/near-miss), or "all" (default - detects all types)'),
57
+ response_format: z.string().optional().describe('Response format: "text" (default), "json", or "both".'),
58
+ raw_json: z.boolean().optional().describe('If true, return JSON envelope with raw tool output.'),
59
+ };
60
+ const deadCodeSchema = {
61
+ file_path: z.string().optional().describe('Relative or absolute path to the source file to analyze for dead code (omit when using all=true)'),
62
+ project_root: z.string().optional().describe('Project root to resolve relative paths and run project-wide scans (recommended when all=true)'),
63
+ all: z.boolean().optional().describe('If true, analyze dead code across the entire project (passes --all).'),
64
+ response_format: z.string().optional().describe('Response format: "text" (default), "json", or "both".'),
65
+ raw_json: z.boolean().optional().describe('If true, return JSON envelope with raw tool output.'),
66
+ };
67
+ const callSitesSchema = {
68
+ file_path: z.string().describe('Relative or absolute path to the source file containing the method'),
69
+ method_name: z.string().describe('Name of the method/function'),
70
+ class_name: z.string().optional().describe('Class or module name to disambiguate methods with the same name'),
71
+ project_root: z.string().optional().describe('Project root to resolve relative paths'),
72
+ response_format: z.string().optional().describe('Response format: "text" (default), "json", or "both".'),
73
+ raw_json: z.boolean().optional().describe('If true, return JSON envelope with raw tool output.'),
74
+ };
75
+ const auditDescription = `Audit a specific method/function for security, bugs, performance, and code quality issues.
76
+ Use when the user asks to audit, review, analyze, inspect, or check code.
77
+ Returns findings with severity, line locations, and suggested fixes.
78
+ Supports: Ruby, Python, JavaScript/TypeScript.
79
+ Example: audit_method { file_path: "app/services/payment_processor.rb", method_name: "process_payment" }`;
80
+ const generateDescription = `Generate tests for a specific method/function.
81
+ Use when the user asks to write tests, create specs, or add coverage.
82
+ Returns complete test code with suggested file path and command to run.
83
+ Supports: Ruby, Python, JavaScript/TypeScript.
84
+ Example: generate_test { file_path: "src/utils/validator.ts", method_name: "validateUser", test_type: "utility" }`;
85
+ const xrayDescription = `Generate a Mermaid flowchart for a method/function (X-Ray).
86
+ Use when the user asks for a diagram, flowchart, or visual explanation.
87
+ Returns Mermaid code suitable for Markdown renderers.
88
+ Example: xray_method { file_path: "lib/order.rb", method_name: "checkout" }`;
89
+ const traceDescription = `Generate a symbolic execution trace for a method/function.
90
+ Use when the user asks to trace, step through, or debug execution flow.
91
+ Returns step-by-step trace output.
92
+ Example: trace_method { file_path: "src/controllers/cart.ts", method_name: "addItem" }`;
93
+ const impactDescription = `Run a regression check (blast radius analysis) on changes to a method vs Git HEAD.
94
+ Use when the user asks about regressions, impact, breaking changes, or blast radius.
95
+ Returns breaking/informational changes and impacted call sites.
96
+ Example: impact_method { file_path: "app/models/user.rb", method_name: "full_name" }`;
97
+ const clonesDescription = `Detect code duplication (clones) within a file.
98
+ Use when the user asks to find duplicates or copy-paste code.
99
+ Returns clone pairs with similarity and locations.
100
+ Example: detect_clones { file_path: "src/services/order.ts", level: "2" }`;
101
+ const deadcodeDescription = `Detect unused or unreachable code in a file or entire project.
102
+ Use when the user asks to find dead code or unused imports/variables.
103
+ Set all=true to scan the whole project (CLI flag: --all).
104
+ Returns unused elements with locations and cleanup suggestions.
105
+ Example: detect_deadcode { file_path: "src/api/auth.ts" }
106
+ Example (project-wide): detect_deadcode { all: true }`;
107
+ const callSitesDescription = `Find in-repo call sites for a method/function.
108
+ Use when the user asks "who calls this?" or "where is this used?".
109
+ Example: find_call_sites { file_path: "src/utils/auth.ts", method_name: "validateUser" }`;
20
110
  // 1. Audit Method - AI-Powered Code Analysis
21
- server.registerTool('audit_method', {
22
- description: `Perform a comprehensive AI-powered audit of a specific method or function in your codebase. This tool analyzes code for:
23
- - **Security vulnerabilities**: SQL injection, XSS, authentication issues, insecure data handling
24
- - **Bugs and logic errors**: Edge cases, null pointer issues, race conditions, incorrect algorithms
25
- - **Performance problems**: Inefficient loops, N+1 queries, memory leaks, unnecessary computations
26
- - **Code quality issues**: Complexity, maintainability, anti-patterns, code smells
27
- - **Behavioral analysis**: Understanding what the code does, its dependencies, and side effects
28
-
29
- Use this when the user asks to "check", "analyze", "review", "audit", "find issues in", or "what's wrong with" code.
30
-
31
- Returns: Detailed findings with severity levels (Critical/High/Medium/Low), descriptions, exact line locations, reasoning, and suggested fixes. Also includes behavioral insights about what the method does.
32
-
33
- **How to use the results:**
34
- 1. Summarize the most critical issues first (High/Critical severity)
35
- 2. Explain each issue in plain language with context from the code
36
- 3. Offer to show the suggested fixes or apply them directly to the file
37
- 4. If no issues found, acknowledge the code quality and mention any positive behaviors observed
38
- 5. Suggest follow-up actions: generate tests for edge cases, create documentation, or refactor for better maintainability
39
-
40
- Supports: Ruby (Rails), Python, JavaScript/TypeScript (React, Node.js, Express), and more.`,
41
- inputSchema: {
42
- file_path: z.string().describe('Relative or absolute path to the source file (e.g., "app/services/payment_processor.rb", "src/utils/validator.ts")'),
43
- method_name: z.string().describe('Name of the method/function to audit (e.g., "process_payment", "validateUser", "handleSubmit")'),
44
- test_type: z.string().optional().describe('Component type - REQUIRED for JavaScript/Python: "utility", "react_component", "express_handler", "django_view", etc. Ignored for Ruby/Rails.'),
45
- }
46
- }, async (args) => await auditMethod(args));
111
+ server.registerTool('audit_method', { description: auditDescription, inputSchema: auditSchema }, async (args) => await auditMethod(args));
112
+ // Aliases for audit_method
113
+ server.registerTool('review_method', { description: 'Alias of audit_method. Use for "review this method" or "code review".', inputSchema: auditSchema }, async (args) => await auditMethod(args));
114
+ server.registerTool('analyze_method', { description: 'Alias of audit_method. Use for "analyze this method".', inputSchema: auditSchema }, async (args) => await auditMethod(args));
47
115
  // 2. Generate Test - AI Test Generation
48
- server.registerTool('generate_test', {
49
- description: `Generate comprehensive, production-ready tests for a specific method or function using AI. This tool:
50
- - **Automatically detects** the appropriate test framework (RSpec, Jest, Pytest, Mocha, etc.)
51
- - **Creates complete test files** with proper imports, setup, teardown, and test structure
52
- - **Covers multiple scenarios**: Happy path, edge cases, error handling, boundary conditions
53
- - **Includes assertions** for return values, side effects, state changes, and error conditions
54
- - **Adds mocking/stubbing** for external dependencies, API calls, database queries
55
- - **Follows best practices** for the detected framework and language
56
-
57
- Use this when the user asks to "write tests", "generate tests", "create specs", "test this code", or "add test coverage".
58
-
59
- Returns: Complete test file code with test count, file path where it should be saved, and the command to run the tests.
60
-
61
- **How to use the results:**
62
- 1. Show the generated test code in a code block with proper syntax highlighting
63
- 2. Explain what scenarios the tests cover (happy path, edge cases, errors)
64
- 3. Provide the file path where the test should be saved
65
- 4. Show the command to run the tests (e.g., "npm test", "pytest", "rspec")
66
- 5. Offer to save the test file directly or let the user review it first
67
- 6. Suggest running the tests to verify they pass, or offer to fix any issues if they fail
68
-
69
- Supports: Ruby (RSpec, Minitest), JavaScript/TypeScript (Jest, Mocha, Vitest), Python (Pytest, unittest), and more.`,
70
- inputSchema: {
71
- file_path: z.string().describe('Relative or absolute path to the source file to generate tests for'),
72
- method_name: z.string().describe('Name of the method/function to generate tests for'),
73
- test_type: z.string().optional().describe('Component type or test framework hint - REQUIRED for JS/Python: "utility", "react_component", "express_handler", etc.'),
74
- }
75
- }, async (args) => await generateTest(args));
116
+ server.registerTool('generate_test', { description: generateDescription, inputSchema: generateSchema }, async (args) => await generateTest(args));
117
+ // Aliases for generate_test
118
+ server.registerTool('generate_tests', { description: 'Alias of generate_test. Use for "generate tests".', inputSchema: generateSchema }, async (args) => await generateTest(args));
119
+ server.registerTool('write_tests', { description: 'Alias of generate_test. Use for "write tests".', inputSchema: generateSchema }, async (args) => await generateTest(args));
76
120
  // 3. X-Ray Visualization - Code Flow Diagrams
77
- server.registerTool('xray_method', {
78
- description: `Generate a visual X-Ray diagram (Mermaid flowchart) that maps out the logic flow of a specific method or function. This tool:
79
- - **Creates flowcharts** showing decision points, loops, function calls, and control flow
80
- - **Visualizes complexity** making it easy to understand what the code does at a glance
81
- - **Identifies code paths** including conditional branches, error handling, and edge cases
82
- - **Shows relationships** between different parts of the method
83
-
84
- Use this when the user asks for a "diagram", "flowchart", "visual representation", "map out the logic", "show me how this works visually", or "xray".
85
-
86
- Returns: Mermaid diagram code that can be rendered in Markdown-compatible viewers (GitHub, VS Code, etc.).
87
-
88
- **How to use the results:**
89
- 1. Display the Mermaid diagram code in a code block with \`\`\`mermaid syntax
90
- 2. Explain the main flow and key decision points shown in the diagram
91
- 3. Point out any complex branches or loops that might need attention
92
- 4. Suggest using the diagram for documentation or code reviews
93
- 5. If the diagram reveals high complexity, offer to audit the method for potential simplification
94
-
95
- Supports: All languages - Ruby, Python, JavaScript/TypeScript, Go, and more.`,
96
- inputSchema: {
97
- file_path: z.string().describe('Relative or absolute path to the source file'),
98
- method_name: z.string().describe('Name of the method/function to visualize'),
99
- }
100
- }, async (args) => await xrayMethod(args));
121
+ server.registerTool('xray_method', { description: xrayDescription, inputSchema: methodSchema }, async (args) => await xrayMethod(args));
122
+ // Aliases for xray_method
123
+ server.registerTool('xray_diagram', { description: 'Alias of xray_method. Use for "diagram" or "flowchart".', inputSchema: methodSchema }, async (args) => await xrayMethod(args));
124
+ server.registerTool('visualize_flow', { description: 'Alias of xray_method. Use for "visualize flow".', inputSchema: methodSchema }, async (args) => await xrayMethod(args));
101
125
  // 4. Trace Method - Symbolic Execution Analysis
102
- server.registerTool('trace_method', {
103
- description: `Generate a symbolic trace showing the step-by-step execution path through a method or function. This tool:
104
- - **Simulates execution** with symbolic values to explore all possible code paths
105
- - **Shows variable states** and how they change throughout execution
106
- - **Identifies branches** and which conditions lead to which outcomes
107
- - **Reveals execution order** of statements, function calls, and side effects
108
- - **Helps debug** by showing exactly what happens when the code runs
109
-
110
- Use this when the user asks to "trace", "step through", "show execution", "debug flow", "walk through the code", or "see what happens when this runs".
111
-
112
- Returns: Detailed execution trace with line-by-line analysis, variable states, and decision points.
113
-
114
- **How to use the results:**
115
- 1. Present the trace in a clear, step-by-step format
116
- 2. Highlight key decision points and branch conditions
117
- 3. Explain how variables change throughout execution
118
- 4. Point out any unexpected behavior or potential issues discovered
119
- 5. Use the trace to answer specific debugging questions or explain complex logic
120
- 6. Suggest areas where the code might benefit from simplification or better error handling
121
-
122
- Supports: All languages - Ruby, Python, JavaScript/TypeScript, and more.`,
126
+ server.registerTool('trace_method', { description: traceDescription, inputSchema: methodSchema }, async (args) => await traceMethod(args));
127
+ // 4.5 Impact Method - Blast Radius Analysis
128
+ server.registerTool('impact_method', { description: impactDescription, inputSchema: impactSchema }, async (args) => await impactMethod(args));
129
+ // Aliases for impact_method
130
+ server.registerTool('impact_analysis', { description: 'Alias of impact_method. Use for "impact analysis" or "blast radius".', inputSchema: impactSchema }, async (args) => await impactMethod(args));
131
+ server.registerTool('impact_audit', { description: 'Alias of impact_method. Use for "regression check".', inputSchema: impactSchema }, async (args) => await impactMethod(args));
132
+ server.registerTool('regression_check', { description: 'Alias of impact_method. Use for "regression check".', inputSchema: impactSchema }, async (args) => await impactMethod(args));
133
+ server.registerTool('blast_radius', { description: 'Alias of impact_method. Use for "blast radius check".', inputSchema: impactSchema }, async (args) => await impactMethod(args));
134
+ // Aliases for trace_method
135
+ server.registerTool('trace_execution', { description: 'Alias of trace_method. Use for "trace execution".', inputSchema: methodSchema }, async (args) => await traceMethod(args));
136
+ // 5. Detect Clones - Code Duplication Detection
137
+ server.registerTool('detect_clones', { description: clonesDescription, inputSchema: clonesSchema }, async (args) => await detectClones(args));
138
+ // Aliases for detect_clones
139
+ server.registerTool('find_clones', { description: 'Alias of detect_clones. Use for "find duplicates".', inputSchema: clonesSchema }, async (args) => await detectClones(args));
140
+ // 6. Detect Dead Code - Unused Code Detection
141
+ server.registerTool('detect_deadcode', { description: deadcodeDescription, inputSchema: deadCodeSchema }, async (args) => await detectDeadCode(args));
142
+ // Aliases for detect_deadcode
143
+ server.registerTool('find_deadcode', { description: 'Alias of detect_deadcode. Use for "find unused code".', inputSchema: deadCodeSchema }, async (args) => await detectDeadCode(args));
144
+ // 7. Find Call Sites - Usage Detection
145
+ server.registerTool('find_call_sites', { description: callSitesDescription, inputSchema: callSitesSchema }, async (args) => await findCallSites(args));
146
+ // Alias for find_call_sites
147
+ server.registerTool('call_sites', { description: 'Alias of find_call_sites. Use for "find usages" or "where is this called".', inputSchema: callSitesSchema }, async (args) => await findCallSites(args));
148
+ // 8. Capabilities - List Available Tools
149
+ server.registerTool('list_capabilities', {
150
+ description: 'List available TNG MCP tools and when to use them.',
151
+ inputSchema: {},
152
+ }, async () => ({
153
+ content: [
154
+ {
155
+ type: 'text',
156
+ text: [
157
+ 'TNG MCP capabilities:',
158
+ '- audit_method: audit/review/analyze a method for issues',
159
+ '- generate_test: generate tests for a method',
160
+ '- xray_method: Mermaid flow diagram for a method',
161
+ '- trace_method: symbolic execution trace',
162
+ '- impact_method: run a regression check (blast radius) for a method',
163
+ '- detect_clones: find duplicate code in a file',
164
+ '- detect_deadcode: find unused/unreachable code in a file (or whole project with all=true)',
165
+ '- find_call_sites: locate in-repo call sites for a method/function',
166
+ '',
167
+ 'Best practices:',
168
+ '- Prefer file paths relative to the project root.',
169
+ '- If the server runs outside the repo, pass project_root or use absolute file paths.',
170
+ '- For JS/Python, include test_type when generating tests or auditing.',
171
+ '',
172
+ 'Aliases: review_method, analyze_method, generate_tests, write_tests, xray_diagram, visualize_flow, trace_execution, impact_analysis, impact_audit, regression_check, blast_radius, find_clones, find_deadcode.',
173
+ ].join('\n'),
174
+ },
175
+ ],
176
+ }));
177
+ // 7.5 Validate Request - Preflight check for file/method existence
178
+ server.registerTool('validate_request', {
179
+ description: 'Validate file_path and optional method_name before running a TNG tool. Returns a checklist and recommendations.',
123
180
  inputSchema: {
124
181
  file_path: z.string().describe('Relative or absolute path to the source file'),
125
- method_name: z.string().describe('Name of the method/function to trace'),
182
+ method_name: z.string().optional().describe('Name of the method/function (optional)'),
183
+ project_root: z.string().optional().describe('Project root to resolve relative paths (optional)'),
184
+ },
185
+ }, async (args) => {
186
+ const filePath = String(args?.file_path || '');
187
+ const methodName = args?.method_name ? String(args.method_name) : '';
188
+ const projectRoot = args?.project_root ? String(args.project_root) : undefined;
189
+ const absoluteFilePath = resolveFilePath(filePath, projectRoot);
190
+ const exists = existsSync(absoluteFilePath);
191
+ let methodFound = false;
192
+ let methodCheckSkipped = false;
193
+ let methodCheckError = null;
194
+ if (exists && methodName) {
195
+ try {
196
+ const content = readFileSync(absoluteFilePath, 'utf8');
197
+ methodFound = content.includes(methodName);
198
+ }
199
+ catch (e) {
200
+ methodCheckError = e?.message || 'Unknown error reading file';
201
+ }
126
202
  }
127
- }, async (args) => await traceMethod(args));
128
- // 5. Detect Clones - Code Duplication Detection
129
- server.registerTool('detect_clones', {
130
- description: `Detect code duplication (clones) within a file at multiple levels of similarity. This tool finds:
131
- - **Type 1 (Exact clones)**: Identical code except for whitespace and comments
132
- - **Type 2 (Renamed clones)**: Structurally identical code with different variable/function names
133
- - **Type 3 (Near-miss clones)**: Similar code with minor modifications (statements added/removed)
134
-
135
- Use this when the user asks to "find duplicates", "check for clones", "find repeated code", "detect copy-paste", or "find similar code".
136
-
137
- Returns: List of clone pairs with similarity scores, exact line locations, and the duplicated code snippets.
138
-
139
- **How to use the results:**
140
- 1. Summarize the number and types of clones found
141
- 2. Show the most significant duplications first (highest similarity or largest code blocks)
142
- 3. Explain the impact of each duplication on maintainability
143
- 4. Suggest refactoring strategies: extract to shared function, create a base class, use a loop, etc.
144
- 5. Offer to help refactor the duplicated code into reusable components
145
- 6. If no clones found, acknowledge good code organization
146
-
147
- Supports: All languages - Ruby, Python, JavaScript/TypeScript, and more.`,
148
- inputSchema: {
149
- file_path: z.string().describe('Relative or absolute path to the source file to analyze for duplication'),
150
- level: z.string().optional().describe('Clone detection level: "1" (exact), "2" (structural), "3" (fuzzy/near-miss), or "all" (default - detects all types)'),
203
+ else if (!methodName) {
204
+ methodCheckSkipped = true;
151
205
  }
152
- }, async (args) => await detectClones(args));
153
- // 6. Detect Dead Code - Unused Code Detection
154
- server.registerTool('detect_deadcode', {
155
- description: `Detect dead code and unused elements in a file, including:
156
- - **Unused imports/requires**: Modules imported but never used
157
- - **Unused variables**: Variables declared but never referenced
158
- - **Unused functions**: Private/local functions that are never called
159
- - **Unused parameters**: Function parameters that are never used in the function body
160
- - **Unreachable code**: Code that can never be executed (after return, in impossible conditions)
161
-
162
- Use this when the user asks to "find dead code", "find unused code", "check for unused imports", "clean up unused variables", or "find unreachable code".
163
-
164
- Returns: List of unused/dead code elements with exact locations, types (import/variable/function), and suggestions for cleanup.
165
-
166
- **How to use the results:**
167
- 1. Categorize findings by type (unused imports, variables, functions, etc.)
168
- 2. Explain why each element is considered unused
169
- 3. Suggest safe removal of truly unused code
170
- 4. Warn about potential false positives (e.g., variables used in eval, reflection, or external configs)
171
- 5. Offer to remove the dead code automatically or show a cleaned-up version
172
- 6. If the file is clean, acknowledge good code hygiene
173
-
174
- Supports: Python, JavaScript/TypeScript, Ruby (coming soon).`,
206
+ const projectRootDetected = exists ? (projectRoot || findProjectRoot(absoluteFilePath) || null) : null;
207
+ const response = {
208
+ ok: exists && (methodName ? methodFound : true) && !methodCheckError,
209
+ file: {
210
+ provided: filePath,
211
+ resolved: absoluteFilePath,
212
+ exists,
213
+ },
214
+ method: {
215
+ provided: methodName || null,
216
+ found: methodName ? methodFound : null,
217
+ skipped: methodCheckSkipped ? true : null,
218
+ error: methodCheckError,
219
+ },
220
+ project_root: {
221
+ provided: projectRoot || null,
222
+ detected: projectRootDetected,
223
+ },
224
+ recommendations: [
225
+ !exists ? 'Check file_path or provide project_root.' : null,
226
+ methodName && !methodFound ? 'Confirm method_name or use the exact symbol spelling.' : null,
227
+ methodCheckError ? `Failed to read file for method check: ${methodCheckError}` : null,
228
+ ].filter(Boolean),
229
+ };
230
+ return {
231
+ content: [
232
+ {
233
+ type: 'text',
234
+ text: JSON.stringify(response, null, 2),
235
+ },
236
+ ],
237
+ };
238
+ });
239
+ // 8. Request Router - Map Natural Language to a Tool
240
+ server.registerTool('route_tng_request', {
241
+ description: 'Route a natural-language request to the best TNG tool and list required arguments.',
175
242
  inputSchema: {
176
- file_path: z.string().describe('Relative or absolute path to the source file to analyze for dead code'),
243
+ request: z.string().describe('The user request to classify (e.g., "review this method", "generate tests for X")'),
244
+ },
245
+ }, async (args) => {
246
+ const rawRequest = String(args?.request || '');
247
+ const request = rawRequest.toLowerCase();
248
+ const matchAny = (phrases) => phrases.some((p) => request.includes(p));
249
+ const toolOrder = [
250
+ { tool: 'generate_test', phrases: ['write test', 'write tests', 'generate test', 'generate tests', 'create specs', 'add test coverage', 'test coverage'] },
251
+ { tool: 'impact_method', phrases: ['regression', 'regression check', 'impact', 'blast radius', 'breaking change', 'breakage', 'what breaks', 'change impact'] },
252
+ { tool: 'audit_method', phrases: ['audit', 'review', 'analyze', 'inspect', 'check', 'security', 'vulnerab', 'bug', 'issue', 'code smell'] },
253
+ { tool: 'xray_method', phrases: ['diagram', 'flowchart', 'visual', 'mermaid', 'xray', 'x-ray', 'flow'] },
254
+ { tool: 'trace_method', phrases: ['trace', 'step through', 'step-by-step', 'execution', 'debug flow'] },
255
+ { tool: 'find_call_sites', phrases: ['call sites', 'callsite', 'usages', 'usage', 'where is this used', 'who calls', 'find references'] },
256
+ { tool: 'detect_clones', phrases: ['clone', 'duplicate', 'copy-paste', 'repeated code', 'similar code'] },
257
+ { tool: 'detect_deadcode', phrases: ['dead code', 'unused', 'unreachable', 'unused import', 'unused variable'] },
258
+ ];
259
+ const matched = toolOrder.find((entry) => matchAny(entry.phrases));
260
+ const tool = matched?.tool || null;
261
+ const backticks = [...rawRequest.matchAll(/`([^`]+)`/g)].map((m) => m[1]);
262
+ let file_path = null;
263
+ let method_name = null;
264
+ for (const token of backticks) {
265
+ if (token.includes('#')) {
266
+ const [left, right] = token.split('#');
267
+ if (left && (left.includes('/') || left.includes('.'))) {
268
+ file_path = left;
269
+ }
270
+ if (right) {
271
+ method_name = right;
272
+ }
273
+ }
274
+ else if (token.includes('/') || token.includes('.')) {
275
+ file_path = token;
276
+ }
277
+ else if (!method_name && /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(token)) {
278
+ method_name = token;
279
+ }
177
280
  }
178
- }, async (args) => await detectDeadCode(args));
281
+ const required = [];
282
+ if (tool === 'audit_method' || tool === 'generate_test' || tool === 'xray_method' || tool === 'trace_method' || tool === 'impact_method' || tool === 'find_call_sites') {
283
+ required.push('file_path', 'method_name');
284
+ }
285
+ if (tool === 'detect_clones') {
286
+ required.push('file_path');
287
+ }
288
+ if (tool === 'detect_deadcode') {
289
+ const wantsAll = matchAny(['project', 'entire project', 'whole project', 'project-wide', 'all files', 'scan all', 'repository']);
290
+ if (!wantsAll) {
291
+ required.push('file_path');
292
+ }
293
+ }
294
+ const missing = required.filter((key) => (key === 'file_path' ? !file_path : !method_name));
295
+ const response = {
296
+ tool,
297
+ reason: tool ? `Matched keywords for ${tool}.` : 'No matching keywords found. Ask the user to clarify the intent.',
298
+ suggested_args: {
299
+ file_path,
300
+ method_name,
301
+ all: tool === 'detect_deadcode' && matchAny(['project', 'entire project', 'whole project', 'project-wide', 'all files', 'scan all', 'repository']),
302
+ note: tool === 'generate_test' || tool === 'audit_method'
303
+ ? 'For JS/Python, test_type may be required (e.g., utility, react_component, express_handler).'
304
+ : undefined,
305
+ },
306
+ missing_required_args: missing,
307
+ };
308
+ return {
309
+ content: [
310
+ {
311
+ type: 'text',
312
+ text: JSON.stringify(response, null, 2),
313
+ },
314
+ ],
315
+ };
316
+ });
179
317
  // Start the MCP server
180
318
  async function main() {
181
319
  const transport = new StdioServerTransport();
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MA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,KAAK,cAAc;gBACrD,CAAC,CAAC,6FAA6F;gBAC/F,CAAC,CAAC,SAAS;SAClB;QACD,qBAAqB,EAAE,OAAO;KACjC,CAAC;IAEF,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;aAC1C;SACJ;KACJ,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,uBAAuB;AACvB,KAAK,UAAU,IAAI;IACf,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;AACrD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;IAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
@@ -1,21 +1,18 @@
1
1
  interface AuditArgs {
2
2
  file_path: string;
3
3
  method_name: string;
4
+ class_name?: string;
4
5
  test_type?: string;
5
6
  project_root?: string;
7
+ response_format?: 'text' | 'json' | 'both';
8
+ raw_json?: boolean;
6
9
  }
7
10
  export declare function auditMethod(args: AuditArgs): Promise<{
8
11
  content: {
9
12
  type: "text";
10
13
  text: string;
11
14
  }[];
12
- isError: boolean;
13
- } | {
14
- content: {
15
- type: "text";
16
- text: string;
17
- }[];
18
- isError?: undefined;
15
+ isError: boolean | undefined;
19
16
  }>;
20
17
  export {};
21
18
  //# sourceMappingURL=audit.d.ts.map