agent_activate
Activate specialized AI agents for IT support, security testing, sales assistance, or team collaboration tasks within the MCP Instruct server.
Instructions
Activate a specialized AI agent (IT Expert, Hacker, Sales, Blue/Red/Purple Team)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | Yes | Agent ID to activate |
Implementation Reference
- src/index.ts:898-918 (handler)Executes the agent_activate tool: initializes AgentManager, sets the specified agent as active if valid, retrieves agent details and tools, returns success message with available default tools.case 'agent_activate': { await am.initialize(); const { agent } = args as any; const success = am.setActiveAgent(agent); if (!success) { throw new Error(`Agent not found: ${agent}`); } const activeAgent = am.getActiveAgent(); const tools = getAgentTools(agent); return { content: [ { type: 'text', text: `✅ Activated ${activeAgent?.name}\n\nTools available: ${tools?.defaultTools.join(', ') || 'none'}` } ] }; }
- src/index.ts:348-362 (registration)Registers the agent_activate tool in the tools array returned by ListToolsRequestHandler, including name, description, and input schema with required 'agent' parameter from predefined enum.{ name: 'agent_activate', description: 'Activate a specialized AI agent (IT Expert, Hacker, Sales, Blue/Red/Purple Team)', inputSchema: { type: 'object', properties: { agent: { type: 'string', enum: ['it-expert', 'ethical-hacker', 'sales-expert', 'blue-team', 'red-team', 'purple-team'], description: 'Agent ID to activate' } }, required: ['agent'] } },
- src/AgentManager.ts:116-122 (helper)AgentManager.setActiveAgent: Core logic to activate an agent by setting this.activeAgent to the provided ID if the template exists in loaded agents, returns success boolean.setActiveAgent(id: string): boolean { if (this.templates.has(id)) { this.activeAgent = id; return true; } return false; }
- src/agent-tools.ts:468-470 (helper)getAgentTools: Retrieves the predefined AgentToolset (tools list and defaultTools) for the given agent ID from AGENT_TOOLSETS lookup.export function getAgentTools(agentId: string): AgentToolset | undefined { return AGENT_TOOLSETS[agentId]; }