Skip to main content
Glama

get_run_details

Retrieve detailed test run information including statistics, suites, cases, git metadata, and errors. Supports batch queries to analyze execution health and debug failures.

Instructions

Get detailed information about test runs. Shows test statistics (passed, failed, skipped, flaky), all test suites and cases, git metadata, and error details. Supports batch operations (comma-separated IDs, max 20). Use this to analyze test execution health or debug specific failures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID (Required). The TestDino project identifier.
testrun_idNoTest run ID(s). Single ID or comma-separated for batch (max 20). Example: 'test_run_123' or 'run1,run2,run3'.
counterNoFilter by test run counter (sequential number).

Implementation Reference

  • The main handler function `handleGetRunDetails` that executes the tool logic. It reads the API key from env, validates projectId, builds query params, calls the API endpoint, and returns the response as text content.
    export async function handleGetRunDetails(args?: GetRunDetailsArgs) {
      // Read PAT from environment variable (set in mcp.json) or from args
      const token = getApiKey(args);
    
      if (!token) {
        throw new Error(
          "Missing TESTDINO_PAT environment variable. " +
            "Please configure it in your .cursor/mcp.json file under the 'env' section."
        );
      }
    
      if (!args?.projectId) {
        throw new Error("projectId is required");
      }
    
      try {
        // Build query parameters
        const params: GetRunDetailsParams = {
          projectId: String(args.projectId),
        };
    
        if (args.testrun_id) {
          params.testrun_id = String(args.testrun_id);
        }
    
        if (args.counter !== undefined) {
          params.counter = Number(args.counter);
        }
    
        const runDetailsUrl = endpoints.getRunDetails(params);
    
        const response = await apiRequestJson<unknown>(runDetailsUrl, {
          headers: {
            Authorization: `Bearer ${token}`,
          },
        });
    
        // Always return output directly as text content, never write to file
        // This ensures the output is displayed directly regardless of size
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(response, null, 2),
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        throw new Error(`Failed to retrieve test run details: ${errorMessage}`);
      }
    }
  • The tool definition `getRunDetailsTool` including input schema (projectId required, testrun_id optional, counter optional) and types `GetRunDetailsArgs` and `GetRunDetailsParams`.
    interface GetRunDetailsArgs {
      projectId: string;
      testrun_id?: string;
      counter?: number;
    }
    
    interface GetRunDetailsParams {
      projectId: string;
      testrun_id?: string;
      counter?: number;
    }
    
    export const getRunDetailsTool = {
      name: "get_run_details",
      description:
        "Get detailed information about test runs. Shows test statistics (passed, failed, skipped, flaky), all test suites and cases, git metadata, and error details. Supports batch operations (comma-separated IDs, max 20). Use this to analyze test execution health or debug specific failures.",
      inputSchema: {
        type: "object",
        properties: {
          projectId: {
            type: "string",
            description: "Project ID (Required). The TestDino project identifier.",
          },
          testrun_id: {
            type: "string",
            description:
              "Test run ID(s). Single ID or comma-separated for batch (max 20). Example: 'test_run_123' or 'run1,run2,run3'.",
          },
          counter: {
            type: "number",
            description: "Filter by test run counter (sequential number).",
          },
        },
        required: ["projectId"],
      },
    };
  • src/index.ts:23-24 (registration)
    Import of `getRunDetailsTool` and `handleGetRunDetails` from the tools module in the main server entry point.
    getRunDetailsTool,
    handleGetRunDetails,
  • src/index.ts:102-102 (registration)
    Tool registration: `getRunDetailsTool` is added to the tools array that gets exposed to MCP clients.
    getRunDetailsTool,
  • src/index.ts:207-211 (registration)
    Tool routing: when the tool call name is 'get_run_details', it dispatches to `handleGetRunDetails` in the CallToolRequestSchema handler.
    if (name === "get_run_details") {
      return await handleGetRunDetails(
        args as Parameters<typeof handleGetRunDetails>[0]
      );
    }
Behavior3/5

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

The description discloses that the tool returns test statistics, suite/case details, git metadata, and error details, and that it supports batch operations with a max of 20 IDs. However, without annotations, additional behavioral traits (e.g., read-only, rate limits, permission requirements) are missing. The description is adequate but not fully transparent.

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 three sentences, each serving a distinct purpose: definition of capabilities, listing of returned data, and usage guidance. It is front-loaded with the primary action and avoids any unnecessary words. No redundancy.

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 no output schema, the description lists the categories of returned information (statistics, suites, cases, git metadata, error details), which provides a clear picture of what the tool yields. It also notes a constraint (batch max 20). Minor omission: no mention of pagination or sorting, but overall it is sufficiently complete for a detailed information tool.

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?

All input parameters are described in the schema (100% coverage). The description does not add new semantic meaning beyond what the schema already provides (e.g., batch operation behavior is already in the schema). Thus, the description adds no extra value for parameter understanding.

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 the action ('Get detailed information about test runs') and enumerates the specific content it returns (statistics, suites, cases, git metadata, error details). This differentiates it from sibling tools like list_testruns (which likely provides summaries) and get_testcase_details (which focuses on individual cases).

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 when to use the tool: 'analyze test execution health or debug specific failures.' It does not explicitly state when not to use it, but the usage guidance is clear and implies that it is for deep analysis rather than listing. Alternative tools are not named, but the sibling list provides contextual awareness.

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