agent_switch_quick
Switch between predefined agent personas (IT, hacker, sales, or color-coded roles) using shorthand commands to adapt AI behavior for different contexts.
Instructions
Quick switch agent using shorthand (it/hacker/sales/blue/red/purple)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Quick switch type |
Implementation Reference
- src/index.ts:920-938 (handler)Executes the agent_switch_quick tool by calling AgentManager.quickSwitch(type) and returning confirmation with the new active agent's name.case 'agent_switch_quick': { await am.initialize(); const { type } = args as any; const success = am.quickSwitch(type); if (!success) { throw new Error(`Invalid agent type: ${type}`); } const activeAgent = am.getActiveAgent(); return { content: [ { type: 'text', text: `✅ Switched to ${activeAgent?.name}` } ] }; }
- src/index.ts:363-377 (schema)Input schema definition for the agent_switch_quick tool, specifying the 'type' parameter with allowed shorthands.{ name: 'agent_switch_quick', description: 'Quick switch agent using shorthand (it/hacker/sales/blue/red/purple)', inputSchema: { type: 'object', properties: { type: { type: 'string', enum: ['it', 'hacker', 'sales', 'blue', 'red', 'purple'], description: 'Quick switch type' } }, required: ['type'] } },
- src/AgentManager.ts:167-183 (helper)Core logic for quickSwitch: maps shorthand types to full agent IDs and delegates to setActiveAgent.// Quick switch between common agents quickSwitch(type: 'it' | 'hacker' | 'sales' | 'blue' | 'red' | 'purple'): boolean { const mapping: Record<string, string> = { 'it': 'it-expert', 'hacker': 'ethical-hacker', 'sales': 'sales-expert', 'blue': 'blue-team', 'red': 'red-team', 'purple': 'purple-team' }; const id = mapping[type]; if (id) { return this.setActiveAgent(id); } return false; }
- src/index.ts:422-425 (registration)Registers all tools including agent_switch_quick by returning the tools array in ListToolsRequestSchema handler.// Handler for listing tools server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });