Skip to main content
Glama

search_auxiliary

Find Metasploit auxiliary modules for security testing by searching with queries and filtering by type like scanner or admin.

Instructions

Search for auxiliary modules in Metasploit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for auxiliary modules
typeNoOptional: Filter by auxiliary type

Implementation Reference

  • Handler function for the 'search_auxiliary' tool. Extracts query and optional type parameters, constructs Metasploit search command for auxiliary modules, executes it via msfconsole, and returns formatted JSON results or error.
    case "search_auxiliary": {
      const { query, type } = args as { query: string; type?: string };
      const searchQuery = type 
        ? `search type:auxiliary ${type} ${query}`
        : `search type:auxiliary ${query}`;
    
      try {
        const results = await executeMsfCommand([searchQuery]);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  success: true,
                  query,
                  type: type || null,
                  results,
                },
                null,
                2
              ),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                success: false,
                error: error.message,
              }),
            },
          ],
        };
      }
    }
  • src/index.ts:90-108 (registration)
    Registration of the 'search_auxiliary' tool in the tools array, including name, description, and input schema definition.
    {
      name: "search_auxiliary",
      description: "Search for auxiliary modules in Metasploit",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "Search query for auxiliary modules",
          },
          type: {
            type: "string",
            enum: ["scanner", "admin", "dos", "fuzzers", "gather"],
            description: "Optional: Filter by auxiliary type",
          },
        },
        required: ["query"],
      },
    },
  • Input schema definition for the 'search_auxiliary' tool, specifying query (required) and optional type filter with enum values.
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "string",
          description: "Search query for auxiliary modules",
        },
        type: {
          type: "string",
          enum: ["scanner", "admin", "dos", "fuzzers", "gather"],
          description: "Optional: Filter by auxiliary type",
        },
      },
      required: ["query"],
    },
  • Helper function used by search_auxiliary handler to execute Metasploit commands via msfconsole.
    async function executeMsfCommand(commands: string[]): Promise<string> {
      const commandString = commands.join("; ");
      const fullCommand = `msfconsole -q -x "${commandString}; exit"`;
      
      try {
        const { stdout, stderr } = await execAsync(fullCommand, {
          timeout: 60000, // 60 second timeout
          maxBuffer: 10 * 1024 * 1024, // 10MB buffer
        });
        return stdout || stderr;
      } catch (error: any) {
        throw new Error(error.message || "Command execution failed");
      }
    }
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 the action ('search') but doesn't describe what the search returns (e.g., list of modules, details), any limitations (e.g., pagination, rate limits), or authentication needs. This leaves significant gaps for a tool with potential security implications.

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, efficient sentence with zero waste. It's front-loaded and appropriately sized for its purpose, making it easy to parse without unnecessary details.

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 complexity of searching in a security tool like Metasploit, no annotations, and no output schema, the description is incomplete. It doesn't explain return values, error handling, or behavioral traits, which are crucial for effective tool use in this context.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters ('query' and 'type') thoroughly. The description adds no additional meaning beyond implying the tool searches auxiliary modules, which aligns with the schema but doesn't provide extra context like search syntax or type usage.

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

Purpose4/5

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

The description clearly states the verb ('search') and resource ('auxiliary modules in Metasploit'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'search_exploits' or 'get_exploit_info', which would require a 5.

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?

The description provides no guidance on when to use this tool versus alternatives like 'search_exploits' or other siblings. It lacks context about use cases, prerequisites, or exclusions, leaving the agent with minimal 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/andreransom58-coder/kali-metasploit-mcp'

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