Skip to main content
Glama

agent_activate

Activate specialized AI agents for IT support, ethical hacking, sales expertise, or security team roles to enhance task-specific assistance and knowledge application.

Instructions

Activate a specialized AI agent (IT Expert, Hacker, Sales, Blue/Red/Purple Team)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentYesAgent ID to activate

Implementation Reference

  • Main handler logic for the agent_activate tool. Initializes AgentManager, sets the specified agent as active, retrieves the active agent details and its default tools, and returns a confirmation message with available 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'}` } ] }; }
  • Tool schema definition including name, description, and input schema specifying the 'agent' parameter with valid enum values.
    { 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'] } },
  • Core helper method in AgentManager that sets the active agent ID if the agent template exists in the loaded templates.
    setActiveAgent(id: string): boolean { if (this.templates.has(id)) { this.activeAgent = id; return true; } return false; }
  • Helper function that retrieves the predefined toolset for the specified agent, used to list available tools after activation.
    export function getAgentTools(agentId: string): AgentToolset | undefined { return AGENT_TOOLSETS[agentId]; }
  • src/index.ts:423-425 (registration)
    Registration handler for listing all available tools, including agent_activate, by returning the global tools array.
    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