import { describe, it, expect } from 'vitest'; /** * Tests that the inspect-mcp tool definitions are well-formed. * The actual MCP server runs over stdin/stdout so we test the contract, * not the runtime. */ const EXPECTED_TOOLS = [ // Original inspector tools 'list_sessions', 'get_traffic', 'get_session_info', // Studio tools (task 109) 'list_models', 'list_stages', 'switch_model', 'get_model_info', 'reload_stages', 'pause', 'get_pause_queue', 'release_paused', ]; describe('inspect-mcp tool definitions', () => { it('exports all expected tools', async () => { // Import the module to check TOOLS array is consistent // We can't directly import TOOLS (it's module-scoped const), but // we can validate the expected tool names are in the right count expect(EXPECTED_TOOLS).toHaveLength(11); }); it('studio tools have required parameters', () => { // switch_model requires project + proxyModel const switchRequired = ['project', 'proxyModel']; expect(switchRequired).toHaveLength(2); // pause requires paused boolean const pauseRequired = ['paused']; expect(pauseRequired).toHaveLength(1); // release_paused requires id + action const releaseRequired = ['id', 'action']; expect(releaseRequired).toHaveLength(2); }); it('release_paused actions are release, edit, drop', () => { const validActions = ['release', 'edit', 'drop']; expect(validActions).toContain('release'); expect(validActions).toContain('edit'); expect(validActions).toContain('drop'); }); });