Skip to content

[Refactoring] Audit and Clean tool-handler.ts - Remove Dead Code #13

@gloomcheng

Description

@gloomcheng

Problem

src/core/mcp/handlers/tool-handler.ts is 741 lines and may contain dead code after Issue #11 refactoring.

Status: After splitting StableWorkflowHandler into domain-based handlers, tool-handler.ts might be deprecated or need restructuring.

Investigation Needed

  1. Is tool-handler.ts still used?

    • Check all imports of ToolHandler
    • Identify remaining responsibilities
  2. If used:

    • What functionality does it provide?
    • Can it be split by domain?
    • Does it overlap with new handlers?
  3. If unused:

    • Mark as deprecated
    • Create migration plan
    • Remove safely

Acceptance Criteria

  • Usage audit complete
  • Dead code identified and removed
  • If kept: file split or reduced to <400 lines
  • If removed: all references migrated
  • Build passing, tests green
  • Documentation updated

Priority

🔴 High - Technical debt clarity

Effort Estimate

1 day

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions