Skip to main content
Glama

Run generated API tests

qa_run_api

Generates and executes deterministic API tests from OpenAPI specs against a stage environment, covering contract, authz, robustness, and performance checks. Respects read-only policies by skipping disallowed mutations.

Instructions

Generates deterministic tests from OpenAPI and executes them against stage: contract (status declared in the spec + response body matches its schema), authz (secured endpoint called without a token must answer 401/403), robustness (malformed required parameter must answer 400/404/422), and perf (policy.maxResponseMs). Any 5xx is an unconditional critical failure. IMPORTANT: while policy.readOnly is true, every mutating endpoint (POST/PUT/PATCH/DELETE) is skipped unless its path is listed in policy.allowedMutationPaths — call qa_discover to see exactly what was skipped. Returns a digest; the full run is stored under artifactsDir.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleNoAuth role from qa.config.json used for authenticated calls. Defaults to the first configured role.
servicesNoLimit to these service names.
pathContainsNoOnly test operations whose path contains this substring, e.g. "/api/orders".
Behavior5/5

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

No annotations are provided, so the description carries full responsibility. It discloses deterministic behavior, exact test criteria, 5xx critical failures, mutation-skipping logic, return digest, and artifactsDir storage. This is comprehensive and leaves no major behavioral ambiguity.

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 dense but well-organized, starting with the main action, then test categories, a critical caveat (IMPORTANT), and ending with return/storage info. Every sentence adds unique value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with no output schema, the description is remarkably complete: it covers test types, failure conditions, special policy behavior, return digest, artifact location, and even points to a related tool. It leaves little to no ambiguity about what the tool does and what to expect.

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 covers all three parameters with descriptions (role, services, pathContains). The tool description adds no parameter-specific detail beyond the schema, which already fully documents them, so the baseline 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 clearly states it generates and executes deterministic API tests from OpenAPI, listing four test categories (contract, authz, robustness, perf). This specific verb+resource+scope distinguishes it from sibling tools like qa_run_ui and qa_run_flows.

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 when to use this tool (for API testing) and explicitly directs the agent to call qa_discover to see skipped mutations under a readOnly policy. It does not explicitly contrast with qa_run_all, but it provides strong contextual guidance on the workflow.

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/shahinnr/mcp_qa'

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