Skip to main content
Glama

list_run_test_cases

Retrieve per-case execution records from a manual run. Filter by assignee or result to obtain the rtcRef required for updating test cases.

Instructions

Get the per-case execution records inside a manual run — what the UI shows as rows in the run's test-case table. Each row carries the test case identity (caseKey like 'TC-156', title), the current assignee, and the current result/status ('untested', 'passed', 'failed', etc.). Filter by assignee (email or User _id) or result/status. Use this before update_run_test_case so you have the rtcRef for each case you want to update.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID (required).
runIdYesInternal run _id or counter-style ID e.g. 'RUN-12' (required).
searchNoMatch by case title or caseKey.
assigneeNoFilter by assignee — User _id OR email (server resolves email).
resultNoFilter by result/status. Display ('Passed') or canonical ('passed') form.
statusNoAlias for result.
sortByNo
sortOrderNo
pageNo
limitNoDefault 25 (max 200).

Implementation Reference

  • The handler function that executes the 'list_run_test_cases' tool logic. It validates inputs (projectId, runId required), calls the API endpoint, and returns JSON response.
    export async function handleListRunTestCases(args?: ListRunTestCasesArgs) {
      const token = getApiKey(args);
      if (!token) {
        throw new Error(
          "Missing TESTDINO_PAT environment variable. Configure it in your .cursor/mcp.json under 'env'."
        );
      }
      if (!args?.projectId) throw new Error("projectId is required");
      if (!args?.runId) throw new Error("runId is required");
    
      try {
        const url = endpoints.listRunTestCases(args);
        const response = await apiRequestJson<unknown>(url, {
          headers: { Authorization: `Bearer ${token}` },
        });
        return {
          content: [{ type: "text", text: JSON.stringify(response, null, 2) }],
        };
      } catch (error) {
        const msg = error instanceof Error ? error.message : String(error);
        throw new Error(`Failed to list run test cases: ${msg}`);
      }
    }
  • TypeScript interface defining input arguments for the list_run_test_cases tool (projectId, runId, search, assignee, result, status, sortBy, sortOrder, page, limit).
    interface ListRunTestCasesArgs {
      projectId: string;
      runId: string;
      search?: string;
      assignee?: string;
      result?: string;
      status?: string;
      sortBy?: "createdAt" | "updatedAt" | "status" | "caseKey";
      sortOrder?: "asc" | "desc";
      page?: number;
      limit?: number;
    }
  • Tool definition object with name 'list_run_test_cases', description, and JSON Schema inputSchema for parameter validation.
    export const listRunTestCasesTool = {
      name: "list_run_test_cases",
      description:
        "Get the per-case execution records inside a manual run — what the UI shows as rows in the run's test-case table. Each row carries the test case identity (caseKey like 'TC-156', title), the current assignee, and the current result/status ('untested', 'passed', 'failed', etc.). Filter by assignee (email or User _id) or result/status. Use this before update_run_test_case so you have the rtcRef for each case you want to update.",
      inputSchema: {
        type: "object",
        properties: {
          projectId: { type: "string", description: "Project ID (required)." },
          runId: {
            type: "string",
            description:
              "Internal run _id or counter-style ID e.g. 'RUN-12' (required).",
          },
          search: {
            type: "string",
            description: "Match by case title or caseKey.",
          },
          assignee: {
            type: "string",
            description:
              "Filter by assignee — User _id OR email (server resolves email).",
          },
          result: {
            type: "string",
            description:
              "Filter by result/status. Display ('Passed') or canonical ('passed') form.",
          },
          status: { type: "string", description: "Alias for result." },
          sortBy: {
            type: "string",
            enum: ["createdAt", "updatedAt", "status", "caseKey"],
          },
          sortOrder: { type: "string", enum: ["asc", "desc"] },
          page: { type: "number" },
          limit: { type: "number", description: "Default 25 (max 200)." },
        },
        required: ["projectId", "runId"],
      },
    };
  • src/index.ts:123-130 (registration)
    Tool is registered in the MCP server tool list (listRunTestCasesTool added to the tools array).
      listRunTestCasesTool,
      updateRunTestCaseTool,
      // Sessions
      listSessionsTool,
      getSessionTool,
      createSessionTool,
      updateSessionTool,
    ];
  • src/index.ts:316-319 (registration)
    Request handler routing: when tool name is 'list_run_test_cases', it calls handleListRunTestCases.
    if (name === "list_run_test_cases") {
      return await handleListRunTestCases(
        args as Parameters<typeof handleListRunTestCases>[0]
      );
  • Endpoint URL builder for list_run_test_cases, constructing GET /api/mcp/manual-runs/:projectId/:runId/test-cases with query parameters.
    listRunTestCases: (params: {
      projectId: string;
      runId: string;
      search?: string;
      assignee?: string;
      result?: string;
      status?: string;
      sortBy?: string;
      sortOrder?: string;
      page?: number;
      limit?: number;
    }): string => {
      const baseUrl = getBaseUrl();
      const { projectId, runId, ...queryParams } = params;
      const queryString = buildQueryString(queryParams);
      return `${baseUrl}/api/mcp/manual-runs/${projectId}/${runId}/test-cases${queryString}`;
    },
Behavior4/5

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

No annotations provided, so description carries full burden. It explains that the tool returns rows with case identity, assignee, and status. No mention of destructive behavior or rate limits, but it is transparent about return data and filtering capabilities.

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 concise with four sentences, each adding value. It front-loads the purpose and UI analogy, then details row contents, filters, and a usage recommendation. No unnecessary words.

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?

Given 10 parameters and no output schema, the description is fairly complete: it describes the return fields, filters, and relationship to update_run_test_case. It lacks details on pagination and sorting but those are partially covered in the schema.

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 70%, and the description adds practical context beyond the schema, such as explaining that assignee can be email or User _id and that result accepts display or canonical forms. It also notes the alias status for result.

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 'Get the per-case execution records inside a manual run' with a specific verb and resource. It distinguishes from siblings like get_run_details and update_run_test_case by focusing on per-case execution records.

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 explicitly advises using this tool before update_run_test_case to obtain rtcRef. It provides clear context for filtering by assignee or result but does not explicitly exclude other use 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/testdino-hq/testdino-mcp'

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