UNPKG

typeref-mcp

Version:

TypeScript type inference and symbol navigation MCP server for Claude Code

247 lines 10.2 kB
export declare const TOOLS: readonly [{ readonly name: "index_project"; readonly description: "Index a TypeScript project for type inference and symbol navigation. Must be called before other operations."; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root directory"; }; readonly force: { readonly type: "boolean"; readonly description: "Force re-indexing even if project is already indexed"; readonly default: false; }; }; readonly required: readonly ["projectPath"]; }; }, { readonly name: "get_type_inference"; readonly description: "Get precise type information for a symbol at a specific position in a file"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript file"; }; readonly position: { readonly type: "number"; readonly description: "Character position in the file (0-based)"; }; readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root"; }; }; readonly required: readonly ["filePath", "position", "projectPath"]; }; }, { readonly name: "get_type_definition"; readonly description: "Get complete definition of a type/interface with all properties and methods"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly typeName: { readonly type: "string"; readonly description: "Name of the type/interface to look up"; }; readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root"; }; readonly contextFile: { readonly type: "string"; readonly description: "Optional: File path for context-aware type resolution"; }; }; readonly required: readonly ["typeName", "projectPath"]; }; }, { readonly name: "find_symbol"; readonly description: "Find symbols by name with optional filtering and fuzzy matching"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly symbolName: { readonly type: "string"; readonly description: "Name of the symbol to search for"; }; readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root"; }; readonly kind: { readonly type: "string"; readonly enum: readonly ["variable", "function", "class", "interface", "type", "enum", "module", "namespace", "property", "method", "constructor", "parameter"]; readonly description: "Optional: Filter by symbol kind"; }; readonly includePrivate: { readonly type: "boolean"; readonly description: "Include non-exported symbols"; readonly default: false; }; readonly maxResults: { readonly type: "number"; readonly description: "Maximum number of results to return"; readonly default: 20; }; readonly fuzzyMatch: { readonly type: "boolean"; readonly description: "Enable fuzzy matching for broader results"; readonly default: false; }; }; readonly required: readonly ["symbolName", "projectPath"]; }; }, { readonly name: "find_references"; readonly description: "Find all references to a symbol across the project"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly symbolName: { readonly type: "string"; readonly description: "Name of the symbol to find references for"; }; readonly filePath: { readonly type: "string"; readonly description: "File path where the symbol is defined"; }; readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root"; }; }; readonly required: readonly ["symbolName", "filePath", "projectPath"]; }; }, { readonly name: "get_available_symbols"; readonly description: "Get symbols available in a specific context/scope"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript file"; }; readonly position: { readonly type: "number"; readonly description: "Character position in the file for context"; }; readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root"; }; }; readonly required: readonly ["filePath", "position", "projectPath"]; }; }, { readonly name: "get_module_info"; readonly description: "Get module exports, imports, and dependencies"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly modulePath: { readonly type: "string"; readonly description: "Absolute path to the module file"; }; readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root"; }; }; readonly required: readonly ["modulePath", "projectPath"]; }; }, { readonly name: "search_types"; readonly description: "Search for types/interfaces by name or characteristics"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly query: { readonly type: "string"; readonly description: "Search query for type names"; }; readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root"; }; readonly kind: { readonly type: "string"; readonly enum: readonly ["primitive", "object", "array", "function", "union", "intersection", "generic", "conditional", "mapped", "template", "tuple", "unknown"]; readonly description: "Optional: Filter by type kind"; }; readonly maxResults: { readonly type: "number"; readonly description: "Maximum number of results to return"; readonly default: 20; }; }; readonly required: readonly ["query", "projectPath"]; }; }, { readonly name: "get_diagnostics"; readonly description: "Get TypeScript compiler diagnostics (errors, warnings) for a file"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript file"; }; readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root"; }; }; readonly required: readonly ["filePath", "projectPath"]; }; }, { readonly name: "batch_type_analysis"; readonly description: "Perform type analysis on multiple symbols at once for better performance"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly requests: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly type: { readonly type: "string"; readonly enum: readonly ["type_inference", "type_definition", "symbol_search"]; readonly description: "Type of analysis to perform"; }; readonly params: { readonly type: "object"; readonly description: "Parameters specific to the analysis type"; }; }; readonly required: readonly ["type", "params"]; }; readonly description: "Array of analysis requests to process"; }; readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root"; }; }; readonly required: readonly ["requests", "projectPath"]; }; }, { readonly name: "clear_project_cache"; readonly description: "Clear the disk cache for a specific project to force re-indexing"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly projectPath: { readonly type: "string"; readonly description: "Absolute path to the TypeScript project root directory"; }; }; readonly required: readonly ["projectPath"]; }; }]; //# sourceMappingURL=tools.d.ts.map