Skip to main content
Glama

msf_console_write

Destructive

Sends arbitrary commands or multiline scripts to a Metasploit console, preserving module, option, and workspace state; read console output separately.

Instructions

Send arbitrary console commands, including multiline scripts.

The console retains state (selected module, options, workspace). This tool only submits input; read output separately. A newline is appended by default.

Input Schema

NameRequiredDescriptionDefault
commandYes
console_idYes
append_newlineNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, non-idempotent. The description adds genuinely non-obvious behavior: console state persistence (selected module, options, workspace) across calls and the default newline append. It doesn't warn that arbitrary commands can be destructive, but annotations carry that.

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?

Three short sentences, front-loaded with the core action, then the state caveat, then the newline default. Nothing wasted, though the gap between the stateful-console note and the tool's own write-only nature could flow more tightly.

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?

Output schema exists, so return values needn't be described. But with destructive, open-world, non-idempotent behavior and 0% schema coverage, the description leaves console_id's origin/semantics and any command-length or rate constraints unaddressed.

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%, so the description should compensate. It explains append_newline's default behavior, but console_id is never explained (presumably from msf_console_create/list) and command's relationship to console context is only implied. Partial compensation for the coverage gap.

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+resource: submit arbitrary console commands including multiline scripts. Clearly distinguishes itself from msf_console_read by saying 'This tool only submits input; read output separately', which is exactly the sibling boundary an agent needs.

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?

Explicitly routes output retrieval to a separate tool and explains that multiline scripts are acceptable. No explicit when-not conditions or mention of msf_console_create/destroy prerequisites, but the read/write split is clearly drawn.

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