Skip to main content
Glama

payload_generate

Generate a Metasploit payload using msfvenom with customizable options like callback IP, port, format, and encoding. Returns base64 content for small payloads.

Instructions

Generate a payload using msfvenom.

Args: lhost: Your IP address for callback lport: Port for callback (default: 4444) template: Use a predefined template (e.g., 'windows_meterpreter_reverse_tcp') payload: Metasploit payload string (ignored if template specified) format_type: Output format - exe, elf, raw, ps1, etc. encoder: Encoder to use (e.g., 'x86/shikata_ga_nai') iterations: Number of encoding iterations bad_chars: Characters to avoid in payload (e.g., '\x00\x0a\x0d') nops: Number of NOP sled bytes to prepend (default: 0) output_name: Custom output filename (auto-generated if empty)

Returns: Generated payload info including base64 content for small payloads

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nopsNo
lhostYes
lportNo
encoderNo
payloadNowindows/meterpreter/reverse_tcp
templateNo
bad_charsNo
iterationsNo
format_typeNoexe
output_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must carry full burden. It mentions generating payloads with msfvenom and returning base64 content for small payloads, but it does not disclose potential side effects (e.g., file creation, network connections), permission requirements, or limitations. This lack of detail hinders the agent's understanding of side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for args and returns, and each line provides necessary information without redundancy. It is concise enough for an AI agent to parse efficiently, though the bullet format is slightly informal.

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 complexity of 10 parameters and an existing output schema, the description covers parameter semantics and return info adequately. However, it omits prerequisites (e.g., msfvenom installation), error handling, or usage limitations, leaving some gaps for the agent.

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?

With 0% schema description coverage, the description compensates by listing all 10 parameters with brief, explanatory text (e.g., 'lhost: Your IP address for callback', 'payload: Metasploit payload string (ignored if template specified)'). This adds significant meaning beyond the bare schema, though some descriptions could be more detailed.

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 explicitly states 'Generate a payload using msfvenom,' which clearly identifies the verb and resource. It distinctively sets the tool apart from sibling tools like payload_one_liner, payload_templates, and callback_generate, which serve different purposes.

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

Usage Guidelines3/5

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

The description does not explicitly state when to use this tool versus alternatives. While it provides parameter explanations, it lacks context about when not to use it (e.g., when a simpler one-liner suffices) or when to choose other payload generation tools. This leaves some ambiguity for the agent.

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/zebbern/zebbern-kali-mcp'

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