Skip to main content
Glama

check_typescript

Identify and report TypeScript type errors in specified files to ensure code correctness during development.

Instructions

Check TypeScript files for type errors

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesTypeScript file paths to check

Implementation Reference

  • The core handler function that implements the TypeScript checking logic. Currently a simplified placeholder that returns no errors unless an exception occurs.
    async checkTypeScript(_filePath: string): Promise<{ errors: Array<{ line: number; column: number; message: string; code: string }>; valid: boolean; }> { // This is a simplified version. In production, we'd use TypeScript compiler API // For now, return basic validation try { // Basic TypeScript syntax checks const errors: Array<{ line: number; column: number; message: string; code: string }> = []; // This is a simplified version. In production, we'd use TypeScript compiler API // For now, return empty errors array return { errors, valid: errors.length === 0, }; } catch (error) { return { errors: [ { line: 1, column: 1, message: error instanceof Error ? error.message : 'Unknown error', code: 'UNKNOWN', }, ], valid: false, }; } }
  • Registers the 'check_typescript' tool in the lintingTools array, including name, description, and input schema.
    { name: 'check_typescript', description: 'Check TypeScript files for type errors', inputSchema: { type: 'object', properties: { files: { type: 'array', items: { type: 'string' }, description: 'TypeScript file paths to check', }, }, required: ['files'], }, },
  • The dispatch handler in handleLintingTool that extracts input files and calls the checkTypeScript utility for each file.
    case 'check_typescript': { const files = params.files as string[]; const results = await Promise.all( files.map((file) => lintingUtils.checkTypeScript(file)) ); return results; }
  • Imports the LintingUtils class containing the checkTypeScript handler.
    import { LintingUtils } from '../utils/linting-utils.js'; import { Formatters } from '../utils/formatters.js';

Latest Blog Posts

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/code-alchemist01/development-tools-mcp-Server'

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