find_typescript_definition
Locate the definition of any TypeScript symbol in your codebase by providing the file path, symbol name, and line content. Ideal for finding imported class, interface, or variable definitions.
Instructions
Use /ts-def to trigger this tool. This tool can find the definition of a TypeScript symbol in your codebase. When you encounter an imported symbol (e.g., 'import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"'), this tool will locate its original definition file and code. Simply provide the current file path, the symbol you want to find (e.g., 'StdioServerTransport'), and the line content containing that symbol.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
file_path | Yes | The absolute path to the current typescript file (e.g., '/remote/.../src/index.ts') | |
line_content | Yes | The entire line containing the symbol you want to find the definition of. The line content will be used to find both the line number in the file and the exact position of the symbol. | |
symbol | Yes | The TypeScript symbol (variable, class name, interface, type, etc.) you want to find the definition of. This symbol must be present in the line_content. |