Skip to main content
Glama
code-alchemist01

Development Tools MCP Server

find_unused_dependencies

Identify and remove unused dependencies in your project to reduce bloat and improve performance. Analyzes project structure to find unnecessary packages.

Instructions

Find unused dependencies in project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathNoPath to project root

Implementation Reference

  • Handler for 'find_unused_dependencies' tool: calls DependencyAnalyzer.analyzeDependencies with unused check and returns unused dependencies list and count.
    case 'find_unused_dependencies': {
      const report = await analyzer.analyzeDependencies(projectPath, {
        checkUnused: true,
        checkOutdated: false,
        checkVulnerabilities: false,
      });
      return {
        unused: report.unused,
        total: report.unused.length,
      };
    }
  • Schema definition for 'find_unused_dependencies' tool, specifying input parameters like projectPath.
    {
      name: 'find_unused_dependencies',
      description: 'Find unused dependencies in project',
      inputSchema: {
        type: 'object',
        properties: {
          projectPath: {
            type: 'string',
            description: 'Path to project root',
          },
        },
      },
    },
  • src/server.ts:18-25 (registration)
    Registration of dependencyAnalysisTools (including find_unused_dependencies) into the combined allTools list for MCP server.
    const allTools = [
      ...codeAnalysisTools,
      ...codeQualityTools,
      ...dependencyAnalysisTools,
      ...lintingTools,
      ...webScrapingTools,
      ...apiDiscoveryTools,
    ];
  • src/server.ts:66-67 (registration)
    Dispatch/registration logic in MCP server that routes calls to handleDependencyAnalysisTool for dependency tools including find_unused_dependencies.
    } else if (dependencyAnalysisTools.some((t) => t.name === name)) {
      result = await handleDependencyAnalysisTool(name, args || {});
  • Core helper method findUnusedDependencies used by the analyzer (placeholder implementation with depcheck integration comments).
    private async findUnusedDependencies(_projectPath: string): Promise<string[]> {
      // This is a simplified version. In production, we'd use the depcheck library
      // For now, return empty array - actual implementation would require depcheck
      try {
        // Would use: const { depcheck } = await import('depcheck');
        // const result = await depcheck(projectPath, {});
        // return result.dependencies || [];
        return [];
      } catch {
        return [];
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Find') but doesn't describe traits like whether it's read-only, what output format to expect, if it requires specific project structures, or any performance considerations. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core purpose, making it easy to scan and understand quickly, which is ideal for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (analyzing dependencies) and lack of annotations and output schema, the description is incomplete. It doesn't explain what 'unused' means, how dependencies are identified, or what the result looks like, leaving gaps that could hinder effective use by an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'projectPath' documented as 'Path to project root'. The description doesn't add any meaning beyond this, such as examples or constraints, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Find unused dependencies in project' clearly states the verb ('Find') and resource ('unused dependencies'), specifying what the tool does. It distinguishes from siblings like 'analyze_dependencies' or 'check_outdated_packages' by focusing on unused ones, but doesn't explicitly contrast them, keeping it at a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'analyze_dependencies' or 'suggest_dependency_updates'. It lacks context about prerequisites, such as needing a project with dependencies, or exclusions, leaving the agent to infer usage from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/code-alchemist01/development-tools-mcp-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server