Skip to main content
Glama

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
NameRequiredDescriptionDefault
agentYesAgent ID to activate

Implementation Reference

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

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