Skip to main content
Glama

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
NameRequiredDescriptionDefault
typeYesQuick switch type

Implementation Reference

  • 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}` } ] }; }
  • 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'] } },
  • 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 }; });

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/hlsitechio/mcp-instruct'

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