Skip to main content
Glama

msf_module_execute

Destructive

Executes an installed Metasploit module with specified datastore options and returns a job UUID or output, enabling RPC-based red teaming workflows.

Instructions

Execute an installed module with its datastore options; returns job/UUID or output.

Inspect module.info and module.options first. Execution may continue after this tool returns. Poll job.list, module.running_stats, or module.results using msf_rpc. Binary output is represented as a $binary base64 object.

Input Schema

NameRequiredDescriptionDefault
optionsYes
module_nameYes
module_typeYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (destructive=true, openWorld=true, non-idempotent), the description adds critical traits: execution may keep running after the call returns (async job semantics), how to poll for results, and that binary output is returned as a $binary base64 object. These are behaviors an agent could not infer from the structured fields.

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?

Three sentences, front-loaded with the action and return shape, followed by prerequisites and post-execution behavior. No filler or redundancy.

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

Completeness4/5

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

An output schema exists, yet the description still usefully characterizes the return (job/UUID, base64 binary) and the async polling model, which are the highest-risk unknowns for a destructive tool. The main remaining gap is any characterization of the three undocumented parameters.

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 0% and none of the three required parameters (module_type, module_name, options) are described. The description partially compensates by pointing the agent to module.info and module.options to derive valid option values, but module_type/module_name formats and expected values remain unexplained.

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?

States a specific verb and resource ('Execute an installed module') plus scope ('with its datastore options') and names the return contract ('job/UUID or output'). This clearly separates it from siblings like msf_module_info, msf_module_search, and msf_jobs.

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?

Gives an explicit prerequisite ('Inspect module.info and module.options first') and post-call workflow ('Poll job.list, module.running_stats, or module.results using msf_rpc'). It does not explicitly state when not to use it or which sibling handles alternative execution paths, so it falls short of a 5.

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