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"); } }

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