Skip to main content
Glama

Generate a k6 load test script

generate_k6_script

Convert a structured test plan into a runnable k6 JavaScript script with deterministic templating, ensuring reviewable load tests before execution.

Instructions

Turns a structured test plan (base URL, weighted request mix, load profile, thresholds) into a runnable k6 JavaScript script. Deterministic templating, not an LLM call -- reviewable before running. Returns a runDir that all later steps (smoke_test_script, run_load_test, get_test_metrics) take as input.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
planYes
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It adds valuable context by stating it is deterministic templating (not an LLM call) and reviewable before running, and it discloses the return of a runDir. However, it omits side effects like file system writes, error conditions, or whether the operation is idempotent.

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?

Two sentences, front-loaded with the primary purpose, and the second sentence adds critical behavioral and integration context. No redundant words.

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?

The description conveys the tool's role and output sufficiently for a simple generator, but the absence of an output schema and annotations means more detail is needed about the returned runDir and potential side effects. The rich nested schema offsets some context gaps, but the description alone is not fully complete for a complex plan input.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description only lists high-level components (base URL, weighted request mix, load profile, thresholds) without explaining the structure of the plan. It does not compensate for the low schema coverage; the user must rely on the nested schema descriptions for parameter meaning.

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: transforming a structured test plan into a runnable k6 JavaScript script. It identifies the specific resource (k6 script) and differentiates from siblings by positioning itself as the generation step that produces a runDir for downstream tools.

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 implies its use as the first step in a pipeline by naming all later steps (smoke_test_script, run_load_test, get_test_metrics) as consumers of its output. This gives clear context for when to use it, though it lacks explicit 'when not to use' or alternative scenarios.

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/krishanchawla/k6-loadtest-mcp'

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