suggest_dependency_updates
Analyzes project dependencies to identify outdated packages and recommend updates for improved compatibility and security.
Instructions
Suggest dependency updates based on analysis
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | No | Path to project root |
Implementation Reference
- src/tools/dependency-analysis.ts:92-104 (registration)Registration of the 'suggest_dependency_updates' tool, including name, description, and input schema.{ name: 'suggest_dependency_updates', description: 'Suggest dependency updates based on analysis', inputSchema: { type: 'object', properties: { projectPath: { type: 'string', description: 'Path to project root', }, }, }, },
- src/tools/dependency-analysis.ts:170-198 (handler)Handler implementation for 'suggest_dependency_updates' tool within handleDependencyAnalysisTool function. Analyzes dependencies for unused, outdated, and vulnerable packages, then generates suggestions for removal or updates.case 'suggest_dependency_updates': { const report = await analyzer.analyzeDependencies(projectPath, { checkUnused: true, checkOutdated: true, checkVulnerabilities: true, }); return { suggestions: [ ...report.unused.map((dep) => ({ package: dep, action: 'remove', reason: 'Unused dependency', })), ...report.outdated.map((pkg) => ({ package: pkg.name, action: 'update', current: pkg.current, latest: pkg.latest, reason: 'Outdated version', })), ...report.vulnerabilities.map((vuln) => ({ package: vuln.name, action: 'update', reason: `Security vulnerability: ${vuln.title}`, severity: vuln.severity, })), ], }; }