Skip to main content
Glama

TypeScript Definition Finder

by runninghare

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

NameRequiredDescriptionDefault
file_pathYesThe absolute path to the current typescript file (e.g., '/remote/.../src/index.ts')
line_contentYesThe 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.
symbolYesThe TypeScript symbol (variable, class name, interface, type, etc.) you want to find the definition of. This symbol must be present in the line_content.

Input Schema (JSON Schema)

{ "properties": { "file_path": { "description": "The absolute path to the current typescript file (e.g., '/remote/.../src/index.ts')", "type": "string" }, "line_content": { "description": "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.", "type": "string" }, "symbol": { "description": "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.", "type": "string" } }, "required": [ "file_path", "symbol", "line_content" ], "type": "object" }
Install Server

Other Tools from TypeScript Definition Finder

Related Tools

    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/runninghare/ts-def-mcp'

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