Skip to content

Add search action to getSourceCode tool for searching original TypeScript sources #72

@InDate

Description

@InDate

Feature Request

Add a search action to the getSourceCode tool that:

  1. Searches original TypeScript/source files via sourcemaps (not compiled JS)
  2. Returns precise file:line:column locations
  3. Auto-discovers sourcemaps from common build directories (build, dist, out, .next, lib)
  4. Falls back to reading original sources from disk when sourcesContent is not embedded
  5. Supports regex patterns, case sensitivity, and URL filtering

This enables effective code search during debugging of both Node.js and web applications.

Usage

getSourceCode({ action: 'search', pattern: 'interface.*Handler', urlFilter: 'src/' })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions