Skip to main content
Glama

db_status

Check the status of the Metasploit database to verify connectivity and readiness for penetration testing operations.

Instructions

Check Metasploit database status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the db_status tool. Executes the Metasploit `db_status` command via executeMsfCommand and returns the result in JSON format, with error handling.
    case "db_status": {
      try {
        const status = await executeMsfCommand([`db_status`]);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  success: true,
                  status,
                },
                null,
                2
              ),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                success: false,
                error: error.message,
              }),
            },
          ],
        };
      }
    }
  • src/index.ts:137-144 (registration)
    Registration of the db_status tool in the tools array used for ListToolsRequestSchema. Includes name, description, and empty input schema.
    {
      name: "db_status",
      description: "Check Metasploit database status",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Input schema for db_status tool: an empty object (no parameters required).
    inputSchema: {
      type: "object",
      properties: {},
    },
  • Helper function executeMsfCommand used by db_status handler to run msfconsole commands.
    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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Check') but doesn't explain what the check entails (e.g., connectivity, health, version), what permissions are needed, or what the output might look like. This leaves significant gaps in understanding the tool's behavior beyond a basic read operation.

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 that directly states the tool's purpose without any fluff or redundant information. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema), the description is minimally adequate. However, it lacks details on what 'status' means (e.g., operational state, data integrity) and behavioral context, which could be important for a database tool in a security context like Metasploit. With no annotations, more completeness would be beneficial.

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 schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately avoids unnecessary details, earning a high score for not overcomplicating a parameterless tool.

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 tool's purpose with a specific verb ('Check') and resource ('Metasploit database status'), making it immediately understandable. However, it doesn't differentiate from potential sibling tools that might also check database aspects, like workspace status or connectivity, which prevents a perfect score.

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, such as other database-related tools in the sibling list (e.g., db_hosts, db_workspaces). It lacks context about prerequisites, timing, or exclusions, leaving the agent to infer usage based on the name alone.

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