Skip to main content
Glama
k11 API Functional QA

k11 API Functional QA

Official

Export flow to pytest

export_pytest

Convert a test flow into standalone pytest and httpx tests with database checks, returning the code or saving it under tests/ without overwriting files.

Instructions

Turn a flow into a plain pytest + httpx test (database checks included), so the suite can live without this tool. Returns the code; with write=true saves it under tests/ (never overwriting).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "export_pytest"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
writeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does reasonably well: it discloses the default behavior (returns the code only), the opt-in side effect (write=true saves under tests/), and a key safety trait (never overwriting). It omits permission/auth requirements and what happens if the target path already exists beyond 'never overwriting'.

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 compact sentences with no filler; the core transformation is front-loaded, followed by the return/write behavior. Every clause carries information the agent needs.

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?

For a small two-parameter tool with no output schema, the description covers the return value ('returns the code') and write semantics, which is the important part. However, the undefined `path` argument and the absence of any note on output shape or failure modes leave a genuine gap in an otherwise lean definition.

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%, so the description must compensate, and it only half does. The `write` flag is well explained (saves under tests/, never overwriting), but the required `path` parameter is never defined — it is ambiguous whether it identifies the source flow or the destination file, which is a blocking ambiguity for a required argument.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and output artifact: 'Turn a flow into a plain pytest + httpx test (database checks included)'. The parenthetical about database checks and the portability goal differentiate it from a generic test generator, though it never names the closest sibling (generate_negative_tests) explicitly.

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

Usage Guidelines3/5

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

Usage is implied by the goal 'so the suite can live without this tool', which tells the agent this is for portability/export rather than in-place execution. There is no explicit when-not guidance, no prerequesite statement, and no contrast with generate_negative_tests or run_flows.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.