Skip to main content
Glama

Add or Update Test Cases in a Test Manager Test Run

tm.add_testCasesToTestRun

Add test cases to a test run, updating assignee or priority if the case already exists for the same environment. Merges new cases without removing existing ones.

Instructions

Adds one or more test cases (each optionally with an environment_id, assignee user ID - see tm.get_organizationUsers to look one up - and priority) to an existing LambdaTest Test Manager test run, WITHOUT removing test cases already in the run. If a test case is already in the run with the same environment_id, this UPDATES its assignee/priority instead of adding a duplicate - so it's also how you reassign or reprioritize an existing test case instance, not just add new ones. Internally fetches the run's current test cases first and PUTs the complete merged list back, since the underlying API replaces the run's entire test case list on every update - calling this repeatedly is safe. A test case can be present multiple times with different environment_id values to run it against multiple environments. environment_id/assignee/priority are all optional per test case - omitting environment_id defaults to a placeholder 'No config selected' environment. Get a valid environment_id from tm.get_environments (or read one off an existing test-run instance via tm.get_testRunById). DANGER: only ever pass an environment_id from one of those two sources - a nonexistent environment_id does NOT return an error, it corrupts the run so badly that every subsequent read of it (tm.get_testRunById, tm.get_testCaseInstancesByTestRunId) starts failing with a 500 server error until repaired by another update. Do not call this speculatively - it's a real, persistent action. KANEAI RUNS: works on both manual and KaneAI test runs (see tm.create_testRun's is_auteur_generated input for creating one), but every test case passed in must match the run's own type - refuses the entire call (no partial changes) if any test case's own is_auteur_generated does not match the run's. Manual test cases cannot enter a KaneAI run and vice versa. This is NOT the same thing as the run's is_editable flag, which reflects KaneAI schedule ownership, not manual/KaneAI compatibility.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
test_casesYes
test_run_idYes
Behavior5/5

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

No annotations exist, so the description carries full transparency burden. It fully discloses internal behavior: it fetches current test cases and PUTs a merged list, making repeated calls safe. It warns about the severe danger of invalid environment_id causing server errors until repaired. It also clarifies the upsert behavior and the type compatibility check.

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 description is relatively long but highly informative. The first sentence captures the core purpose, and subsequent sentences add essential details in a logical order. Some redundancy (e.g., repeated emphasis on environment_id danger) could be trimmed, but it is not excessive given the importance. Overall, it earns its length.

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?

No output schema exists, but the description adequately covers what the tool does and its side effects. It explains the upsert behavior, the internal API mechanism, the danger of invalid environment_id, and the type matching requirement. This is sufficient for an action tool without a direct return value beyond the API response.

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

Parameters5/5

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

With 0% schema description coverage, the description completely compensates. It explains each parameter: test_cases is an array of objects with required test_case_id, optional environment_id (with danger and source guidance), assignee (with lookup hint), and priority. It clarifies that environment_id can be omitted (defaults to 'No config selected'), and that multiple entries with different environment_ids are allowed.

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 adds or updates test cases in a test run, without removing existing ones. It specifies the optional fields (environment_id, assignee, priority) and explicitly distinguishes the upsert behavior. While sibling tools exist (e.g., bulkUpdate_testCaseInstances), the description's specificity on add vs. update and the unique danger of environment_id corruption make the purpose unmistakable.

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?

The description provides explicit when-to-use guidance: it is for adding test cases, but also for reassigning or reprioritizing existing ones. It warns against speculative calls, explains the requirement for matching test case type to run type, and gives precise sources for environment_id (tm.get_environments or tm.get_testRunById). It also tells when not to use it (when you want to remove test cases).

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/prakhar-gahlot/TestMu-AI-Test-Manager-MCP'

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