Skip to main content
Glama
0xMihirK
by 0xMihirK

nuclei_write_template

Write custom Nuclei YAML templates to a safe workspace path for vulnerability scanning. Supports validation and rejects path traversal attacks.

Instructions

Purpose: Write a custom Nuclei YAML template into /opt/workspace/nuclei-templates. Constraints: Path traversal is rejected. Use relative paths such as custom/check.yaml. Validate with nuclei -validate via shell_exec or run with nuclei_run using the returned path. Example: nuclei_write_template(path='custom/basic-detect.yaml', content='id: basic-detect\ninfo: ...')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description must disclose behaviors. It mentions the path traversal rejection and the fact that it writes to a specific directory, but it does not disclose overwrite behavior, directory creation, or error conditions. It does hint at the return path via 'using the returned path,' which adds some transparency.

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 concise and well-structured with three clear sections: Purpose, Constraints, and Example. The purpose is front-loaded, and every sentence adds value without 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?

The tool has only two parameters and an output schema exists (per context), so the description does not need to explain return values. It covers the destination directory, path constraints, validation options, and gives an example. Minor gaps remain regarding overwriting and error handling, but these are not critical for an agent selecting and invoking the tool.

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 both parameters. It shows an example using path='custom/basic-detect.yaml' and content='id: basic-detect\ninfo: ...', clarifying that path is a relative path and content is the YAML template body. It also enforces the relative-path constraint.

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 function: 'Write a custom Nuclei YAML template into /opt/workspace/nuclei-templates.' This specifies a unique verb/resource combination and distinguishes it from generic file-write tools like workspace_write_file.

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 provides concrete usage context: it requires relative paths ('Use relative paths such as custom/check.yaml'), explains path traversal rejection, and recommends validation via shell_exec or nuclei_run with the returned path. While it doesn't explicitly name alternatives, the purpose and constraints infer when to use this tool.

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