Skip to main content
Glama

agent_get_tools

Retrieve available tools for the current AI agent to enable task execution and functionality access within the MCP Instruct server.

Instructions

Get available tools for current agent

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the agent_get_tools tool. Checks for active agent, calls getAgentTools to retrieve tools, and returns JSON with agent name, tools list, and default tools.
    case 'agent_get_tools': {
      await am.initialize();
      const activeAgent = am.getActiveAgent();
      
      if (!activeAgent) {
        return {
          content: [
            {
              type: 'text',
              text: 'No agent active. Activate an agent first to see available tools.'
            }
          ]
        };
      }
      
      const tools = getAgentTools(activeAgent.id);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              agent: activeAgent.name,
              tools: tools?.tools || [],
              defaultTools: tools?.defaultTools || []
            }, null, 2)
          }
        ]
      };
    }
  • Schema definition for agent_get_tools tool, specifying empty input object.
    {
      name: 'agent_get_tools',
      description: 'Get available tools for current agent',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • Core helper function that returns the AgentToolset for the given agent ID from predefined AGENT_TOOLSETS.
    export function getAgentTools(agentId: string): AgentToolset | undefined {
      return AGENT_TOOLSETS[agentId];
    }
  • src/index.ts:422-425 (registration)
    Registers the list of all tools (including agent_get_tools) with the MCP server via ListToolsRequestSchema handler.
    // Handler for listing tools
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • Predefined toolsets for each agent type, used by getAgentTools to provide agent-specific tools.
    export const AGENT_TOOLSETS: Record<string, AgentToolset> = {
      'it-expert': {
        agentId: 'it-expert',
        tools: [
          {
            id: 'powershell',
            name: 'PowerShell',
            description: 'Windows PowerShell for system administration',
            command: 'pwsh -Command',
            category: 'system',
            platform: ['windows']
          },
          {
            id: 'cmd',
            name: 'Command Prompt',
            description: 'Windows Command Prompt',
            command: 'cmd /c',
            category: 'system',
            platform: ['windows']
          },
          {
            id: 'wmic',
            name: 'WMIC',
            description: 'Windows Management Instrumentation Command',
            command: 'wmic',
            category: 'system',
            platform: ['windows']
          },
          {
            id: 'netsh',
            name: 'NetSH',
            description: 'Network Shell for network configuration',
            command: 'netsh',
            category: 'network',
            platform: ['windows']
          },
          {
            id: 'systeminfo',
            name: 'System Info',
            description: 'Display system configuration',
            command: 'systeminfo',
            category: 'diagnostics',
            platform: ['windows']
          },
          {
            id: 'eventlog',
            name: 'Event Log Query',
            description: 'Query Windows Event Logs',
            command: 'wevtutil qe',
            category: 'monitoring',
            platform: ['windows']
          },
          {
            id: 'terraform',
            name: 'Terraform',
            description: 'Infrastructure as Code',
            command: 'terraform',
            category: 'automation'
          },
          {
            id: 'docker',
            name: 'Docker',
            description: 'Container management',
            command: 'docker',
            category: 'containers'
          },
          {
            id: 'kubectl',
            name: 'Kubectl',
            description: 'Kubernetes control',
            command: 'kubectl',
            category: 'orchestration'
          },
          {
            id: 'azure-cli',
            name: 'Azure CLI',
            description: 'Azure cloud management',
            command: 'az',
            category: 'cloud'
          },
          {
            id: 'aws-cli',
            name: 'AWS CLI',
            description: 'AWS cloud management',
            command: 'aws',
            category: 'cloud'
          }
        ],
        defaultTools: ['powershell', 'cmd', 'systeminfo', 'netsh'],
        restrictions: ['No destructive operations without confirmation']
      },
    
      'ethical-hacker': {
        agentId: 'ethical-hacker',
        tools: [
          {
            id: 'nmap',
            name: 'Nmap',
            description: 'Network discovery and security auditing',
            command: 'nmap',
            category: 'reconnaissance'
          },
          {
            id: 'metasploit',
            name: 'Metasploit Framework',
            description: 'Penetration testing framework',
            command: 'msfconsole',
            category: 'exploitation'
          },
          {
            id: 'burpsuite',
            name: 'Burp Suite',
            description: 'Web application security testing',
            apiEndpoint: 'http://localhost:8080/burp/api',
            category: 'web-testing',
            requiresAuth: true
          },
          {
            id: 'sqlmap',
            name: 'SQLMap',
            description: 'SQL injection detection and exploitation',
            command: 'sqlmap',
            category: 'web-testing'
          },
          {
            id: 'nikto',
            name: 'Nikto',
            description: 'Web server scanner',
            command: 'nikto',
            category: 'web-testing'
          },
          {
            id: 'john',
            name: 'John the Ripper',
            description: 'Password cracking',
            command: 'john',
            category: 'password-analysis'
          },
          {
            id: 'hashcat',
            name: 'Hashcat',
            description: 'Advanced password recovery',
            command: 'hashcat',
            category: 'password-analysis'
          },
          {
            id: 'wireshark',
            name: 'Wireshark CLI',
            description: 'Network protocol analyzer',
            command: 'tshark',
            category: 'network-analysis'
          },
          {
            id: 'aircrack',
            name: 'Aircrack-ng',
            description: 'WiFi security auditing',
            command: 'aircrack-ng',
            category: 'wireless'
          },
          {
            id: 'gobuster',
            name: 'Gobuster',
            description: 'Directory/file enumeration',
            command: 'gobuster',
            category: 'reconnaissance'
          },
          {
            id: 'hydra',
            name: 'Hydra',
            description: 'Network authentication cracker',
            command: 'hydra',
            category: 'authentication'
          },
          {
            id: 'shodan',
            name: 'Shodan API',
            description: 'Internet-wide scanning database',
            apiEndpoint: 'https://api.shodan.io',
            category: 'osint',
            requiresAuth: true
          }
        ],
        defaultTools: ['nmap', 'nikto', 'gobuster', 'wireshark'],
        restrictions: ['Authorization required', 'No production systems', 'Legal boundaries']
      },
    
      'red-team': {
        agentId: 'red-team',
        tools: [
          {
            id: 'cobalt-strike',
            name: 'Cobalt Strike',
            description: 'Adversary simulation and red team operations',
            apiEndpoint: 'https://localhost:50050',
            category: 'c2',
            requiresAuth: true
          },
          {
            id: 'empire',
            name: 'Empire',
            description: 'PowerShell and Python post-exploitation',
            command: 'empire',
            category: 'c2'
          },
          {
            id: 'mimikatz',
            name: 'Mimikatz',
            description: 'Credential extraction',
            command: 'mimikatz',
            category: 'credential-access',
            platform: ['windows']
          },
          {
            id: 'bloodhound',
            name: 'BloodHound',
            description: 'Active Directory attack paths',
            command: 'bloodhound',
            category: 'reconnaissance'
          },
          {
            id: 'responder',
            name: 'Responder',
            description: 'LLMNR/NBT-NS/MDNS poisoner',
            command: 'responder',
            category: 'credential-access'
          },
          {
            id: 'impacket',
            name: 'Impacket Scripts',
            description: 'Network protocol manipulation',
            command: 'impacket-',
            category: 'lateral-movement'
          },
          {
            id: 'covenant',
            name: 'Covenant',
            description: '.NET C2 framework',
            apiEndpoint: 'https://localhost:7443',
            category: 'c2',
            requiresAuth: true
          },
          {
            id: 'sliver',
            name: 'Sliver',
            description: 'Cross-platform adversary emulation',
            command: 'sliver',
            category: 'c2'
          }
        ],
        defaultTools: ['bloodhound', 'responder', 'impacket'],
        restrictions: ['Authorized engagements only', 'Rules of engagement required']
      },
    
      'blue-team': {
        agentId: 'blue-team',
        tools: [
          {
            id: 'splunk',
            name: 'Splunk CLI',
            description: 'SIEM search and analytics',
            command: 'splunk search',
            category: 'siem',
            apiEndpoint: 'https://localhost:8089',
            requiresAuth: true
          },
          {
            id: 'elastic',
            name: 'Elasticsearch',
            description: 'Log analysis and search',
            apiEndpoint: 'http://localhost:9200',
            category: 'siem'
          },
          {
            id: 'yara',
            name: 'YARA',
            description: 'Malware classification',
            command: 'yara',
            category: 'threat-hunting'
          },
          {
            id: 'osquery',
            name: 'OSQuery',
            description: 'SQL-based OS instrumentation',
            command: 'osqueryi',
            category: 'endpoint-monitoring'
          },
          {
            id: 'volatility',
            name: 'Volatility',
            description: 'Memory forensics',
            command: 'volatility',
            category: 'forensics'
          },
          {
            id: 'snort',
            name: 'Snort',
            description: 'Network intrusion detection',
            command: 'snort',
            category: 'ids'
          },
          {
            id: 'suricata',
            name: 'Suricata',
            description: 'Network threat detection',
            command: 'suricata',
            category: 'ids'
          },
          {
            id: 'zeek',
            name: 'Zeek',
            description: 'Network security monitoring',
            command: 'zeek',
            category: 'network-monitoring'
          },
          {
            id: 'velociraptor',
            name: 'Velociraptor',
            description: 'Endpoint monitoring and forensics',
            apiEndpoint: 'https://localhost:8001',
            category: 'edr',
            requiresAuth: true
          }
        ],
        defaultTools: ['osquery', 'yara', 'zeek'],
        restrictions: ['Read-only operations preferred', 'Maintain evidence integrity']
      },
    
      'purple-team': {
        agentId: 'purple-team',
        tools: [
          {
            id: 'caldera',
            name: 'MITRE Caldera',
            description: 'Automated adversary emulation',
            apiEndpoint: 'http://localhost:8888',
            category: 'emulation',
            requiresAuth: true
          },
          {
            id: 'atomic-red',
            name: 'Atomic Red Team',
            description: 'Atomic test execution',
            command: 'Invoke-AtomicTest',
            category: 'testing',
            platform: ['windows']
          },
          {
            id: 'vectr',
            name: 'VECTR',
            description: 'Purple team tracking',
            apiEndpoint: 'https://localhost:8081',
            category: 'reporting',
            requiresAuth: true
          },
          {
            id: 'sigma',
            name: 'Sigma Rules',
            description: 'Detection rule converter',
            command: 'sigmac',
            category: 'detection-engineering'
          },
          {
            id: 'attack-navigator',
            name: 'ATT&CK Navigator',
            description: 'MITRE ATT&CK visualization',
            apiEndpoint: 'http://localhost:4200',
            category: 'planning'
          }
        ],
        defaultTools: ['caldera', 'atomic-red', 'sigma'],
        restrictions: ['Coordinated testing only']
      },
    
      'sales-expert': {
        agentId: 'sales-expert',
        tools: [
          {
            id: 'salesforce',
            name: 'Salesforce API',
            description: 'CRM operations',
            apiEndpoint: 'https://api.salesforce.com',
            category: 'crm',
            requiresAuth: true
          },
          {
            id: 'hubspot',
            name: 'HubSpot API',
            description: 'Marketing and sales automation',
            apiEndpoint: 'https://api.hubspot.com',
            category: 'crm',
            requiresAuth: true
          },
          {
            id: 'linkedin-sales',
            name: 'LinkedIn Sales Navigator',
            description: 'Lead generation and research',
            apiEndpoint: 'https://api.linkedin.com/v2',
            category: 'prospecting',
            requiresAuth: true
          },
          {
            id: 'clearbit',
            name: 'Clearbit',
            description: 'Company and contact enrichment',
            apiEndpoint: 'https://api.clearbit.com',
            category: 'intelligence',
            requiresAuth: true
          },
          {
            id: 'amazon-product',
            name: 'Amazon Product API',
            description: 'Product research and pricing',
            apiEndpoint: 'https://webservices.amazon.com',
            category: 'market-research',
            requiresAuth: true
          },
          {
            id: 'zoom',
            name: 'Zoom API',
            description: 'Meeting scheduling and management',
            apiEndpoint: 'https://api.zoom.us/v2',
            category: 'communication',
            requiresAuth: true
          },
          {
            id: 'calendly',
            name: 'Calendly',
            description: 'Appointment scheduling',
            apiEndpoint: 'https://api.calendly.com',
            category: 'scheduling',
            requiresAuth: true
          },
          {
            id: 'gong',
            name: 'Gong.io',
            description: 'Sales conversation intelligence',
            apiEndpoint: 'https://api.gong.io',
            category: 'analytics',
            requiresAuth: true
          }
        ],
        defaultTools: ['salesforce', 'linkedin-sales', 'zoom', 'calendly'],
        restrictions: ['GDPR compliance', 'No spam', 'Respect privacy']
      }
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states a read operation ('Get') but does not cover aspects like permissions needed, rate limits, response format, or whether it returns all tools or only specific ones. This leaves significant gaps in understanding the tool's behavior beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It is front-loaded with the core action and resource, making it easy to parse quickly. Every part of the sentence contributes directly to understanding the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It does not explain what 'available tools' entails (e.g., format, scope, or limitations), which is crucial for a tool that likely returns a list. For a read operation with no structured output guidance, more context is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description does not need to add parameter details, so it appropriately avoids redundancy. A baseline of 4 is given as it efficiently handles the lack of parameters without unnecessary elaboration.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get available tools for current agent' clearly states the verb ('Get') and resource ('available tools for current agent'), making the purpose understandable. However, it lacks specificity about what 'available tools' means (e.g., all tools, only accessible ones) and does not differentiate from siblings like 'agent_list' or 'kb_get_all', which might overlap in functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It does not mention prerequisites (e.g., agent activation), exclusions, or comparisons to sibling tools like 'agent_list' or 'kb_get_all', leaving the agent to infer usage context without explicit direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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