Skip to main content
Glama

Get structured metrics for a completed run

get_test_metrics

Parse k6 summary JSON into structured performance metrics: latency percentiles, error rate, RPS, and threshold pass/fail for accurate reporting.

Instructions

Parses the k6 summary JSON into deterministic structured metrics: overall + per-endpoint p50/p90/p95/p99 latency, error rate, RPS, and threshold pass/fail. Use this data (not raw k6 console output) to write the human-readable performance summary -- the numbers here are computed in code, not guessed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runDirYesrunDir returned by generate_k6_script, after run_load_test has completed
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It states the tool parses a file (implying a read-only operation), produces deterministic metrics, and emphasizes the numbers are computed in code, not guessed. This adds useful reliability context, though it does not explicitly mention lack of side effects or failure behavior.

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 with no filler. The first sentence front-loads the core action and output metrics; the second sentence adds direct usage guidance. Every clause earns its place.

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 description covers what the tool does, what metrics it returns, and when to use it. Although no output schema exists, the list of metrics is explicit. It could add a note about behavior if the summary JSON is missing, but for a one-parameter tool, it is sufficiently complete.

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?

The schema description coverage is 100%, with the runDir parameter fully documented as the return value from generate_k6_script and intended for use after run_load_test completes. The tool description adds no further parameter detail, so the baseline score of 3 applies.

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 uses a specific verb 'parses' with the resource 'k6 summary JSON' and enumerates the exact metrics produced (p50/p90/p95/p99, error rate, RPS, threshold pass/fail). This clearly distinguishes it from sibling tools that generate scripts or run tests.

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?

Explicitly instructs to use this data (not raw console output) for writing the human-readable performance summary, giving a clear when-to-use directive. It also implies the prerequisite that the run must be completed through the parameter description.

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