Skip to main content
Glama

msf_run_module

Execute Metasploit modules with custom options, payloads, and target indices to exploit vulnerabilities. Requires explicit authorization and human confirmation.

Instructions

Execute a Metasploit module with configured options.

WARNING: This is a destructive operation that may exploit vulnerabilities on the target system. Requires explicit authorization and human confirmation.

Args: module_path: Full module path (e.g. "exploit/windows/smb/ms17_010_eternalblue"). options: Module-level options as key-value pairs (e.g. {"RHOSTS": "192.168.1.10"}). target_index: Module target index (0 = default target). payload: Payload to use (e.g. "cmd/unix/reverse_bash", "generic/shell_reverse_tcp"). Leave empty to let Metasploit choose the default payload for the target. payload_options: Payload-level options (e.g. {"LHOST": "192.168.1.100", "LPORT": "4444"}). These are set on the payload object, not the module.

Returns: Execution result with session information if exploitation succeeded.

Note: REQUIRES HUMAN CONFIRMATION. This tool will initiate an actual exploit attempt against the target system. Only execute with explicit authorization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionsNo
payloadNo
module_pathYes
target_indexNo
payload_optionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries the full burden and does so excellently. It explicitly warns that the operation is destructive, may exploit vulnerabilities, requires human confirmation, and initiates an actual exploit attempt against the target. This goes beyond basic mutation disclosure and covers the critical safety and authorization context.

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 well-structured with clear sections for arguments, returns, and usage warnings. It is appropriately detailed for a complex, high-risk tool without being verbose or redundant. Each sentence contributes critical information, from parameter examples to authorization requirements.

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

Completeness5/5

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

Given the high complexity, absence of annotations, and presence of an output schema, the description is remarkably complete. It covers all parameters, explains return value semantics, and clearly warns about authorization and destructive potential. The output schema handles exact return formatting, so the description appropriately focuses on behavior and prerequisites.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates fully with detailed explanations for all five parameters: module_path with example, options as key-value pairs, target_index with default, payload with examples and behavior when empty, and payload_options with clarifications. It adds semantic meaning far beyond the schema's raw type definitions.

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

Purpose5/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: 'Execute a Metasploit module with configured options.' This is a specific verb+resource pairing that distinguishes it from sibling tools like msf_search or msf_module_info, which focus on discovery and metadata rather than execution.

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

Usage Guidelines4/5

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

The description clearly communicates the high-risk context: destructive operation, requires explicit authorization and human confirmation. It implies this is for actual exploitation rather than reconnaissance. However, it does not explicitly name alternatives like msf_search for finding modules or msf_module_info for detailing options, so it falls short of full sibling differentiation.

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/rfunix/tengu'

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