Skip to main content
Glama

Reviewer MCP

by jaggederest
runTests.ts942 B
import { TestRunnerOptions } from '../types/index.js'; import { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import { loadProjectConfig } from '../utils/config.js'; import { BaseExecTool } from './exec-base.js'; class RunTestsTool extends BaseExecTool<TestRunnerOptions> { protected getActionName(): string { return 'Test'; } protected async buildCommand(args: TestRunnerOptions): Promise<string> { const { pattern } = args; const config = await loadProjectConfig(); // If no pattern specified, run tests with coverage if (!pattern) { return 'npm run test:coverage'; } // Otherwise run the configured test command with the pattern const command = config.testCommand ?? 'npm test'; return `${command} ${pattern}`; } } const tool = new RunTestsTool(); export async function runTests(args: TestRunnerOptions): Promise<CallToolResult> { return tool.execute(args); }

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/jaggederest/mcp_reviewer'

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