Skip to main content
Glama
leesgit

claude-session-continuity-mcp

verify_test

Run the project's test suite with auto-detected platform commands. Optionally specify a test file or directory for targeted testing.

Instructions

Run the project's test suite (auto-detected per platform: "pnpm test:run" for Web, "flutter test" for Flutter, "./gradlew test" for Android). Optionally scope to a specific test file or directory. Side effects: executes a shell command with a 5-minute timeout. Returns {success, output}. Use verify_all to run build + test + lint together.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesProject name (must match a directory under apps/)
testPathNoSpecific test file or directory to run (optional — runs all tests if omitted)

Implementation Reference

  • The main handler function 'handleVerify' that executes the verify tool logic. It validates input via VerifySchema, detects the project platform, runs specified gates (build/test/lint) via shell commands, and returns results.
    export async function handleVerify(args: unknown): Promise<CallToolResult> {
      return logger.withTool('verify', async () => {
        // 입력 검증
        const parsed = VerifySchema.safeParse(args);
        if (!parsed.success) {
          return {
            content: [{ type: 'text' as const, text: `Validation error: ${parsed.error.message}` }],
            isError: true
          };
        }
    
        const { project, gates } = parsed.data;
        const projectPath = path.join(APPS_DIR, project);
    
        // 플랫폼 감지
        const platform = await detectPlatform(projectPath);
        const commands = PLATFORM_COMMANDS[platform] || PLATFORM_COMMANDS.node;
    
        const results: Record<string, { success: boolean; output?: string; error?: string; duration: number }> = {};
    
        for (const gate of gates) {
          const command = commands[gate];
          if (!command) continue;
    
          const startTime = Date.now();
          const result = await runCommand(command, projectPath);
          const duration = Date.now() - startTime;
    
          results[gate] = {
            success: result.success,
            output: result.success ? result.output?.slice(-500) : undefined,
            error: !result.success ? result.error?.slice(-1000) : undefined,
            duration
          };
    
          logger.info(`Gate ${gate} ${result.success ? 'passed' : 'failed'}`, {
            duration,
            success: result.success
          }, 'verify');
        }
    
        const allPassed = Object.values(results).every(r => r.success);
    
        // active_context에 검증 결과 저장
        try {
          db.prepare(`
            UPDATE active_context SET last_verification = ?, updated_at = CURRENT_TIMESTAMP
            WHERE project = ?
          `).run(allPassed ? 'passed' : 'failed', project);
        } catch { /* ignore */ }
    
        return {
          content: [{
            type: 'text' as const,
            text: JSON.stringify({
              project,
              platform,
              allPassed,
              results,
              summary: Object.entries(results)
                .map(([gate, r]) => `${gate}: ${r.success ? '✅' : '❌'} (${r.duration}ms)`)
                .join(', ')
            }, null, 2)
          }]
        };
      }, args as Record<string, unknown>);
    }
  • The VerifySchema which defines the input schema for the 'verify' tool: a project name and an array of verification gates (build, test, lint) with defaults.
    export const VerifySchema = z.object({
      project: ProjectNameSchema,
      gates: z.array(VerificationGateSchema).default(['build', 'test', 'lint']).describe('실행할 게이트')
    }).describe('프로젝트 검증 (빌드/테스트/린트)');
  • The VerificationGateSchema enum defining valid gate values: 'build', 'test', 'lint'.
    export const VerificationGateSchema = z.enum([
      'build',
      'test',
      'lint'
    ]).describe('검증 게이트');
  • The tool definition 'verifyTools' array registering the 'verify' tool with its name, description, and inputSchema.
    export const verifyTools: Tool[] = [
      {
        name: 'verify',
        description: `프로젝트 검증 (빌드/테스트/린트).
    - gates: 실행할 게이트 배열 (기본: 전체)
      - build: 빌드 검증
      - test: 테스트 실행
      - lint: 린트 검사
    각 게이트 결과와 전체 성공 여부 반환.
    실패 시 에러 메시지 포함.`,
        inputSchema: {
          type: 'object',
          properties: {
            project: { type: 'string', description: '프로젝트명' },
            gates: {
              type: 'array',
              items: { type: 'string', enum: ['build', 'test', 'lint'] },
              description: '실행할 게이트 (기본: 전체)'
            }
          },
          required: ['project']
        }
      }
    ];
  • The router case in handleToolV2 that dispatches to handleVerify when the tool name is 'verify'.
    // Verify
    case 'verify':
      return handleVerify(args);
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses side effects (shell command execution, 5-minute timeout) and return shape, though could note permission or file system implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences with no redundancy, front-loaded with the main action and key details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers multi-platform, timeout, return format, and alternative tool, making it self-contained for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds meaning beyond schema by explaining that testPath is optional and defaults to all tests, and that project must match a directory under apps/.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool runs the project's test suite with platform-specific commands, and distinguishes itself from siblings like verify_all and verify_build.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises when to use verify_all instead for combined build+test+lint, and implies scoping via testPath parameter.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/leesgit/claude-session-continuity-mcp'

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