Skip to main content
Glama
0xMihirK
by 0xMihirK

nmap_write_nse_script

Write a custom Nmap NSE script into the container and update the Nmap script database, enabling tailored penetration tests.

Instructions

Purpose: Write a custom NSE script into the container and update the Nmap script database. Constraints: Pass name without path separators; Hercules sanitizes it and writes /opt/workspace/nmap-scripts/.nse. Use nmap_run_nse_script to execute that managed artifact.… Example: nmap_write_nse_script(name='http-custom-check', content='description = [[...]]\nauthor = ...')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosure. It reveals that Hercules sanitizes the name, writes to /opt/workspace/nmap-scripts/<name>.nse, and updates the Nmap script database. This is meaningful behavioral context, though it does not mention overwrite behavior or error handling.

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 compact and well-structured: Purpose, Constraints, and an Example. Every sentence adds value, and the example illustrates usage effectively without unnecessary prose.

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?

For a two-param write tool with no annotations, the description covers the main aspects: purpose, destination path, side effect (DB update), and follow-up action. It does not address potential failure cases, but given the existence of an output schema and the moderate complexity, it is sufficiently complete.

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?

Schema coverage is 0%, so the description compensates by explaining the name constraint (no path separators) and showing an example with both name and content. It adds context about how the name becomes a .nse file path, but does not further detail content format beyond being NSE script code.

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 states a specific verb and resource: 'Write a custom NSE script into the container and update the Nmap script database.' This clearly distinguishes it from siblings like nmap_run_nse_script (execution) and workspace_write_file (generic file writing).

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

Usage Guidelines5/5

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

It explicitly directs the user to use nmap_run_nse_script to execute the written artifact, providing a clear alternative. It also gives a constraint (pass name without path separators) that informs correct usage.

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/0xMihirK/hercules-mcp'

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