Skip to main content
Glama

add_test_steps

Insert new steps into a STEP_BY_STEP Jira test script while keeping existing steps and their ids, at append, prepend, or a 0-based position.

Instructions

Insert steps into a STEP_BY_STEP script without losing the existing ones (GET then PUT /testcase/{testCaseKey}): reads the current steps, keeps their ids, splices the new ones in and writes the whole list back — needed because PUT deletes every step missing from the list it receives. The stored steps are ordered by their authoritative index before merging, because GET /testcase serves them in an arbitrary array order once a case has been edited; only the insertion changes, existing step ids and their sequence are preserved. position selects the insertion point: "append" (the default), "prepend", or a 0-based index into that ordered sequence, clamped to the step count. Allowed when the current script is STEP_BY_STEP, and when the case has no script CONTENT yet — a case created without a testScript is reported by the API as an empty PLAIN_TEXT script (a stub with no text), and that counts as script-less: a STEP_BY_STEP script is then created. A PLAIN_TEXT or BDD script that really has text is refused; replace it with set_test_script. A step whose "Call to Test" points at its own case is refused too: the API answers 2xx to such a write and stores NOTHING. After the write the tool reads the case back (a second GET) and returns { key, totalSteps } where totalSteps is the count STORED on the case, not the count sent. When the two differ — the stand accepts a write and silently throws it away — the answer also carries stepsSent and a warning saying so; totalSteps is null with a warning when the read-back itself failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsYesNew steps in insertion order, without ids (ids belong to already stored steps). A step with testCaseKey is a "Call to Test".
positionNoWhere to insert: 'append' (default), 'prepend', or a 0-based index into the existing steps, clamped to the current step count. A numeric index may be given as a number or as digits in a string ("2") — both mean the same position.
testCaseKeyYesTest case key, e.g. PROJ-T123

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.5

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations the description carries the full burden and does so: PUT deletes every step missing from the payload, steps are reordered by the authoritative `index` before merging, a 2xx write can silently store nothing, and the read-back result can report a mismatch or null totalSteps. These are exactly the non-obvious traits an agent cannot infer elsewhere.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action is front-loaded in the first clause, and the length is largely justified by the API quirks it must warn about. It is, however, a dense wall of em-dash-separated clauses rather than clearly separated points, which slightly hurts scanability.

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?

There is no output schema, yet the description fully documents the return shape ({ key, totalSteps }, plus stepsSent and a warning on mismatch, or null totalSteps on read-back failure). Combined with the usage constraints and mutation semantics, nothing an agent needs to call it correctly is missing.

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 100%, so the baseline is 3, but the description goes further by explaining that `position` indexes into the authoritative ordered sequence, is clamped to the step count, and that the `steps` array carries no ids because ids belong to stored steps. It adds real meaning over the schema's field-level text.

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?

States a specific verb (insert steps), the exact resource (a STEP_BY_STEP script) and the mechanism (GET then PUT /testcase/{testCaseKey}), and explicitly contrasts itself with set_test_script for the replace case. An agent can distinguish it from set_test_script without opening either schema.

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?

Explicit when-to-use conditions are given: allowed when the script is STEP_BY_STEP or when the case has no script content (including the empty PLAIN_TEXT stub), and refused for a PLAIN_TEXT/BDD script that really has text, with the alternative named. The self-referencing 'Call to Test' exclusion is also stated.

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

Deploy Server

Other Tools